We are going to explain the Level Sequence Director Blueprint with the assumption that you understand what Delegates in C++ are, so if you don’t understand them you’re probably not going to follow this tutorial well.
The Level Sequence Event Track(s)
What does firing off events really mean
Events in a level sequence track behave just the same as Single-Cast Delegates.
So “firing off events” in sequencer is the same as Broadcasting/Executing the delegate. Every time you add a keyframe in an events track, you’re broadcasting/executing the delegate.
This then brings us to the Level Sequence Director Blueprint.
Which hosts the callback functions that will be called when this delegate(event) is executed/broadcast.
The purpose of the level sequence director blueprint
The main purpose of the Level Sequence Director Blueprint is to host and define the callback functions that will be bound and run to the delegates(event) when the delegates are broadcast.
The Events Payload Data
“Events” keyframes have a section for “payload data” under properties when you right click the keyframe.
This payload data is the same as payloads in a c++ delegate.
Meaning the function we define in the Director Blueprint MUST match our payload data in terms of arguments, just like a C++ delegate binding function.
And it works exactly the same, the data we add as payload data will get passed to our functions in the Director BP.
Level Sequence Player Reference
The director BP class already contains a reference to the ULevelSequencePlayer that’s playing the level sequence.
This means you can already query data like current playtime, the Level Sequence Tracks, etc.. right within the Director Blueprint.
Use Case Examples of the Director BP
You can either use the Director BP to respond to event tracks OR respond to pre-existing ULevelSequencePlayer Delegates.
- Create an event at the 0 time, and when that event is called bind another function to LevelSequencePlayer delegates.
- Create an event that passes the current actors in the world , where you can query their location or other variables. This is mostly useful for spawnables as they only exist within the Level Sequence. The actors can be passed as payload data.
- Create events that switch the current Animation blueprint of the actor in the level Sequence at different times of playbacks. The anime bp can also be passed in as payload data.
- Create events that modify spawnable variables and more… possibilities are endless.