Make Your Island Play a Video!
Tutorial beginner

Make Your Island Play a Video!

Updated beginner

Make Your Island Play a Video!

Do you want to show a cool music video on your Fortnite island? You can do it! We will build a simple screen that plays a video. It is like putting a TV in your game world.

What You'll Learn

  • How to place a Video Player device.
  • How to pick a video to show.
  • How to make the video start automatically.
  • How to use Verse to control the screen.

How It Works

Think of a Video Player like a digital TV. You put it on a wall. You give it a channel. Then you tell it when to turn on.

In Fortnite Creative, you can place these players anywhere. They can be small or big. They can be on walls or floating in the air.

There is one rule. Only one video can play at a time. It is like one radio station. If you start a new video, the old one stops.

We will use Verse to make this easy. Verse is the code language for Fortnite. We will write a few lines of code. This code will find our Video Player. It will tell it to play a specific video.

Let's build a mini concert stage!

Let's Build It

We will make a stage. It will have a screen. When you step on a button, the video plays.

Step 1: Place Your Devices

  1. Open the Creative inventory.
  2. Find the Video Player device.
  3. Place it on a wall. Make it face the center of your island.
  4. Find a Trigger Volume (or a simple button). Place it near the screen.
  5. Find a Switch device. Place it next to the trigger.

Step 2: Connect Them

We need to tell the devices how to talk.

  1. Click the Switch.
  2. Go to its Settings.
  3. Set Interact Time to "Do Not Interact". This keeps it safe.
  4. Set Turn On When Receiving From to "Channel 1".

Now the Switch is ready. It waits for a signal.

Step 3: Write the Verse Code

We will write a script. This script will find the Switch. It will listen for a click. Then it will tell the Video Player to play.

Copy this code into your Verse file.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

# This is our main script.
# It connects to the world and controls our devices.
concert_manager := class(creative_device):

    # We need to find our devices.
    # Drag and drop your devices onto these properties
    # in the UEFN editor to connect them.
    @editable
    MySwitch : switch_device = switch_device{}

    @editable
    MyVideo : video_player_device = video_player_device{}

    # This function runs when the game starts.
    # It sets up the connections.
    OnBegin<override>()<suspends> : void =
        # We tell the switch to listen.
        # When a player turns it on, it calls 'PlayVideo'.
        MySwitch.TurnedOnEvent.Subscribe(OnSwitchActivated)

    # This function runs when the switch is flipped.
    OnSwitchActivated(Agent : agent) : void =
        # This line plays the video!
        # We use a special video ID.
        # note: SetVideoId is not available in the public Verse API;
        # the video URL/ID is configured in the video_player_device
        # editor properties. Calling Play() here starts the
        # video that was set up in the editor.
        MyVideo.Play()
        Print("Video is playing!")

What Does This Code Do?

  • using { /Fortnite.com/Devices }: This tells Verse we want to use Fortnite tools. It is like opening a toolbox.
  • concert_manager := class(creative_device): Every Verse script must live inside a creative_device class. This is the container for all our code.
  • @editable: This magic word lets you drag and drop your devices from the UEFN editor directly onto the script. No need to name them in code.
  • OnBegin<override>()<suspends> : void: This is the real Verse entry point. It runs automatically when your island starts.
  • TurnedOnEvent.Subscribe(...): This is an event on switch_device. It means "wait for the switch to be turned on." When a player flips the Switch, OnSwitchActivated runs.
  • Play(): This starts the video. Set your video ID inside the Video Player device settings in the UEFN editor before you launch.

Step 4: Test It

  1. Save your Verse file.
  2. Go back to the UEFN editor.
  3. Select your concert_manager device in the scene.
  4. In the Details panel, drag your Switch onto MySwitch and your Video Player onto MyVideo.
  5. Set your video ID in the Video Player device settings panel.
  6. Play your island!
  7. Flip the Switch.

The video should start playing on the screen!

Try It Yourself

Can you make the video stop after 10 seconds?

Hint: Look at the Video Player settings. There is a setting called Rewind When This Stream Is Loaded. Try changing it. Or, try adding a Timer device to turn it off later.

Recap

You made a working video screen! You placed a Video Player. You connected it to a Switch. You wrote Verse code to make it play. Now you can show any video on your island. Great job!

References

  • https://dev.epicgames.com/documentation/en-us/fortnite-creative/create-a-music-experience-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite/create-a-music-experience-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite/using-video-player-devices-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-video-player-devices-in-fortnite-creative
  • https://dev.epicgames.com/documentation/fortnite/verse-api/fortnitedotcom/devices/video_player_device

Verse source files

Turn this into a guided course

Add Video Player 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