Game Development Community

Randomized Fire Animation

by Chris "C2" Byars · in Torque Game Engine · 04/05/2006 (6:22 am) · 2 replies

I'd like to play a fire state animation chosen at random instead of only one; I have four fire animations, each with a different muzzle flare modelled, which is why I want to do this.

Would anyone have an idea how to play a random weapon animation out of four? Currently the single fire animation is stated in the fire state, but to make one random, there would have to be a different way of handling its animation than the current state system I believe.

#1
04/13/2006 (5:42 pm)
Well there are two ways you can go about this. You could go into the image state code and add some mechanism to allow more animations to be defined and be randomly selected... but I think that would be overly complex for such a minor addition. I would just take the time to write out a big image state machine that has multiple fire states and go to one of them randomly from an intermediary state that gets called by the fire trigger. You already seem to have integrated Josh Moore's manual image state selection resource, so that should be readily doable.
#2
04/13/2006 (5:58 pm)
That's a great idea, using the manual image state selection. Will try.