Playing a sequence

Hi Unrealers,

Do you know how to play an animation level sequence from inside an actor blueprint? I can’t make a reference to the sequence from the actor blueprint like you can do inside the level blueprint.

Anyone knows how to?:rolleyes::rolleyes:

You can’t access the level blueprint or its contents from anywhere. No exception, no casting, no dispatchers, nothing.

The cheap trick if you still insist:

Make a custom game mode if you haven’t got one yet. Like “MySuperGameMode”. Keep a variable like “PlayMySuperAnimation” in the game mode. Boolean - Default false. Make a function “GetPlayMySuperAnimation” and add a return node with the state of the variable. Also a “SetPlayMySuperAnimation” to set that variable.

Now from your actor blueprint you cast to MySuperGameMode (With a GetGameMode node for reference) and call “SetPlayMySuperAnimation” to true.

Now in your level blueprint tick event you also cast to mySuperGameMode and call “getPlayMySuperAnimation” and if it’s true fire your animation and set the variable to false again.

Very dirty and try to avoid “on tick” events and avoid using level BP too much.

Another quick solution that I believe would work.

That’s not exactly true. Level BP picks up dispatchers from other BPs (I’m pretty sure this
was working on at least 4.17, definitely on 4.18 and later).

Here I’ve got the event bound in the level BP.

And call the dispatcher in my Player_Character BP from the event graph of a widget component (on the Player_Character BP).

Thanks all for the replies