Game Development Community

Newbie need help with triggering events

by Chrisamethyst · in Technical Issues · 03/26/2007 (4:36 pm) · 2 replies

Hi I just started using torque and I'm new to torque script and I'd like to know how to trigger in game events.

For example, after my player reaches a certain point in the game, for example, after he finishes talking to another character, I'd like to trigger an animation of a door opening. Does anyone know any good resources on triggering events/animations?


I'd done the tutorial base and I'd like more specifics.

#1
03/26/2007 (4:45 pm)
Try to catch the animationDone event. On that, you could open the door.

function Armor::animationDone(%this,%obj){
if (isObject(%obj.client.player)) {
openDoor();
}
}
#2
03/26/2007 (4:46 pm)
Codesampler has a few tutorials:

www.codesampler.com/torque.htm

There is one about basic trigger setups. That might be a good starting point for what you want to do.