Movemap.bind questions (multiple ways of movement)
by Frogger · in Torque Game Engine · 10/31/2003 (6:06 pm) · 34 replies
I was wondering about if I had split screen, could I set up like the arrow buttons of one side and w,s,a,d for the other? I was just wondering what the name for arrows are in the field:
From config.cs -------------- moveMap.bind(keyboard, "--arrow ?--", moveleft); moveMap.bind(keyboard, "--arrow ?--", moveright); moveMap.bind(keyboard, "--arrow ?--", moveforward); moveMap.bind(keyboard, "--arrow ?--", movebackward);Would it also be possible to have both be able to do the same thing like this:
moveMap.bind(keyboard, "arrow ?", moveleft); moveMap.bind(keyboard, "arrow ?", moveright); moveMap.bind(keyboard, "arrow ?", moveforward); moveMap.bind(keyboard, "arrow ?", movebackward); moveMap.bind(keyboard, "a", moveleft); moveMap.bind(keyboard, "d", moveright); moveMap.bind(keyboard, "w", moveforward); moveMap.bind(keyboard, "s", movebackward);Or would that cause errors?
#3
11/02/2003 (5:40 am)
Search through the code base, I think it is leftarrwo, rightarrow, uparrow and downarrow. I am not 100% sure...
#4
06/02/2005 (8:20 pm)
It's "left" "right" "up" and "down"
#5
06/02/2005 (10:24 pm)
On the second question... can you map more than one key to the same command... not yet, but i did submit a small fix to the engine to allow it. It should be fixed when 1.4 final is released.
#6
I wouldn't think having different keys mapped to the same command would be an issue. You want the split screens to be controlling different characters right? So why would they both call the same control function?
06/02/2005 (11:21 pm)
Quote:
I was wondering about if I had split screen, could I set up like the arrow buttons of one side and w,s,a,d for the other?
I wouldn't think having different keys mapped to the same command would be an issue. You want the split screens to be controlling different characters right? So why would they both call the same control function?
moveMap.bind(keyboard, "left", moveleft); moveMap.bind(keyboard, "right", moveright); moveMap.bind(keyboard, "up", moveforward); moveMap.bind(keyboard, "down", movebackward); moveMap.bind(keyboard, "a", p2_moveleft); moveMap.bind(keyboard, "d", p2_moveright); moveMap.bind(keyboard, "w", p2_moveforward); moveMap.bind(keyboard, "s", p2_movebackward);
#7
The question: how do i change the script(and what script) so that the car (in the car demo) uses the keys to control(w,s,d,a) and not the mouse?
I have tried several times now but i just can't find the exatce scrips (CS file) to change...
Thanks in advance
Regards
Bardur
06/05/2005 (7:14 am)
Hi and im sorry for posting in this thread but i didn't want to start an new one when my question also is about KEy movement...The question: how do i change the script(and what script) so that the car (in the car demo) uses the keys to control(w,s,d,a) and not the mouse?
I have tried several times now but i just can't find the exatce scrips (CS file) to change...
Thanks in advance
Regards
Bardur
#8
06/05/2005 (9:38 am)
Example\Game\client\config.cs is usually where you edit the different controls.
#9
I think www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5771 is what you are looking for. It talks about (using a flying simulator) changing vehicular movement from the keyboard to the mouse.
I hope that helps, :)
Robert
06/05/2005 (10:54 am)
@Bardur:I think www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5771 is what you are looking for. It talks about (using a flying simulator) changing vehicular movement from the keyboard to the mouse.
I hope that helps, :)
Robert
#10
Disagree. config.cs is the file that is written out to override the defaults.
You'll want to setup your key binds in game/client/scripts/default.bind.cs, with the rest of the key bindings.
edit: corrected file name
06/05/2005 (12:50 pm)
>> Example\Game\client\config.cs is usually where you edit the different controls.Disagree. config.cs is the file that is written out to override the defaults.
You'll want to setup your key binds in game/client/scripts/default.bind.cs, with the rest of the key bindings.
edit: corrected file name
#11
06/05/2005 (12:55 pm)
Jmac is correct here: config.cs is an exe generated file, and should not be used for setting "default" keybinds, as it will simply be over-written by the engine the next execution.
#12
Ok now i know where to find the script. But i really don't know how to change it (from using Mouse to keyboard) i have tried to follow the reasurce that "Robert 'robertsim007' Pierce" providet but i didn't get it to work so some (MORE) help would be highly appreachiated.
Thanks in Advance
Regards
Bardur
06/05/2005 (2:17 pm)
Thanks for your replys...Ok now i know where to find the script. But i really don't know how to change it (from using Mouse to keyboard) i have tried to follow the reasurce that "Robert 'robertsim007' Pierce" providet but i didn't get it to work so some (MORE) help would be highly appreachiated.
Thanks in Advance
Regards
Bardur
#13
please help me...
Regards
Bardur
06/06/2005 (11:35 am)
Can't anyone tell me how to set up the keyboard instead of the mouse..please help me...
Regards
Bardur
#14
06/06/2005 (11:42 am)
@Bardur ... Search for it. It's not difficult. Heck, you can probably find examples of a keyboard and a mouse bind in starter.fps... in default.bind.cs
#15
I do usealy se how the script is set up ( you know ) but here i can't seem to find what to change to make the KEYBOARD active and NOT the MOUSE..
SO please help me..
I'm just playing around with the DEMO until i REALLY decide if i want to buy the TGE...
Regards
Bardur
06/06/2005 (3:02 pm)
I have tried searching with no luck. the thing is that i only have the DEMO of TGE(I haven't bought the TGE yet) so... i know about the Default.bind.cs but just exactly what is it i have to change i can't find any linkage between wich line of the script the Racing game uses and wich the FPS uses if there is any such "Linkage"...I do usealy se how the script is set up ( you know ) but here i can't seem to find what to change to make the KEYBOARD active and NOT the MOUSE..
SO please help me..
I'm just playing around with the DEMO until i REALLY decide if i want to buy the TGE...
Regards
Bardur
#16
You don't need source to do what you are trying ot do... Somewhere in the racing scripts there is a file (probably a default.bind.cs) that contains a whole wack of binds... All they do is bind a key or a mouse button to a method. In the starter.fps default.bind.cs both are used. If you go look at it you will see examples of both... take those examples... write em down... Now, go find where the binds are done for the racing kit. Find what you don't want (mouse binds) remove them, and add in the key binds you want.
06/07/2005 (4:03 am)
Bardur - You don't need the source of tge to muck with the racing demo... In fact, you could do an netire game without ever needing the source. You don't need source to do what you are trying ot do... Somewhere in the racing scripts there is a file (probably a default.bind.cs) that contains a whole wack of binds... All they do is bind a key or a mouse button to a method. In the starter.fps default.bind.cs both are used. If you go look at it you will see examples of both... take those examples... write em down... Now, go find where the binds are done for the racing kit. Find what you don't want (mouse binds) remove them, and add in the key binds you want.
#17
I hope i will susceed in this (Simple) task.. hehe.
Regards
Bardur
06/07/2005 (4:38 am)
Ok thanks ill try that..I hope i will susceed in this (Simple) task.. hehe.
Regards
Bardur
#18
I did a search on my torque folder and these are the Bind.cs and dso files i found:
editor.bind.cs
editor.bind.cs.dso
show.bind.cs
default.bind.cs
default.bind.cs.dso
So wich one of these do you think the settings for the mouse are.. i do see bind.mouse in all the scripts (i think) but i just don't hava a CLUe what to change...
I'm pretty NOOBISH i recently started learning c++(visual studio.net 2003)
Regards
Bardur
06/07/2005 (5:18 am)
Hi AGAINI did a search on my torque folder and these are the Bind.cs and dso files i found:
editor.bind.cs
editor.bind.cs.dso
show.bind.cs
default.bind.cs
default.bind.cs.dso
So wich one of these do you think the settings for the mouse are.. i do see bind.mouse in all the scripts (i think) but i just don't hava a CLUe what to change...
I'm pretty NOOBISH i recently started learning c++(visual studio.net 2003)
Regards
Bardur
#19
You know, you actually have to try, if you want to write a game... It's not going to write itself.
Look at it... look at the one in starter.fps...
starter.fps uses the mouse and keys in its default.bind.cs .. use those as examples for what you want to do.
06/07/2005 (5:34 am)
Uh.... I just told you it's DEFAULT.BIND.CS You know, you actually have to try, if you want to write a game... It's not going to write itself.
Look at it... look at the one in starter.fps...
starter.fps uses the mouse and keys in its default.bind.cs .. use those as examples for what you want to do.
#20
Ok. look i do know about Default.bind.cs and i know that it has all the keyboard.binds and mouse.binds but what i can't see is HOW and WHERE in the script i have to change/add I can't just delete the mousebinds(or can i).. so what/how to i cange it... Please
moveMap.bind( keyboard, a, moveleft );
moveMap.bind( keyboard, d, moveright );
moveMap.bind( keyboard, w, moveforward );
moveMap.bind( keyboard, s, movebackward );
moveMap.bind( keyboard, space, jump );
moveMap.bind( mouse, xaxis, yaw );
moveMap.bind( mouse, yaxis, pitch );
I have tried. OFTEN too.
I'm sorry for being so ASKING "bear with me"
Can't you show me some examples of how to change it(screenshots,zip file,explenation or somthing)
Regards
Bardur
06/07/2005 (5:49 am)
I'm sorry if i seem to be a TOTAL JERK..Ok. look i do know about Default.bind.cs and i know that it has all the keyboard.binds and mouse.binds but what i can't see is HOW and WHERE in the script i have to change/add I can't just delete the mousebinds(or can i).. so what/how to i cange it... Please
moveMap.bind( keyboard, a, moveleft );
moveMap.bind( keyboard, d, moveright );
moveMap.bind( keyboard, w, moveforward );
moveMap.bind( keyboard, s, movebackward );
moveMap.bind( keyboard, space, jump );
moveMap.bind( mouse, xaxis, yaw );
moveMap.bind( mouse, yaxis, pitch );
I have tried. OFTEN too.
I'm sorry for being so ASKING "bear with me"
Can't you show me some examples of how to change it(screenshots,zip file,explenation or somthing)
Regards
Bardur
Torque 3D Owner Frogger