How to jump jet
In game terms, a jump jet is often a backpack, a helicopter hat, or a similar device that a player wears, that provides them a short thrust upwards and often uses up a limited energy source. This allows a player to reach a height they normally could not, jump a canyon, or otherwise get out of danger or reach a reward. In this recipe we will learn how to allow a player to jump jet.
Getting ready
We will be making TorqueScript changes in a project based on the Torque 3D Full
template using the Empty Terrain
level. If you haven't already, use the Torque Project Manager (Project Manager.exe
) to create a new project from the Full
template. It will be found under the My Projects
directory. Then start up your favorite script editor, such as Torsion, and let's get going!
How to do it...
We are going to modify the player's Datablock
instance to allow for jump jetting and adjust how the user triggers the jump jet as follows:
Open the
art/datablocks/player.cs
file in your text editor.Find...