Game Development Community

Bomb coding (Torque Beginner)

by William Goh (Joondalup IT TAFE) · in Torque 3D Professional · 09/18/2009 (12:20 am) · 0 replies

I have imported a C4 bomb into my game and would like some help with coding of a bomb. My coding plan is as follow:

- If a player such as BoomBot, ForgeSoldier, or SpaceSuit is standing in front of bomb and presses "F" on keyboard, it shall play an animation file of the player picking up the bomb and the bomb shall be mounted to both its hand (which I think is Mount Point 1, and 2?). The bomb is then to be added into the inventory.

- Two trigger points have been set up where the Player with the bomb can go to. When reaching the Trigger point, the player is to press "Enter" on the keyboard and it shall play an animation file, if there is a bomb in the inventory of the Player. It then shall explode after numerous amounts of seconds?

How can I code this?