The Great Prop Hunt: How to Expose Hiding Players with Verse
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
IsPlayerPropto 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-Maticdevice 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
- Trigger: A player presses a button (or a timer fires).
- Check: We loop through all players (Agents) on the island.
- Verify: We use the
IsPlayerPropcheck to see if they are hiding. - Action: If they are hiding, we call
PingPlayerPropon 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
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 aPropOMaticDeviceis.class RevealBrain extends GameScript(): We are creating a new "Entity" calledRevealBrain. It inherits fromGameScript, which means it can run logic when the game starts.PropOMatic: PropOMaticDevice: This is a Variable. Variables are containers that hold data. Here, we are creating a container namedPropOMaticthat 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.GetAgents(): This function returns a list of all players. Imagine it’s a roll call in class.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.PropOMatic.IsPlayerProp(agent): This is the Condition. It returnstrueif the player is a prop,falseotherwise.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:
- Get all agents.
- Filter the list to only include agents who are currently props.
- Pick one random player from that filtered list.
- 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
- 01-fragment.verse · fragment
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.
References
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.