Best practice for animation of superpowers?

When animating superpowers, I have to keep in mind that different things happen within the animation. For example, halfway through a punching animation, a shockwave has to be created to visualize the force of the punch.

I was originally thinking of just adding markers in my animation and running the functions to make the effects as the animation reaches the markers. But I’m not sure about this idea because I don’t know whether its good practice or not to have important numbers be dependent on arbitrary marker positions in an animation.

My ideal solution is one where I can define the numbers that I need; for example, maybe I want the player to hold a charged stance of a punching animation for XYZ seconds based on a status effect. I would set the script to change XYZ and it would be that easy.

I was wondering if you guys have any insight on this: is the only reliable method having the animation control the script? Or perhaps I could have the script control the animation?

1 Like

In the new animation editor, the concept of events (via animation keyframes) was introduced. This means that you can set a trigger that fires when a certain keyframe has played. These events can be tracked via the AnimationTrack:GetKeyframeReachedSignal() Event.

You can learn more via the “Animation Event” section.

Hope this helps!

2 Likes