Pausing spline animations

I have a whale that I am animating using a spline path. It is using an animation blueprint, and has a blendspace as well for its animations. It animates on the path fine, but I was wondering if it is possible to pause the spline animation at a certain point, or time, for a certain number of seconds before having it continue on. Ideally I would have the idle animation playing during this time. I have no idea how to approach this or if it is possible.

You can use an animation state machine to achieve this. Pause your movement along the spline and then your AnimBP will read this state to control the transition rule.

I think you can also just play a montage and it’ll override the AnimBP (not 100%) but the animation state machine will give you way more flexibility.

Ok, but how do I pause the movement? the spline animation plays automatically, it’s not user controlled.

I need more details how your spline animation is implemented - there are a lot of ways to achieve that. Assuming you’re interpolating between points you could set a boolean flag to stop the interpolating code from running. How to set the flag? Could using a time counter. I’d probably use an overlapping sphere so you can easily move it around in your scene. Just some ideas.

This is the event graph and part of the main movement script. This isn’t my asset, so I’m trying to work it out. Other splines I’ve made have a timeline, but this one doesn’t, so i’m having some difficulty.

The animation is done by interpolating along a spline in the function from script.png. It’s in event tick with no checks so I guess it just goes on forever (not sure can’t see everything). The easiest way is to check a boolean flag and use a branch to control whether this function gets run or not.

Check out Branch

You can use a key press initially to set your flag while testing. Then you need to decide how you want initiate a stop. I like my sphere overlap idea cause it’s easy to iterate on.

But for step 1, try using a key press to set a boolean flag. Use that to control the flow with a branch.

HumpbackWhale_AnimBP is where you can configure the animation states. But that’s the last part for now.

yes it continues indefinitely. I put in a branch, in the right place hopefully. apologies i’m totally new to this ans its making be feel dumb. I feel this is simple and I’m making it difficult.

No worries hang in there. I’d recommend doing some foundational work to understand these things. https://learn.unrealengine.com/ has some pretty good videos. Some here as well https://www.youtube.com/user/UnrealDevelopmentKit/search?query=blueprints (a bit out of date but still applies.)