Game Development Community

Simple Question, Editing Controls

by MaxAntinone · in Torque Game Engine · 03/05/2008 (12:37 am) · 6 replies

Hi, I have a quick question I need answered by tomorrow.
I'm working indipendently on a school project, and I have a deadline on Thursday. I'm just using TGE 1.5.2

How do I change the controls? What cs file do I have to edit and where is it?

I don't want to do anything fancy, I just want to take the default wasd and spacebar controls and remap them to the arrows on a USB number pad, or to a five button mouse.

#1
03/05/2008 (6:38 am)
Game defaults are in default.binds.cs
Then the game loads client/config.cs (or the compiled version of this file) which has any overriding information based on what the user selected through the user interface.

When developing, run the DeleteDSO batch file to clear out the user selections and reset to the defaults only.
#2
03/05/2008 (1:23 pm)
Thank you!

One more question, though. I tried inputting different letter keys and it worked fine, but I tried inputting number keys and it worked when I hit the normal number keys, but it doesn't work when I hit the keys on the number pad or my USB number pad. How do I tell it to use those?
Also, what do I put in for the arrow keys and the enter on the number pad?
#3
03/05/2008 (3:53 pm)
With the SDK, those are listed in sim/actionmap.cc

numpad0..numpad9

up,left,right,down
numpadenter
numlock
#4
03/17/2008 (5:16 pm)
Thank you so much for your help.
I just have a couple more questions.

I'm looking through the SDK and I don't see any folder called sim, or any file called actionmap.

What's the name for a mouse left click?

Finally, I want to add a function that allows the character to respawn back at the starting point at a button press. How do I do that? Do I just put it in default.binds.cs? do I have to define it somewhere else?
#5
03/19/2008 (11:58 am)
The engine code is in teh SDK under the engine folder, so: engine/sim/actionmap.cc
#6
03/23/2008 (11:31 pm)
Umm... so where do I put the code for that "hit button to return to start" function?