Game Development Community

Animation Triggers

by Lorne McIntosh · in Torque Game Engine Advanced · 06/25/2008 (8:07 pm) · 2 replies

Does anyone know how animation triggers work? I am trying to get particles to emit from my players feet when he jumps and leaves the ground, and then when he lands, I would like to emit more particles (but from a different emitter). I have been searching around for information on how to code this but all I can seem to find is how to set the triggers in Maya. I haven't found anything related to using these triggers in code to call something such as a particle emitter. Any information would be greatly appreciated!

Thanks

About the author

Ubiq Visuals is a software and creative content developer for the entertainment industry. Our vision is to provide inspiration and the tools for soon-to-be game designers and creative minds of all ages.


#1
06/26/2008 (3:38 am)
Have you looked into how the players footpuffs work? Those little dust clouds are just particles.
#2
06/26/2008 (5:47 am)
If you have successfully created / exported triggers for your model, you should get a call back in script along the lines of

function Object::OnAnimationTrigger(%this, %channel, %state)
{

}

%channel should be between 1 - 32 I believe, and %state will be either 1 or 0. That should make sense if you have the triggers exporting. From there, it's time for some switch statements and conditionals! Yay!



Also if you ARE having trouble creating / exporting triggers, look into the whole ground transform / animating your bounding box / makePath flag issue. That is definitely a mind boggling problem if you are unaware of it.