Tapping
by James Laker (BurNinG) · in Torque Game Engine · 09/08/2004 (12:51 am) · 3 replies
I need my player to jump to the side (with animation) when the strafe key is pressed twice quiclky ala Unreal style...
Has anyone done this or know how to?
Thanx
James
Has anyone done this or know how to?
Thanx
James
#2
When the right key is presset, call your right action function. There, do something like:
Then schedule a funciton that'll change $player.nextAction to "none" or "" after a few milliseconds. Then, in the right action function, add an IF clause and do the proper action if $player.nextAction == "dodgeRight".
Do the same for tapping in other directions. Such scheme can also be used to create key sequences or combos.
09/10/2004 (6:46 am)
When the right key is pressed, have it change a variable that controls possible character states, and have a schedule to reset it back. Example:When the right key is presset, call your right action function. There, do something like:
$player.nextAction = "dodgeRight";
Then schedule a funciton that'll change $player.nextAction to "none" or "" after a few milliseconds. Then, in the right action function, add an IF clause and do the proper action if $player.nextAction == "dodgeRight".
Do the same for tapping in other directions. Such scheme can also be used to create key sequences or combos.
#3
09/15/2004 (6:09 am)
You would really need to build it into the move structure rather than just using script and commandToServer so you could predict the dodge movement on the client. Otherwise you would have warping and a big delay from the time you double tap till the time you actually move
Associate Kyle Carter