The Great Prop Hunt: How to Expose Hiding Players with Verse
Tutorial beginner

The Great Prop Hunt: How to Expose Hiding Players with Verse

Updated beginner

The Great Prop Hunt: How to Expose Hiding Players with Verse

Ever played Prop Hunt and felt the rage of staring at a suspiciously placed barrel for forty-five seconds, knowing the enemy is inside, but having no way to prove it? You’re not alone. In this tutorial, we’re going to build a "Spotlight" system. We’ll use Verse to create a button that, when pressed, instantly highlights every player currently hiding as a prop. It’s like a radar sweep for your island, turning invisible (well, camouflaged) enemies into glowing targets.

What You'll Learn

  • The Scene Graph & Entities: Understanding how Verse sees your island as a hierarchy of objects.
  • Agents: What an "Agent" is and why it’s basically your player’s digital soul.
  • Functions: How to package a specific action (like "Ping") into a reusable command.
  • State Checking: Using IsPlayerProp to verify if someone is actually hiding before you waste your energy.

How It Works

To understand how we’ll expose the hiders, we first need to understand how Verse "sees" the game world.

The Scene Graph: Your Island’s Skeleton

Imagine your Fortnite island is a giant dollhouse. In programming, this structure is called the Scene Graph. It’s a hierarchy of Entities (the objects in your game) and Components (the properties those objects have).

  • Entity: Think of this as a specific item in your inventory or a prop on the map. The Prop-O-Matic device is an entity. The player is an entity.
  • Hierarchy: Just like folders in your computer, entities can have parents and children. The player might be the parent, and their current "skin" or "prop form" is the child component.

When we write Verse, we are talking to these entities. We don't just say "make the guy glow." We say, "Find the entity representing this specific player, check their current component status, and if they are wearing the 'Prop' skin, apply a 'Glow' effect."

Agents: The Player’s Avatar

In Verse, a player is referred to as an Agent. Don’t let the fancy name scare you. An Agent is just the digital representation of a person in the game. It’s the handle, the character model, and the inventory all wrapped into one variable.

When you see Agent in code, think "Player."

Functions: The "Do This" Button

A Function is a block of code that performs a specific task. You already use functions in Fortnite every day. Pressing a button to open a door is a function. Healing yourself is a function.

In our case, we want to create a custom function called PingPlayerProp. This function will take one Agent (a specific player) as input. It will then ask the game: "Is this player currently a prop?" If the answer is yes, it triggers a visual effect (a ping).

The Logic Flow

  1. Trigger: A player presses a button (or a timer fires).
  2. Check: We loop through all players (Agents) on the island.
  3. Verify: We use the IsPlayerProp check to see if they are hiding.
  4. Action: If they are hiding, we call PingPlayerProp on that specific Agent.

Let's Build It

We aren't just writing abstract math; we’re building a "Reveal" mechanic. This code assumes you have a Prop-O-Matic device placed in your world. We will write a script that interacts with it.

Note: In a full UEFN project, this logic usually lives inside a Verse script attached to a Game Player Start or a dedicated Manager entity. For this tutorial, we’ll focus on the Verse logic itself.

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

