Say Hello to Your Players with Verse
Tutorial beginner

Say Hello to Your Players with Verse

Updated beginner

Say Hello to Your Players with Verse

Welcome, future game creator! Have you ever played a game and wondered how the screen tells you what to do? Maybe it says "You are on Team Blue" or "Start the timer now." That is a HUD message.

The HUD (Heads-Up Display) is the information on your screen. It helps players without stopping the action. In this tutorial, you will learn how to make your own messages. You will use Verse to talk to your players. Let’s build something cool!

What You'll Learn

  • What a HUD message is and why it is useful.
  • How to place a HUD Message Device in UEFN.
  • How to write simple Verse code to show a message.
  • How to customize the Text Style for your message.

How It Works

Imagine you are playing a game of hide-and-seek. You need to know if you are the hider or the seeker. A sign would be too slow. A shout might be missed. But a message on your screen is perfect!

In Fortnite Creative, we use a special tool called the HUD Message Device. Think of it like a digital sticky note. It sticks to the player’s screen.

Here is how it works in three steps:

  1. Place the Device: You put the device in your level. It is like setting up a speaker.
  2. Set the Message: You type the words you want to show. You also pick the color.
  3. Trigger with Verse: Verse is the brain. It tells the device when to show the message.

We will use a simple game idea. Imagine a game where players join a team. When they join, they see a welcome message. This helps them feel ready to play.

diagram

Place the device, set its message in the editor, then let Verse decide when to Trigger it.

Let's Build It

We will create a simple Verse script. This script will make a message appear when a player starts the game.

First, open Unreal Editor for Fortnite (UEFN).

  1. Go to the Devices tab.
  2. Search for HUD Message.
  3. Drag one into your level.
  4. In the details panel, set the Message to "Welcome to My Game!"
  5. Set the Text Style to Bold Green.

Now, let’s add the Verse code. We need a Script Device. This is the brain that runs our code.

  1. Add a Script Device to your level.
  2. Click Edit Script.
  3. Paste the code below into the editor.
# This is a simple Verse script
# It shows a message to the player

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

# This is the main script block
# It runs when the game starts
@editor_only
Edit := class:
    # This connects our code to the HUD device
    # We call it 'welcome_message'
    welcome_message: HudMessageDevice = ""

    # This function runs when the game begins
    OnBegin<override>()<suspends>: void =
        # This line tells the device to show the message
        # The device will show it to everyone
        welcome_message.Trigger()

    # This is needed for the script to work properly
    OnEnd<override>(): void =
        # Nothing to do here for now
        pass```

### Walkthrough of the Code

Lets look at the important parts.

*   `@editor_only`: This tells Verse to only run this code in the editor. It helps us test things.
*   `Edit := struct:`: This is a list of settings. It is like a menu for your script.
*   `welcome_message: HudMessageDevice = ""`: This creates a slot. You will drag your HUD device into this slot in UEFN. It connects the code to the device.
*   `OnBegin<override>()`: This is an **event**. It means "When the game begins, do this." It is like a starting gun.
*   `welcome_message.Trigger()`: This is the **action**. It tells the specific HUD device to show its message.

When you play the level, the game starts. The `OnBegin` event fires. Verse calls `Trigger()`. The message pops up on your screen!

## Try It Yourself

You did it! You made a message appear. Now, lets make it more fun.

**Challenge:** Change the message to say "Team Red Wins!" and change the color to **Bold Red**.

**Hint:**
1.  Find the **HUD Message Device** in your level.
2.  Click on it in the viewport.
3.  Look at the **Details** panel on the right.
4.  Change the **Message** text.
5.  Change the **Text Style** dropdown.
6.  Play the level to see your change!

## Recap

You learned how to talk to players using Verse. You placed a **HUD Message Device**. You wrote a simple script to trigger it. This is a great first step. You can now give players instructions and feedback. Keep experimenting with different colors and words. Your game is coming to life!

## References

*   https://dev.epicgames.com/documentation/en-us/uefn/verse-prop-hunt-template-9-configuring-the-informative-devices-in-unreal-editor-for-fortnite
*   https://dev.epicgames.com/documentation/en-us/fortnite-creative/tug-of-war-in-fortnite-creative
*   https://dev.epicgames.com/documentation/en-us/fortnite/tug-of-war-in-fortnite-creative
*   https://dev.epicgames.com/documentation/en-us/fortnite-creative/onboarding-players-in-fortnite-creative
*   https://dev.epicgames.com/documentation/en-us/fortnite/onboarding-players-in-fortnite-creative

Verse source files

Turn this into a guided course

Add Using the HUD message device to talk to players 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