Meet Your Island’s Cast: The Subjects Panel
Tutorial beginner compiles

Meet Your Island’s Cast: The Subjects Panel

Updated beginner Code verified

Meet Your Island's Cast: The Subjects Panel

Have you ever watched a movie and wondered how the characters move so smoothly? Or how a robot knows exactly which arm to wave? In Fortnite islands, we use a special tool called the Subjects Panel to tell our characters what to do. It is like a director's clipboard for your game!

Today, we will learn how to pick a character or object and give it a simple animation. You will make a door open when a player walks near it. This is a super useful trick for making your island feel alive.

What You'll Learn

  • What a Subject is in UEFN.
  • How to find and select your characters in the Subjects Panel.
  • How to connect a character to a simple animation event.

How It Works

Imagine you are building a Lego castle. You have many pieces. Some are walls. Some are little people. To move a specific Lego person, you have to pick them up first, right? You can't just shout at the whole castle!

In UEFN, the Subjects Panel is your way of picking up those "Lego pieces."

A Subject is just a fancy word for any character, prop, or object in your game that can move or change. When you want to make a door swing open, you must tell the computer which door. The Subjects Panel lists every single movable thing in your level.

Think of it like a playlist on your music player. If you want to play your favorite song, you click on it. If you want to animate your door, you click on the door in the Subjects Panel.

Here is the big secret: You cannot animate something if you haven't selected it as a Subject first. It's like trying to drive a car that isn't in the garage!

Let's Build It

We are going to make a simple "Open Door" effect. We will use a Prop Mover. This is a device that moves objects. We will tell the Prop Mover to move the door only when a player touches it.

First, you need to have a door or a box in your island. Let's assume you placed a simple box that looks like a door.

Here is the Verse code to make it work. Don't worry if it looks like magic. We will break it down line by line.

# This is our special door device.
# It knows how to move things.
using { /Fortnite.com/Devices }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Verse.org/Simulation }

# We create a new script called "OpenDoorScript"
# This is the brain of our door.
OpenDoorScript := class(creative_device):

    # This is the Prop Mover device we want to use.
    # We will pick this from the Subjects Panel later!
    @editable
    Door : prop_mover_device = prop_mover_device{}

    # This runs when the game starts.
    OnBegin<override>()<suspends> : void =
        # We wait for a player to get close.
        # This is like waiting for a friend to tie their shoes.
        # Subscribe to the trigger so we know when to open the door.
        Door.BeganEvent.Subscribe(OnDoorTriggered)

    # This runs when the Prop Mover's BeganEvent fires.
    # We call this an "Event."
    OnDoorTriggered() : void =
        # Tell the Prop Mover to begin moving to its target position.
        # The target position is set in the editor properties.
        # This opens the door!
        Door.Begin()```

### Walkthrough of the Code

1.  **`using { /Fortnite.com/Devices }`**: This tells Verse, "I want to use special Fortnite tools." It's like saying, "I want to use Legos."
2.  **`Door : prop_mover_device`**: This creates a placeholder for our Prop Mover device. The `@editable` tag means it will show up as a slot in the editor so we can drag our device into it.
3.  **`OnBegin`**: This is the start of the game. We subscribe to the `MoveToBeginEvent` so our code knows when the Prop Mover is triggered.
4.  **`OnDoorTriggered`**: This is the fun part! This function fires when the Prop Mover's movement begins. We call `Door.MoveTo()` to tell it to move to its configured target position.

### How to Connect the Code to Your Island

1.  Place a **Prop Mover Device** in your level.
2.  Place your door prop near it.
3.  Open the **Properties Panel** for the Prop Mover.
4.  Look for the **Verse Script** section. Drag your `OpenDoorScript` into the slot.
5.  Now, look at the **Subjects Panel** (usually on the right side of your screen).
6.  Find your door in the list.
7.  Drag the door from the Subjects Panel into the **Door** slot in your Prop Mover's properties.

Now, when you play, the door will open when you touch it!

## Try It Yourself

Can you make the door close again?

**Hint:** You can add another line of code inside the `OnDoorTriggered` function. Instead of calling `MoveTo()`, try calling `Door.MoveBack()`. This will tell the Prop Mover to reverse the door back to its starting position!

## Recap

*   The **Subjects Panel** helps you pick which character or object you want to control.
*   A **Subject** is any movable thing in your game.
*   You must link your code to a Subject in the editor to make it work.
*   Events like `MoveToBeginEvent` let your code react to things happening in the game world.

Great job! You just gave your island a brain. Keep building!

## References

- https://dev.epicgames.com/documentation/en-us/uefn/using-live-link-hub-in-unreal-editor-for-fortnite
- https://dev.epicgames.com/documentation/en-us/uefn/using-livelink-hub-in-unreal-editor-for-fortnite
- https://dev.epicgames.com/documentation/en-us/fortnite/using-livelink-hub-in-unreal-editor-for-fortnite
- https://dev.epicgames.com/documentation/en-us/uefn/ui-widget-editor-in-unreal-editor-for-fortnite
- https://dev.epicgames.com/documentation/en-us/fortnite/ui-widget-editor-in-unreal-editor-for-fortnite

Verse source files

Turn this into a guided course

Add Subjects Panel 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