Skip to content

Cutscenes

It's pretty common to want to run a cutscene during dialogue. In Unreal these are called Level Sequences.

You can trigger level sequences from dialogue, wait for them to finish, and also wait for notifications from them in order to continue the dialogue and otherwise synchronise with them.

Starting a Level Sequence

To start running a level sequence using the default options:

[event SequenceStart `SequenceName`]

`SequenceName` refers to the sequence to start; so that you don't need to reference assets in your script this is abstracted as a name, and resolved to an asset by any Participant which implements the ISudsProSequenceProvider interface.

Luckily, if you're using BP_SudsProDialogueRunner to run your dialogue, it does this for you based on a list of sequences you give it:

Dialogue runner sequence list

There are other, optional arguments that you can provide:

Argument Default Description
SequenceName None (required) The name of the sequence to start
HidePlayer false Whether to hide the player character while the cutscene is playing
SuppressDefaultCuts true Set to false to allow default camera shot cuts to occur during cutscene

SuppressDefaultCuts is true by default, so that when you're running a sequence and a character speaks, it doesn't cut away to their default camera shot; it stays with
whatever camera shot the cutscene is using.

If you wanted to hide the player while the cutscene is playing, you could do this:

[event SequenceStart `Intro`, true]

This might be useful if you want to replace the character with a sequence spawned version that you manipulate for the purposes of the cutscene.

Making a cutscene pause & wait for dialogue

Sometimes you want a level sequence to pause until the player has advanced through some dialogue. You don't know how fast people read, and you don't want to move the cutscene on until they're ready, because the text relates to what's on-screen.

To do this you first have to put the pause point into the level sequence:

  1. Add an event track to your sequence
  2. Add a key at the time where you want the (potential) pause point to occur
  3. Double-click this key and call the "Pause Dialogue Sequence" helper function (it helps to rename the event too):

Pause sequence

This means the cutscene will pause at this point, until you tell it to resume in the dialogue script, like this:

[event SequenceResume]

This will resume the cutscene from where it paused, meaning you can make sure you don't play a part of the cutscene until your dialogue is ready for it.

If the SequenceResume event is called before the "Pause Dialogue Sequence", then no pause will occur and the cutscene will just keep running.

Making dialogue wait for a cutscene

The former section describes making your cutscene wait for the dialogue, but you may also want your dialogue to wait for a point in the cutscene before continuing.

Waiting for a cutscene to end

The simplest case is just waiting for a cutscene to finish before continuing with dialogue:

[event WaitSequenceEnd]

When this event line is hit, the dialogue will not continue until the Level Sequence has completed. Unless it has already completed, in which case it will just carry on.

Waiting for a cutscene notification

If you want dialogue to wait until a specific point in the cutscene, use the WaitSequenceNotify event:

# This waits for *any* notification from the level sequence
[event WaitSequenceNotify]
# This waits for a *specific* notification name
[event WaitSequenceNotify `NotificationName`]

When dialogue hits this line, it will not continue until the Level Sequence sends a notification to the dialogue system. To do that, you need to edit your Level Sequence:

  1. Add an event track to your sequence if you haven't already
  2. Add a key at the time where you want the notification to occur
  3. Double-click this key and call the "Notify Dialogue of Sequence Event" helper function (it helps to rename the event too):

Notify sequence event

If the notification has already been sent before the WaitSequenceNotify line, then the dialogue will just continue straight through.

Combining Pause & Wait

The previous 2 sections showed how to make one side of things (cutscene or dialogue) to wait for the other side. But, this only ensures that one of the sides (cutscene or dialogue) doesn't get ahead.

You can actually combine the two in order to completely synchronise a point in the cutscene and a line of dialogue, so they happen at the same time.

Firstly we want to pause the cutscene at the correct point in its event track (much like we did before), but this time we send a notification as well:

Sequence pause and notify

And then in the dialogue script, we wait for this notification before displaying the next line of dialogue:

# The next line of dialogue won't occur until the ArrivedBack notification happens
[event WaitSequenceNotify `ArrivedBack`]
# At this point, the cutscene will have paused itself
NPC: This line is perfectly synchronised with a point in the cutscene.
# When we proceed, we resume the cutscene
[event SequenceResume]

This way, we know for sure that no matter at what speed the player advances through the dialogue, that line will be displayed exactly at the point of the cutscene that we want it to be.

Transitioning Cameras Into / Out of sequences

When you start playing a sequence with a camera cut track, you might want to smoothly transition into / out of it rather than jump cutting.

The easiest way to do this is to drive it entirely with the sequencer.

Fade into / out of sequencer

While you could use [event FadeOut] and wait for it before starting the sequence, it's much easier to allow the sequence to control it. When you have camera cuts in a sequence, you can delay the first cut, and the camera will remain as-is until that first cut. Therefore:

  1. In the dialogue script, start the sequence.
  2. In the sequence, create a camera cut track and add your camera
  3. Create a Fade track, and create a keyframe at frame 0 with a value of 0 (not faded)
  4. Create 2 more fade track keyframes, a value of 1 (faded out) at about 0.2 seconds, and another at 0.4s with value 0 (faded back in)
  5. Move the first cut of your sequencer camera to line up with the Fade Track being 1 (faded out)

This means that when the sequence starts, the camera is left alone while the fade out happens, then cuts when it's fully faded out, then fades back in again.

You can do the same at the end of the sequence, by leaving a gap at the end of the camera cuts track in your sequence (which will return to the previous camera), and doing the same fade out / fade in trick to obscure the transition.

Smooth transition in/out of sequence

If you want to smoothly move from the dialogue camera to the sequencer camera, you do this entirely within the sequencer:

  1. Add a camera cut track, and add your camera
  2. Right-click the camera cuts track, and check "Can Blend"
  3. Right-click the camera cut track again, and under Edit Section, check "Lock Previous Camera"
  4. Right-click the camera cut track again, and under Edit Section, set "When Finished" to "Keep State"
  5. Hover the camera cut track, and look for a little blue triangle at the top of the start of the camera cut. Drag it right to create a blend.
  6. Optionally right-click and in Easing Curve > Options, change the blending curve

It's quite hard to see the little triangle you need to drag, here's a gif:

Cut track blend setup

As of UE 5.2 there's a weird visual bug where the curve line doesn't get drawn if your camera cut track is aligned with the start of the sequence. You can either ignore that (it's still there), or drag your track just off the start like I've done in the GIF above while you define it, and drag it back to the start afterwards.

You can do the same at the end of the sequence as well. The camera that was active when entering the sequence is implicitly the camera to smoothly transition back to.

Of course, you could alternatively just animate the camera being used for the dialogue as well. However, this might cause some confusion between fixed camera shots and sequencer shots, so I normally don't do this.

Transitioning out of a sequence to a different camera

Camera transitions at the end of a sequence automatically return to the camera which was being used when it started. But what if you want to transition to a different camera?

By default, when a dialogue level sequence finishes playing, it pauses at the end. So if you make your sequencer camera cuts go right up to the end of the sequence, that last camera will continue to be used until you say otherwise (such as a CameraCut line, or just the DefaultCameraShot settings when a new line happens).

To transition smoothly to a different camera, you need to wait for the sequence to finish in your dialogue:

[event WaitSequenceEnd]

So, if you want to transition smoothly to an explicit camera:

[event SequenceStart `SequenceName`]
[event WaitSequenceEnd]
[event CameraTransition `ShotName`]

It's very important that you set "When Finished" to "Keep State" on the camera cut track for this to work reliably. If you don't, the view can snap back to the camera that was active when the sequence began anyway.

Or, if you want to fade out / fade in to hide a hard camera cut:

[event SequenceStart `SequenceName`]
[event WaitSequenceEnd]
[event FadeOut]
[event WaitFade]
[event CameraCut `ShotName`]
[event FadeIn]