Possible to raise event AFTER an action has completed?

Hi Guys!
I’ve got an interesting one which I’d love to see answered yes :slight_smile:

Basically, I have an object which runs an armature action via a message script to kick it off, works brilliantly. I’d love to then raise an event once the animation is complete - is this possible?

Cheers

You could set the action to a object property. Once the property hits the number of the last frame python can trigger something.

Sorry bull-frog, I don’t quite understand how to you would set the object property on the last frame of the action :frowning:

No need for python- in the action actuator, there’s a field to put in a property name where it’ll set the property to the action’s current frame (this field says FramProp). Let’s say you’re using a property named Frame.
plug an always sensor to a controller and change its type to expression, and in the new field type


Frame==X

but replace X with the number of the last frame.
Now you can plug any actuators you want into this controller, such as messages and whatnot.
Basically this means whenever the property Frame is equal to the number you set, it actuvates its actuators.

oh would you look at that :slight_smile:
Thankyou so much - this will help a lot!

There’s also the actuator sensor! It detects if an actuator is active, if you invert it and turn on tap I guess it should activate when the actuator stops (and when the game starts)