Game Development Community

Parachutes in Torque?

by Jeffrey J. Sykes, "SYKO_RIP" · in Torque Game Engine · 11/03/2003 (11:05 am) · 3 replies

Not sure if this is the "right" form for this but,

How can I set up torque to allow a parachute, both in spawn and in a bound key, that requires a set height before allowing it to function. Those of you that have played Battlefield 1942 know what I'm talking about. If you jump off a big cliff, you can even base jump, very fun.
Any ideas of were I could start?

#1
11/03/2003 (11:21 am)
You could check the z value of the player position.
%pos = %client.player.getTransform();

   %x = getWord(%pos, 0);
   %y = getWord(%pos, 1);
   %z = getWord(%pos, 2);

If %z > then a given number allow the parachute function.
#2
11/03/2003 (11:31 am)
That ..
or you could use the falling code.

when the player has fallen a certian distance, the animation changes.
take this oppurtunity to cast a ray to the next surface below the player and if That is high enuff enable the chute.
#3
11/03/2003 (11:34 am)
Thanks guys, I will try that tonight.