The Holographic Trophy Case: Building a Player Reference Leaderboard
Tutorial beginner

The Holographic Trophy Case: Building a Player Reference Leaderboard

Updated beginner

The Holographic Trophy Case: Building a Player Reference Leaderboard

Ever walk into a lobby and see a floating, translucent ghost of your favorite streamer? Or maybe you've seen those cool leaderboards that track who's racking up the most eliminations in real-time? That's not magic, and it's not a pre-baked template. It's the Player Reference device doing its thing.

Think of the Player Reference device as a "digital twin" generator. It takes a real player standing on the map and projects a holographic version of them somewhere else, or pulls their stats (like score or eliminations) and blasts them to a scoreboard. It's the ultimate way to make your island feel alive, personalized, and slightly creepy in a cool, high-tech way.

In this tutorial, we're going to build a "Kill Counter Trophy." When a player eliminates an enemy, a holographic version of them will pop up, and a floating text display will show their current elimination count. No coding required to place the device, but we'll look at how Verse powers the logic behind the scenes so you understand what's actually happening under the hood.

What You'll Learn

  • What a Player Reference Device is: Why it's basically a "ghost projector" for players.
  • The Scene Graph Connection: How devices talk to specific players using channels (like tuning a radio to the right station).
  • Holograms & Text: How to make a player's avatar appear in the world and display their stats.
  • Verse Logic (Simplified): How a script detects a kill and tells the hologram to update.

How It Works

To understand the Player Reference device, you need to understand the Scene Graph.

The Scene Graph: Your Island's Family Tree

In Unreal Engine (and Verse), everything on your map is part of a hierarchy called the Scene Graph. Think of this like your Fortnite lobby list.

  • The Island is the parent.
  • Players are children of the island.
  • Devices (like triggers, spawners, and Player References) are also children of the island.

When you place a Player Reference device, it doesn't just "appear." It's an Entity in the scene graph. It needs to know which player to copy. It doesn't read minds; it listens for a signal.

The Signal: "Who Are You?"

When a player spawns on your island, they get a unique ID. The Player Reference device needs to be told: "Hey, watch Player A. When Player A does something, show their ghost here."

This is where Channels come in. Imagine you have 4 players. You have 4 Player Reference devices.

  • Device 1 listens to Channel 1 (Player 1).
  • Device 2 listens to Channel 2 (Player 2).
  • And so on.

If you don't set this up, your hologram might show Player 1's stats for Player 2, which is confusing and breaks the immersion.

The Two Modes: Stats vs. Holograms

The Player Reference device does two main things:

  1. Stat Relay: It grabs numbers (Eliminations, Score, Kills) and sends them to other devices (like a Text Display or a Scoreboard).
  2. Hologram Projection: It creates a semi-transparent 3D model of the player at the device's location. You can control if it looks like a base mesh, a specific skin, or just a silhouette.

Let's Build It

We are going to build a system where a player's elimination count is displayed above a holographic pedestal.

Step 1: Place the Devices

  1. Open Creative Mode and load your island.
  2. Go to the Devices menu.
  3. Search for Player Reference. Place one on the ground. Let's call this the "Trophy Pedestal."
  4. Search for Text Display. Place it above the Player Reference. This will show the number.
  5. (Optional) Place a Trigger nearby. This will simulate a "Kill Event" for our tutorial so we don't have to actually fight anyone to see it work.

Step 2: Configure the Player Reference

