Movement
by Mark Grooby · in Torque Game Engine · 12/05/2006 (12:09 am) · 9 replies
Hey, does any know where there is a resource for a more adventure game style movement?
As in, when you press left ur guy actually runs left instead of side-stepping.
Like Jak & Daxter movement.
Help would be appreciated, thanx.
-Mark Grooby
As in, when you press left ur guy actually runs left instead of side-stepping.
Like Jak & Daxter movement.
Help would be appreciated, thanx.
-Mark Grooby
About the author
#2
Thanx anyways
12/05/2006 (12:42 am)
I'm not excactly sure what to do with yaw, could you be more specific?Thanx anyways
#3
you could use them like this:
i am almost sure this should work
i dont have any code here at work so if there are any errors and you have problems implementing it just tell me and i will check the code when i get home
hope this helps
12/05/2006 (12:57 am)
These functions from default.bind.cs can be used to turn the player:function turnLeft( %val )
{
$mvYawRightSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0;
}
function turnRight( %val )
{
$mvYawLeftSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0;
}you could use them like this:
moveMap.bind( keyboard, left, turnLeft ); moveMap.bind( keyboard, right, turnRight);
i am almost sure this should work
i dont have any code here at work so if there are any errors and you have problems implementing it just tell me and i will check the code when i get home
hope this helps
#4
You could actually do what you need via script.
In default.bind.cs , if I remeber correctly it has a function name turn left and turn right maybe you could start there .
Aun.
12/05/2006 (12:58 am)
*** EDIT *** Wolfgang Kurz ..was faster You could actually do what you need via script.
In default.bind.cs , if I remeber correctly it has a function name turn left and turn right maybe you could start there .
Aun.
#5
If you don't know the answer to this, that will do.
Could I possibly make it so the left button isn't turn left, it actually turns and runs?
I'll fiddle around with it abit, see what i can come up with.
THNX!
-Mark Grooby
12/05/2006 (1:23 am)
Aha, thats sort of it.If you don't know the answer to this, that will do.
Could I possibly make it so the left button isn't turn left, it actually turns and runs?
I'll fiddle around with it abit, see what i can come up with.
THNX!
-Mark Grooby
#6
I Tried it out, I don't get a syntax error, the right arrow button just doesn't do anything.
Any ideas?
-Mark Grooby
12/05/2006 (1:31 am)
Awwwww...I Tried it out, I don't get a syntax error, the right arrow button just doesn't do anything.
Any ideas?
-Mark Grooby
#7
12/05/2006 (6:22 am)
Might need a value in there? moveMap.bind( keyboard, left, turnLeft(5.0) );
#8
I change the 'a' in the 'moveleft' movemap.bind into a 'left' and it remaps a=left to leftarrow=left, its that easy. Watch you have all the needed () and ; in the correct places. If something odd is happing check the log files (press ~ if your ingame, open console.log with a text editor if your NOT in game)
12/05/2006 (7:01 am)
I look in default.bind.cs, and this is what i see.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 change the 'a' in the 'moveleft' movemap.bind into a 'left' and it remaps a=left to leftarrow=left, its that easy. Watch you have all the needed () and ; in the correct places. If something odd is happing check the log files (press ~ if your ingame, open console.log with a text editor if your NOT in game)
#9
or, if you want to use the arrow keyes:
etc....
Or, if you are lazy, you can open your game, click on the options button, go to controls, and simply double click on the movement you want, and then press the key you want.
It will be saved in your pref file. If you write this in code, make sure to DELETE your pref files or you won't see your changes.
12/05/2006 (5:08 pm)
It's as simple as:moveMap.bind( keyboard, a, turnLeft ); moveMap.bind( keyboard, d, turnRight );
or, if you want to use the arrow keyes:
moveMap.bind( keyboard, left, turnLeft );
etc....
Or, if you are lazy, you can open your game, click on the options button, go to controls, and simply double click on the movement you want, and then press the key you want.
It will be saved in your pref file. If you write this in code, make sure to DELETE your pref files or you won't see your changes.
Torque Owner Wolfgang Kurz
its really easy when you look for "yaw"