Download

Best method for universal animation/timeline/matinee skipping?

Hello! I’m working on a game that will make extensive use of animated objects in the environment where the player cannot do anything until the animation is complete. For example, the player may pull a lever and watch a door open. The lever has a timeline animation in its blueprint which rotates it 45 degrees. After the lever animation is complete the door’s timeline will animate it sliding up into the ceiling. The player cannot move during these sequences and many of them may be repeated many times through-out the game, so being able to skip them is a must. Many of these interactable objects are blueprints with Timeline animations. Some of them are cinematic matinee-based animations, while others may involve imported frame animation. Every one of them needs to be skippable.

What is the most efficient method to add simple universally accessible skipping functionality to these animations? I wish I could set it up so that pressing SpaceBar called a global event to skip all animations. Another caveat is that certain variables that are set and events called during these animations have to function as if the animation was completed normally.

My first inclination was to use a blueprint interface for all my interactable objects, but I just wanted to ask here to see if there might be an easier way. Any help would be greatly appreciated! :slight_smile:

interesting topic, but consider it’s going to break the immersion pretty heavily.
So separate those parts:

  1. for Timeline, you can obviously set new time to the end and then play it would end right away, providing you have a event that does it.
    But all the dependent object, in your example lever and door, you have to somehow issue escape event after you skip the lever animation.

  2. for Matinee, you can also set position and stop/play. It should control the same way for imported frame/vertex animation.
    But for matinee, it might actually have player involved, ie a platform that are moving while player on it, you would need to be very carefully when handling this type of situation.

I don’t think there is a “universal” way that built-in in UE4, but you can do it regardless. Just plan it out and test it properly would be fine, there is no shortcut for this.

Hey PenguinTD thanks for the input. Yeah I kinda figured I would have to use the matinee/timeline play/pause/set time features in some way. I just wasn’t sure what the best method for doing so would be. There are a couple “vehicles” in the game. They’re more like rides actually in that you can’t control where they go. I’ll probably just attach my player character to the animated object, that way when it skips to the end the player will just go along with it.

In this game there should never be more than one thing animating at a time. I was thinking that maybe when something animates it could have it set a variable in my player character blueprint, something like an Actor variable called “Currently Animating Actor”. Then when you press the spacebar have it fire off the “Skip Animation” event in that actor. This is the best thing I’ve come up with so far anyway.

Set a float variable and plug it in to the play rate of every animation that would be involved with your Animation…default 1 of course…when you hit the skip button set it to some obscene number like 999999999999999 and it should end the cutscene…

I haven’t tried this (I’m not on Cutscenes yet) but if memory serves this is how the good ol’ Dungeon Defense did it in their code from UDK…

President, that’s an interesting idea. Some animations play in reverse though so I’ll have to set it up so those get set to 0 instead. I’ll mess around with it.