How to make an animation that is triggered wherever the character is?

I’m trying to create a collectathon-style game and I want an animation to be triggered whenever the player collects certain items.
It’s not just a simple character animation, it would be a sequence involving camera animation, character animation and UI elements, something like when Mario collects a moon in Super Mario Odyssey:

I know how to create a level sequence that plays a specific animation in the level, but that’s the problem: it’s specific. I want a generic animation that will be played wherever the character collects the collectible and works in any level in the game.

Any tips on how to go about doing that?

Yeah, don’t use the level sequencer :slight_smile:

It’s supposed to be able to make position independent sequences, but I could never get it working.

So, it’s down to blueprint programming. You can play a character animation, and do something with another camera ( which can be separate, or in the player ), and possibly also something to do with the current pickup.

With values that extreme, time dilation may not be the best route.

You could get a list of all actors, and fix their dilation at zero, leave the player’s value alone.

What exactly do you need to stop, as if the game was paused.

I’m taking that route, and I’m getting there, but I’m running into a bit of a problem:
I want the game to ‘pause’ while this animation plays out, but obviously I can’t pause it cause the animation wouldn’t play when paused.
So I’m trying to set global time dilation to 0.01 and the character’s custom time dilation to 100 (so the world is slowed down except for the character). The problem is the anim montage seems to skip straight to the end of the animation when I do that. The funny thing is it works if I set global dilation to 0.1 and custom to 10, but if I try lower values at global time dilation, the problem comes back.

Could this be a bug or am I missing something?

What exactly do you need to stop, as if the game was paused.

I want the game to pause so things don’t happen around the player (like enemies attacking) while the animation is playing and the player has no control. But since I want the character to play a celebration animation, I can’t just pause the game completely. So basically I want everything to pause except for the player character.

Getting a list of all actors sounds very ‘expensive’, wouldn’t that heavily affect performance?

Getting a list of actors is only expensive if you have a lot of them ( ie, 500 AI ), or you keep doing it, which you’re not going to do :wink: