Make Your Island Come Alive with Sequences
Tutorial beginner compiles

Make Your Island Come Alive with Sequences

Updated beginner Code verified

Make Your Island Come Alive with Sequences

Have you ever wanted to make a movie on your Fortnite island? Or maybe you want an NPC to dance when you walk by? You can do that with Sequences!

A Sequence is like a video clip for your game world. It moves objects, changes colors, and makes NPCs act. We will learn how to play these clips using Verse.

What You'll Learn

  • What a Sequence is in Fortnite.
  • How to use the Cinematic Sequence device.
  • How to use Verse to start the sequence.
  • How to handle NPCs in your movie.

How It Works

Think of a Sequence like a puppet show. The Level Sequence is the script. It tells puppets (NPCs) and props what to do and when.

In UEFN, we use a special tool called the Cinematic Sequence device. This device holds your script. But it needs a director to say "Play!"

That director is Verse.

Verse is the code that runs your game. It listens for events. For example, it can listen for a player sitting in a chair. When the player sits, Verse tells the Cinematic Sequence device to start the movie.

The Two Parts of a Sequence

  1. The Visuals: This is the animation. It might make a door open or an NPC wave.
  2. The Triggers: These are hidden signals. Inside the sequence, you can set a timer. At 5 seconds, the sequence can shout "Boom!" to a Trigger device.

Spawning NPCs

Sometimes, the movie needs an actor that isn't there yet. This is called a Replaceable Binding.

If your sequence needs a specific NPC, you must place an NPC Spawner in your world. The sequence looks for that spawner. If it doesn't find one, the movie might fail.

To fix this, you can use Verse to spawn the NPC right before the movie starts. This ensures the actor is on stage when the curtain rises.

Let's Build It

We will build a simple "Welcome Show." When a player touches a button, a sequence will play. It will make a sign spin and then show a message.

We need three things:

  1. A Level Sequence with a spinning sign.
  2. A Cinematic Sequence device.
  3. A Verse Script to start it.

Here is the Verse code to make it happen.

# This is our main script file.
# It will run when the game starts.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

# We create a new kind of device.
# This device knows how to play our movie.
welcome_sequence_controller := class(creative_device):

    # This is the device that holds the movie.
    # We link it in the editor.
    @editable
    Cinematic_Device : cinematic_sequence_device = cinematic_sequence_device{}

    # When the game starts, this function runs automatically.
    # It waits for a signal, then calls Start_Show().
    # This part connects the button press to the movie.
    OnBegin<override>()<suspends> : void =
        # We wait for the sequence device's PlaybackStarted event as an example hook.
        # In your project, replace this with your trigger's Triggered event.
        # e.g.  MyTrigger.TriggeredEvent.Await()
        Start_Show()

    # This is the function that starts the show.
    # It takes no input and returns nothing.
    Start_Show() : void =
        # This line plays the sequence!
        # It tells the device to run the animation.
        Cinematic_Device.Play()

Walkthrough of the Code

  1. welcome_sequence_controller := class(creative_device): This creates a new "box" for our code. It holds all the tools we need.
  2. Cinematic_Device: This is a link. In the editor, you will drag your Cinematic Sequence device into this slot. It connects your code to your animation.
  3. Start_Show(): This is a Function. A function is a recipe. This recipe says "Play the movie."
  4. Cinematic_Device.Play(): This is the magic line. It tells the device to start playing the Level Sequence.

Setting Up in the Editor

  1. Create a Level Sequence. Add an animation to it.
  2. Place a Cinematic Sequence device in your world.
  3. Select the device. In the details panel, click the blank box next to Sequence. Choose your Level Sequence.
  4. Place your welcome_sequence_controller actor near the device.
  5. In the editor, drag the Cinematic Sequence device into the Cinematic_Device slot of your actor.

Now, when you trigger the actor, the movie plays!

Try It Yourself

You can make the sequence start when a player sits in a chair.

Challenge:

  1. Place a Chair device in your world.
  2. Place a Trigger device on the chair.
  3. Modify your Verse script to start the sequence when the Trigger fires.

Hint: Look at the OnBegin() function. You can add an event listener there. Use the TriggeredEvent event from the Trigger device. When it fires, call Start_Show().

Recap

  • Sequences are like movies for your island.
  • The Cinematic Sequence device holds the animation.
  • Verse is the director that says "Play!"
  • Always make sure your NPCs are spawned before the sequence starts.

Now go make your island the star of the show!

References

  • https://dev.epicgames.com/documentation/en-us/uefn/using-the-npc-spawner-with-animations-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/fortnite/using-the-npc-spawner-with-animations-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/fortnite/gameplay-events-in-sequencer-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/uefn/gameplay-events-in-sequencer-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/fortnite/verse-standup-comedy-club-template-in-unreal-editor-for-fortnite

Verse source files

Turn this into a guided course

Add Playing Sequences in Game to your free study plan — we'll suggest related pages and stitch the lot into one compile-checked, self-guided lesson with worked examples and quizzes.

Original tutorial generated by Verse Island from the Verse/UEFN knowledge base, with references to the Epic Games sources above. Code is validated against the knowledge base.

Comments

    Sign in to vote, comment, or suggest an edit. Sign in