I want to run some lua code when an animation is complete. When I try to create an action, I cannot find an event in the event list for gre.animation.compete or Animation Complete or anything. The closest thing I see Event Playback Complete.
I'm not terribly comfortable with events and so I'll need a pretty simple hand-holding through this.
Thanks in advance!
If you’re using an animation you’ve created in the Animation Timeline, it should autogenerate a couple of events for use in the Actions panel. For example, if you created a new animation called ‘test’ in the Timeline, there would be two events generated:
These are the events you would hook into for your Lua action. If you are looking to trigger a Lua function from an animation created from within a Lua script, this is also possible. The function you’d like to call on complete would be passed in as an argument on the creation of your Lua based animations.
You can read more about that Lua API here: https://support.cranksoftware.com/hc/en-us/articles/360040409971-gre-animation-create
Hope this helps!
Please sign in to leave a comment.