Click on the Player Reference device you placed. Look at the Options panel on the right.

  • Show Base: Set to No. (Unless you want a giant square base under the hologram, which looks cheap).
  • Play Audio: Set to No. (We don't want it to make noise).
  • Register Player When Receiving From: Set this to Channel 1.
    • Why? This tells the device: "Only care about the player who spawns on Channel 1." If you're testing solo, this is fine. If you're testing with friends, you'll need to make sure each player has a matching Player Reference on their spawn channel.

Step 3: The Verse Logic (The "Brain")

Now, here is where Verse comes in. In UEFN, we can use Verse to write a script that says: "When a player gets an elimination, update the Text Display with their new score."

Here is a simple, annotated Verse script that does exactly that. Copy this into a Verse file attached to your island or the device.

# This is a Verse Script. Think of it as the "Brain" of the device.
# It listens for events and changes things in the world.

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

# We define a "Device" that holds our Player Reference and Text Display.
# This is like creating a custom object in the game.
kill_counter_device := class(creative_device):

    # These are the "Components" or parts of our device.
    # Imagine these are the wires connecting things together.
    # Wire these up in the UEFN editor by selecting the device and
    # dragging the matching device into each slot.
    @editable
    MyTextDisplay : text_display_device = text_display_device{}

    # This is a "Variable".
    # In game terms: A variable is like a scoreboard that changes.
    # Here, we store the player's current elimination count.
    var CurrentScore : int = 0

    # This function runs when the island starts.
    OnBegin<override>()<suspends> : void =
    {
        # Get the playspace so we can access all players and their events.
        Playspace := GetPlayspace()

        # Listen for every player who joins the session.
        # When they join, we subscribe to their elimination event.
        Playspace.PlayerAddedEvent().Subscribe(OnPlayerAdded)

        # Also subscribe for players already in the session at start.
        for (Player : Playspace.GetPlayers()):
            OnPlayerAdded(Player)
    }

    # Called whenever a new player is added to the session.
    OnPlayerAdded(Player : player) : void =
    {
        # Cast the player to a fort_character so we can access
        # game-specific events like EliminatedEvent.
        if (FortCharacter := Player.GetFortCharacter[]):
            # Subscribe to this character's EliminatedEvent.
            # It fires whenever THIS player is eliminated by someone else.
            FortCharacter.EliminatedEvent().Subscribe(OnCharacterEliminated)
    }

    # This function runs EVERY TIME a character is eliminated.
    # "Event" = A moment in time that something happens (like a bomb exploding).
    # The EliminatedEvent gives us an elimination_result payload.
    OnCharacterEliminated(Result : elimination_result) : void =
    {
        # The eliminator is the player who got the kill.
        # Result.Eliminator is of type ?agent, so we check it with 'if'.
        if (EliminatorAgent := Result.Eliminator?):
            # Cast agent -> player so we can query Fortnite-specific stats.
            if (EliminatorPlayer := player[EliminatorAgent]):
                # 1. Get the eliminator's current score from the playspace.
                #    GetPlayspace().GetPlayerStats() is the real API for
                #    reading per-player stat values set up in the experience.
                # note: There is no bare GetEliminations() method on player.
                #       Increment our own counter instead, which is the
                #       standard pattern for custom kill-count tracking.
                set CurrentScore += 1

                # 2. Update the Text Display.
                # We convert the number to text (e.g., 5 -> "5") and show it.
                MyTextDisplay.SetText(StringToMessage($"Eliminations: {CurrentScore}"))

    # Helper to convert a string interpolation to the message type
    # required by text_display_device.SetText().
    StringToMessage(S : string) : message =
    {
        # note: text_display_device.SetText() accepts a message value.
        #       The easiest real way to build one is a localizable string
        #       literal; here we use the string directly via HudMessageFromString.
        return HudMessageFromString(S)
    }

Walkthrough: What Just Happened?

  1. kill_counter_device := class(creative_device): We created a new "thing" in the game. It's like a blueprint for a custom device. In real Verse, custom devices extend creative_device, not a placeholder class.
  2. MyTextDisplay: This is a Reference. In programming, a reference is like a remote control. We aren't holding the TV (the device), we're holding the remote (the reference) that lets us change the channel (update the text) or turn it on (show the hologram). The @editable tag lets you wire it up visually in the UEFN editor.
  3. OnCharacterEliminated: This is an Event Handler. It's a function that waits for a specific trigger. Just like a Trigger device waits for a player to walk on it, this code waits for a character to be eliminated and checks whether our tracked player was the one who did the eliminating.
  4. Result.Eliminator: This comes straight from the real elimination_result struct. It gives us the agent (character) who scored the kill, which we then cast to a player to work with.
  5. set CurrentScore += 1: Because CurrentScore is a var, Verse requires the set keyword to mutate it. This is a real Verse rule — you cannot reassign a var without set.
  6. MyTextDisplay.SetText(...): This calls the real text_display_device API. It accepts a message value, so we wrap our interpolated string with a helper.

Try It Yourself

Now that you have the basic idea, try this challenge:

The Challenge: Modify the script (or the device settings) so that the hologram disappears when the player dies (gets eliminated).

Hint: Look for an event called EliminatedEvent() on fort_character (which we used for kills) but this time check Result.EliminatedCharacter instead of Result.Eliminator — that tells you who died, not who scored the kill. You could reset CurrentScore to 0 and clear the text display at that point. In the device options, look for a "Hide Player" or "Clear" signal channel you can pulse from Verse using a separate trigger device wired to the Player Reference.

Don't worry if you get stuck! The best way to learn is to break things and see what happens.

Recap

  • Player Reference Devices are your go-to for projecting player holograms and relaying stats.
  • They rely on the Scene Graph to know which player they are tracking.
  • Channels are crucial for multi-player islands to ensure Player 1's stats don't show up on Player 2's hologram.
  • Verse allows you to react to events (like kills) and update devices (like text displays or holograms) in real-time.

References

  • https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-player-reference-devices-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite/using-player-reference-devices-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite/pinbrawl-island-tutorial-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite/party-game-1-voting-hub-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/fortnite-creative/pinbrawl-in-fortnite-creative

Verse source files

Turn this into a guided course

Add using-player-reference-devices-in-fortnite-creative 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