Tilde doesn't work!
by Marek Krzeminski · in Torque Game Engine · 05/10/2005 (5:42 pm) · 20 replies
I'm going through chapter 3 of the book and I have run into a problem. On page 106 of the book it says press the tilde key to get the console screen. Well when I press ~, nothing happens. Any suggestions?
About the author
3D OpenGL, C++ Game Development Video Tutorials @ www.marek-knows.com
#2
I even went into fps/client/scripts/default.bind.cs and changed GlobalActionMap.bind(keyboard, "tilde", toggleConsole); to be GlobalActionMap.bind(keyboard, "1", toggleConsole); effectively changing the console activation button from a tilde to the number 1. However when I press 1, nothing happens either!
Is it possible I have a corrupt version of torque? What else could be causing this?
05/11/2005 (4:21 am)
I tried that key (it has a ' and a ~ on it) and it doesn't work.I even went into fps/client/scripts/default.bind.cs and changed GlobalActionMap.bind(keyboard, "tilde", toggleConsole); to be GlobalActionMap.bind(keyboard, "1", toggleConsole); effectively changing the console activation button from a tilde to the number 1. However when I press 1, nothing happens either!
Is it possible I have a corrupt version of torque? What else could be causing this?
#3
For example, I have a UK English keyboard, but if I had not set the country to UK, Windows would assume it was a US English keyboard and some of the characters it printed on the screen would not match what was printed on the actual keys.
You're going to need to try all the keys (don't forget to also try pressing shift with each).
If I remember correctly, I have to press "shift" and the key to the left of "1" to open the console window.
05/11/2005 (6:34 am)
Even if you're using a QWERTY keyboard, where non-alphanumeric keys are varies according to the country it is designed for. Also, what codes are sent when you press them varies according to the country settings of Windows.For example, I have a UK English keyboard, but if I had not set the country to UK, Windows would assume it was a US English keyboard and some of the characters it printed on the screen would not match what was printed on the actual keys.
You're going to need to try all the keys (don't forget to also try pressing shift with each).
If I remember correctly, I have to press "shift" and the key to the left of "1" to open the console window.
#4
Put this somewhere in your default.binds.cs file:
06/21/2005 (6:36 pm)
Or he could try binding it in yourbasegame/client/default.bind.cs, which is why it probably isn't working.Put this somewhere in your default.binds.cs file:
GlobalActionMap.bind(keyboard, "tilde", toggleConsole);
#5
I was told to use the # key and enter commands into the chat window. Maybe you have a similar problem...
06/22/2005 (1:48 pm)
Using the tilde key on my computer when I'm playing Neverwinter Nights and other commercial games crashes the entire computer. I bought another keyboard thinking maybe the traces were screwed up in the one I had, but it didn't help. I was told to use the # key and enter commands into the chat window. Maybe you have a similar problem...
#6
06/23/2005 (7:27 am)
Try changing your keyboard layout driver, from the english to the U.S.
#7
07/07/2005 (11:00 am)
I had this same problem. turned out i had a typo and the bind keys functions were not being run properly. that's more than likely what happened. he's got a syntax error and just needs to debug it properly. the code will continue to execute past those if you screw them up.
#8
06/17/2006 (10:09 am)
I have the same problem on my HP laptop. Any ideas on how to fix?
#9
06/17/2006 (10:30 am)
Don't forget to delete the client/config.cs and config.cs.dso files after making changes to the default.bind.cs file.
#10
When running the CH3 demo from the book, before hitting the start button, if I hit the ~ key,
I have a window that pops up waiting for input. This works, but how do you get out of it?
Then when I hit the start button, I have the 3d world enviroment as in the book (pg 138 ebook or
pg 106 in book). At step pg 106 step 7 the tilde key doesn't work. I did find out that an F2 keypress
brings up an input box on the screen. now what is that for? As you can see I have been reading the
book for a week, so i'm a newbe at this torque stuff. any help would be appreciated.
06/17/2006 (10:48 am)
Here is an update to my problem:When running the CH3 demo from the book, before hitting the start button, if I hit the ~ key,
I have a window that pops up waiting for input. This works, but how do you get out of it?
Then when I hit the start button, I have the 3d world enviroment as in the book (pg 138 ebook or
pg 106 in book). At step pg 106 step 7 the tilde key doesn't work. I did find out that an F2 keypress
brings up an input box on the screen. now what is that for? As you can see I have been reading the
book for a week, so i'm a newbe at this torque stuff. any help would be appreciated.
#11
06/17/2006 (10:54 am)
Hitting the ~ key again should close the window. Not sure about that tilde key not working for you on page 106, works fine here. Have you been playing around with the keybindings in the scripts?
#12
When running the CH3 demo from the book, before hitting the start button, if I hit the ~ key,
I have a window that pops up waiting for input. This works, but how do you get out of it?
Then when I hit the start button, I have the 3d world enviroment as in the book (pg 138 ebook or
pg 106 in book). At step pg 106 step 7 the tilde key doesn't work. I did find out that an F2 keypress
brings up an input box on the screen. now what is that for? As you can see I have been reading the
book for a week, so i'm a newbe at this torque stuff. any help would be appreciated.
06/17/2006 (10:56 am)
Here is an update to my problem:When running the CH3 demo from the book, before hitting the start button, if I hit the ~ key,
I have a window that pops up waiting for input. This works, but how do you get out of it?
Then when I hit the start button, I have the 3d world enviroment as in the book (pg 138 ebook or
pg 106 in book). At step pg 106 step 7 the tilde key doesn't work. I did find out that an F2 keypress
brings up an input box on the screen. now what is that for? As you can see I have been reading the
book for a week, so i'm a newbe at this torque stuff. any help would be appreciated.
#13
do the demos from the book. can you explain? I am at the section moveshape.cs and can't
get the thing to input to execute the file. how about if i reinstall the software?
06/17/2006 (11:10 am)
I have no idea what you are talking about keybindings in the script. all i'm doing is trying to do the demos from the book. can you explain? I am at the section moveshape.cs and can't
get the thing to input to execute the file. how about if i reinstall the software?
#14
when in game mode.
06/17/2006 (11:35 am)
I tried reinstalling the software and still no luck. It is like the keyboard looses key functionswhen in game mode.
#15
on my hp laptop ( HP Pavillion 8400 series, top of the line). The program has a bug. Does anybody know of a solution? Is it the DirectX files?
06/20/2006 (7:07 am)
I have tried the software on a HP desktop with Chapter 3 demo. It works! But it doesn't still work on my hp laptop ( HP Pavillion 8400 series, top of the line). The program has a bug. Does anybody know of a solution? Is it the DirectX files?
#16
Some keyboards are designed with slightly different character sets than the US keyboard, which can lead to problems. I suspect your laptop doesn't have a US keyboard map, which may be why it has the problem with tilde.
You mentioned that you don't understand keybindings. Don't worry, you'll learn about them in future chapters. The basic idea is that the computer doesn't automatically know what to do when you hit a key. You have to program a game to associate each key with a function. For example, you might tell it that the up arrow means "move forward" or that the spacebar means to jump. In many of the TGE examples, the tilde is supposed to mean "toggle the console window" but in your computer, that's not working. So let's choose a different key for that purpose.
Go to the folder, c:\3DGPAi1\CH3\client\scripts
and use a text editor to open the file default.bind.cs
Near the bottom of the file is a section labeled Misc., about 30 or 35 lines from the bottom.
Find the line, GlobalActionMap.bind(keyboard, "tilde", toggleConsole);
Replace "tilde" with "alt c" and save the file (make sure your text editor saves it as a .cs file, not a .txt file).
If all goes well, you should be able to run the example, but instead of hitting the tilde to open the console window, you'll hitc instead.
Let me know if that worked for you!
06/20/2006 (11:00 pm)
Barry (and others with tilde problems in chapter 3):Some keyboards are designed with slightly different character sets than the US keyboard, which can lead to problems. I suspect your laptop doesn't have a US keyboard map, which may be why it has the problem with tilde.
You mentioned that you don't understand keybindings. Don't worry, you'll learn about them in future chapters. The basic idea is that the computer doesn't automatically know what to do when you hit a key. You have to program a game to associate each key with a function. For example, you might tell it that the up arrow means "move forward" or that the spacebar means to jump. In many of the TGE examples, the tilde is supposed to mean "toggle the console window" but in your computer, that's not working. So let's choose a different key for that purpose.
Go to the folder, c:\3DGPAi1\CH3\client\scripts
and use a text editor to open the file default.bind.cs
Near the bottom of the file is a section labeled Misc., about 30 or 35 lines from the bottom.
Find the line, GlobalActionMap.bind(keyboard, "tilde", toggleConsole);
Replace "tilde" with "alt c" and save the file (make sure your text editor saves it as a .cs file, not a .txt file).
If all goes well, you should be able to run the example, but instead of hitting the tilde to open the console window, you'll hit
Let me know if that worked for you!
#17
04/11/2009 (7:34 pm)
I found this problem with other games on my HP desktop machine as well. It may or may not be related, but the problem for me was that the MediaCenter remote controller was registering one of its keys as the tilde key before my IR wireless keyboard. I never found a great way to change that in the operating system, but I am generally able to remove the remote-control device to get things to work (and allow windows to add it back again after the next reboot).
#18
The Tilde doesn't work for me unless I hit 'u' as well in the fps starter kit on the A Stronghold map.
In other missions:
1. Open Torque
2. Get to start up GUI screen. (Mostly White, says "Torque Game Engine", torque logo, buttons at top.)
3. If I hit the Tilde there the console opens.
4. Click "World Editor" button at the top.
5. Hit Tilde and console opens.
6. Hit F11 to close World Editor Inspector
7. Hit Tilde and console DOES NOT open.
8. Hit F11 to open World Editor Inspector.
9. Hit Tilde and console DOES NOT open.
10. Click on the menu, go to quit, and quit the mission.
11. Now at starter GUI again: Hit Tilde and console DOES NOT open.
12. Exit Torque.
13. Open Torque.
14. Hit Tilde and sometimes the console will open, other times it will not at this point.
07/17/2009 (5:41 am)
I have found the same problem and am able to replicate it.The Tilde doesn't work for me unless I hit 'u' as well in the fps starter kit on the A Stronghold map.
In other missions:
1. Open Torque
2. Get to start up GUI screen. (Mostly White, says "Torque Game Engine", torque logo, buttons at top.)
3. If I hit the Tilde there the console opens.
4. Click "World Editor" button at the top.
5. Hit Tilde and console opens.
6. Hit F11 to close World Editor Inspector
7. Hit Tilde and console DOES NOT open.
8. Hit F11 to open World Editor Inspector.
9. Hit Tilde and console DOES NOT open.
10. Click on the menu, go to quit, and quit the mission.
11. Now at starter GUI again: Hit Tilde and console DOES NOT open.
12. Exit Torque.
13. Open Torque.
14. Hit Tilde and sometimes the console will open, other times it will not at this point.
#19
11/26/2009 (2:45 pm)
On my UK keyboard I eventualy found the apostrophe (') key opened the console
#20
this is because the tilde key is in another position than the US keyboard.
03/02/2010 (8:14 am)
i have a spanish keyboard and cant open the console, so you need to map to another key... ex. tabthis is because the tilde key is in another position than the US keyboard.
Torque Owner Gary Preston