Basic jumping problem in torque
by John Ervin · in Torque Game Engine · 06/09/2006 (6:02 pm) · 3 replies
I'm planning to make a 3d platformer, and would like to use Torque. In preparation for that, I've been getting familiar with torque and learning how to perform basic functions using the available documentation and the demo. Using stock 1.4 TGE, jumping is highly problematic. There are two problems:
1. If you press 'jump' while running forward, you may or may not actually jump. If you hold 'jump,' you will do so at some point, but it's not clear when.
2. When you land, there is a very noticeable and long cooldown time before you can jump again.
I haven't been able to figure out how to adjust this in script. Is this due to the animations of the default player? Is there a scripting way to adjust this? Or does it require diving into the engine to deal with?
Thanks in advance for any help.
1. If you press 'jump' while running forward, you may or may not actually jump. If you hold 'jump,' you will do so at some point, but it's not clear when.
2. When you land, there is a very noticeable and long cooldown time before you can jump again.
I haven't been able to figure out how to adjust this in script. Is this due to the animations of the default player? Is there a scripting way to adjust this? Or does it require diving into the engine to deal with?
Thanks in advance for any help.
#2
Thank you very much for the quick and right-on-target response!
06/09/2006 (6:46 pm)
Give thyself a cookie!Thank you very much for the quick and right-on-target response!
#3
The JumpDelay IIRC is measured in server ticks. Each server tick is 32 milliseconds long. So the number you specify in script is mulitples of 32 millisecond "ticks".
- Eric
06/09/2006 (8:02 pm)
In case you're wondering about timing issues.The JumpDelay IIRC is measured in server ticks. Each server tick is 32 milliseconds long. So the number you specify in script is mulitples of 32 millisecond "ticks".
- Eric
Torque Owner Cinder Games
Take a look at the datablock of the player.
it's probably gonna be in player.cs.
should be in this datablock, if it's default.
datablock PlayerData(PlayerBody)
Anyhow. look for
JumpDelay = ???
Change that as you see fit
I got mine set to 15.
for a jump delay. there may be some variable to change in the datablock.
But you could always add a check in the JUMP function in the default.binds to see how long it's been since the player landed.