Double button press
by Ivan Mandzhukov · in Torque Game Engine Advanced · 01/30/2008 (12:05 pm) · 6 replies
Ok, guys , this is the situation:
I want when i press "space" to jump, after that if i am still in the air and press "space" again I want to jump once again in the air i.e. to make double jump.
I am only interested in catching the double keypress of "space". I am not interested in making the player physics and animations. This is already done.
In Torque script it seems to be impossible to catch the event.
I want when i press "space" to jump, after that if i am still in the air and press "space" again I want to jump once again in the air i.e. to make double jump.
I am only interested in catching the double keypress of "space". I am not interested in making the player physics and animations. This is already done.
In Torque script it seems to be impossible to catch the event.
#2
I want to create Djump with button press, release and press again.
I tried to create mvDjump and in Torquescript used second jump in a package, on release the activatepackage, but this idea is not as i expected.
I want an advice for modification in sim/actionmap.cpp, and creating a timer there.
01/30/2008 (12:57 pm)
This deals with physics.I want to create Djump with button press, release and press again.
I tried to create mvDjump and in Torquescript used second jump in a package, on release the activatepackage, but this idea is not as i expected.
I want an advice for modification in sim/actionmap.cpp, and creating a timer there.
#3
Luck!
Guimo
01/30/2008 (3:08 pm)
Instead of using a jump, why dont you apply an impulse using applyForce. This may work just fine for you and you may control it in game. Just send the message to the server using a remote procedure call.Luck!
Guimo
#4
01/31/2008 (12:54 am)
I told you guys, i am not interested how to move the player to make it look like he is jumping once again after the first jump. I am NOT asking about the phycics. I am interested how to catch the event of the double button press.
#5
i am at the finish line with C++, the code is working
the only thing is how to "bring" the non-static Player::mContactTimer to the console (TS)
i tried with addVariable in Player::consoleInit(), but there was an error.
may be a ConsoleFunction and return the timer (TypeS32) ?
i am already tired
02/02/2008 (12:59 pm)
OK, guysi am at the finish line with C++, the code is working
the only thing is how to "bring" the non-static Player::mContactTimer to the console (TS)
i tried with addVariable in Player::consoleInit(), but there was an error.
may be a ConsoleFunction and return the timer (TypeS32) ?
i am already tired
#6
Anyway i expected more help from the advanced coders.
02/03/2008 (10:14 am)
I lost 4 days, but finally i did it.Anyway i expected more help from the advanced coders.
Torque 3D Owner mb
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7191