# This is our main script entity.
# Think of it as the "Brain" of our island.
class RevealBrain extends GameScript():
    
    # We need a reference to the Prop-O-Matic device.
    # In your actual editor, you'd drag the device into this slot.
    PropOMatic: PropOMaticDevice = PropOMaticDevice
    
    # This is the main entry point. It runs when the game starts.
    Run(): void =
        # For this demo, let's say a button press triggers this.
        # In a real build, you'd bind this to a UI button or trigger.
        # Here, we'll just call our reveal function directly.
        RevealAllHidingProps()
    
    # FUNCTION: RevealAllHidingProps
    # This function checks EVERY player on the island.
    # It's like a security camera scanning the room.
    RevealAllHidingProps(): void =
        # Get all agents (players) currently in the game.
        # This is the list of everyone alive and in the match.
        all_agents := GetAgents()
        
        # LOOP: Go through each player in the list.
        # Think of this like checking every locker in the school.
        for agent : all_agents do:
            # CHECK: Is this player currently a prop?
            # IsPlayerProp is a "predicate" - it asks a Yes/No question.
            if PropOMatic.IsPlayerProp(agent) == true:
                # ACTION: If yes, ping them!
                # This highlights them on the map and maybe plays a sound.
                PropOMatic.PingPlayerProp(agent)
                
    # OPTIONAL: A specific ping for one person (Revenge Mode!)
    # Use this if you want to target a specific cheater.
    TargetedReveal(target_player: Agent): void =
        # Check if the target is actually a prop.
        if PropOMatic.IsPlayerProp(target_player) == true:
            # Ping only that specific person.
            PropOMatic.PingPlayerProp(target_player)
        else:
            # If they aren't a prop, tell the user.
            # (You could play a "Not Found" sound here)
            print("Target is not hiding as a prop.")

Walkthrough of the Code

  1. using { /Fortnite.com/Devices }: This is like loading the "Game Mechanics" DLC. It tells Verse, "Hey, I want to use Fortnite-specific devices like the Prop-O-Matic." Without this, Verse wouldn't know what a PropOMaticDevice is.
  2. class RevealBrain extends GameScript(): We are creating a new "Entity" called RevealBrain. It inherits from GameScript, which means it can run logic when the game starts.
  3. PropOMatic: PropOMaticDevice: This is a Variable. Variables are containers that hold data. Here, we are creating a container named PropOMatic that will hold the reference to the actual device in your map. In UEFN, you would drag the device from your scene into this variable slot in the Details panel.
  4. GetAgents(): This function returns a list of all players. Imagine it’s a roll call in class.
  5. for agent : all_agents do:: This is a Loop. It takes the first player, does the check, then takes the second player, does the check, and so on, until everyone has been checked.
  6. PropOMatic.IsPlayerProp(agent): This is the Condition. It returns true if the player is a prop, false otherwise.
  7. PropOMatic.PingPlayerProp(agent): This is the Action. It tells the device to send out a ping signal specifically to that agent.

Try It Yourself

You’ve got the logic down. Now, let’s make it interactive.

Challenge: Modify the RevealAllHidingProps function. Instead of revealing everyone at once, create a new function called RevealRandomProp. This function should:

  1. Get all agents.
  2. Filter the list to only include agents who are currently props.
  3. Pick one random player from that filtered list.
  4. Ping only that one player.

Hint: You’ll need to look up how to filter a list or pick a random element from a list in Verse. If you get stuck, think about how you’d pick a random card from a deck of cards.

Recap

  • Scene Graph: The hierarchical structure of your game world (Entities and Components).
  • Agent: The Verse term for a player.
  • Functions: Reusable blocks of code that perform actions, like PingPlayerProp.
  • Logic: We used a loop to check every player, a condition to see if they were a prop, and an action to highlight them.

Now go forth and expose those barrel-hiding snipers. The scene graph is your playground, and Verse is your wrench.

References

  • https://dev.epicgames.com/documentation/fortnite/verse-api/fortnitedotcom/devices/prop_o_matic_manager_device/pingplayerprops
  • https://dev.epicgames.com/documentation/en-us/fortnite/verse-api/fortnitedotcom/devices/prop_o_matic_manager_device/pingplayerprops
  • https://dev.epicgames.com/documentation/fortnite/verse-api/fortnitedotcom/devices/prop_o_matic_manager_device/pingplayerprop
  • https://dev.epicgames.com/documentation/en-us/fortnite/verse-api/fortnitedotcom/devices/prop_o_matic_manager_device/pingplayerprop
  • https://dev.epicgames.com/documentation/en-us/fortnite/26-00-release-notes-in-unreal-editor-for-fortnite

Verse source files

Turn this into a guided course

Add pingplayerprop 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