The "Gotcha!" Button: Mastering Prop Pings in Verse
The "Gotcha!" Button: Mastering Prop Pings in Verse
So you’ve built a slick Hide-and-Seek map. Players are hiding as milk crates, vending machines, and suspiciously realistic rocks. But here’s the problem: the game isn’t telling them where those rocks are. The seekers are wandering around blind, and the hiders are having too much fun. It’s not a game; it’s a meditation session.
Enter the Prop O’Matic Manager. Specifically, its ability to send out a "ping" — that little radar blip that tells seekers exactly where a hidden player is. In Verse, we call this PingPlayerProps. It’s the digital equivalent of shining a flashlight into a dark closet. By the end of this tutorial, you’ll be able to build a "Reveal Button" that instantly exposes every hider on the map, turning your stealth game into a chaotic free-for-all.
What You'll Learn
- The Scene Graph Basics: How devices talk to players (Agents) in the game world.
- Functions as Actions: Understanding how to trigger a specific game event with a single line of code.
- The "Ping" Mechanic: How to manually trigger a radar blip for hidden players using Verse.
- Building a Chaos Button: Putting it all together into a playable, interactive device.
How It Works
Before we write code, let’s translate the tech into Fortnite terms.
1. The "Agent" (The Player)
In programming, an Agent is just the fancy word for "the player." Think of it like your character in the lobby. When you pick up a shield potion, the game doesn’t just heal "everyone"; it heals you, the specific agent holding the potion. In Verse, we need to know which agent we’re talking to.
2. The Device (The Brain)
A Device is any object in your island that has code attached to it — like a Button, a Timer, or a Prop O’Matic Manager. Think of the Device as the Game Master. It doesn’t play the game; it controls the rules. The Prop O’Matic Manager is the specific Game Master for Hide-and-Seek mechanics.
3. The Function (The Command)
A Function is a block of code that does a specific job. Imagine a Med Mist. You don’t have to aim it perfectly; you just stand in it, and it heals you. The Med Mist is the function. In our case, PingPlayerProps is a function that says: "Hey, everyone currently hiding as a prop? Flash a little blip on everyone’s radar."
4. The Scene Graph (The Family Tree)
This is the most important concept for UE6/Verse. Your island is a hierarchy.
- The Island is the root.
- The Prop O’Matic Manager is a child of the Island.
- The Button is another child.
- The Players (Agents) are entities within that world.
When you write code, you are essentially giving instructions to these entities. You’re telling the Button: "When I press you, talk to the Manager, and tell it to ping the Agents."
Let's Build It
We are going to build a "Chaos Button." When a player presses this button, every single player hiding as a prop will get a temporary ping on the radar. It’s perfect for a "Power-Up" item or a map-wide event.
Step 1: The Setup
- Open UEFN and create a new Island.
- Place a Prop O’Matic Manager device. (If you don’t see it, search for "Prop O’Matic" in the device browser).
- Place a Button device somewhere accessible.
- (Optional) Place a few Prop O’Matic devices to spawn props for hiding.
Step 2: The Verse Code
Click on your Button device to open the Verse editor. We need to tell the button to call the Manager’s ping function.
Here is the complete, annotated code for your button:
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
# This is our Button Device. It's the trigger.
ChaosButton := class(creative_device):
# We store a reference to the Prop-O-Matic manager device here.
# Drag your prop_o_matic_manager_device into this field in the UEFN details panel.
@editable
Manager : prop_o_matic_manager_device = prop_o_matic_manager_device{}
# This is the "Init" function. It runs once when the island starts.
# Think of this as loading your loadout before the match begins.
OnBegin<override>()<suspends>:void=
# We need to find the Prop O'Matic Manager in our island.
# In the UEFN details panel, assign your prop_o_matic_manager_device to Manager above.
# Then subscribe to whatever button/trigger fires OnActivated.
OnActivated()
# This is the "OnActivated" event.
# It runs EVERY time someone presses the button.
# Think of this like the "Elimination" event firing.
OnActivated():void=
# Here is the magic line.
# We are calling the Manager's PingPlayerProps function.
# It takes NO parameters because it affects EVERYONE hiding.
Manager.PingPlayerProps()
# Optional: Let's tell the player "It's on!"
# This prints a message to the console (F8 to view).
Print("CHAKA-CHAKA! All props revealed!")```
### Walkthrough: What Just Happened?
1. **`using { /Fortnite.com/Devices }`**: This is like equipping your **Loadout**. It tells Verse, "Hey, I want to use Fortnite-specific tools, like Buttons and Managers." Without this, Verse wouldn’t know what a `Button` or `Manager` is.
2. **`ChaosButton := class(VerseButton):`**: We are defining our device. We’re saying, "This object is a Button, but it has special powers."
3. **`Init()`**: This is your **Pre-Game Lobby**. It runs once. We use it to find the Manager. We use `GetPropOmaticManager("PropManager")` to grab the specific Manager device we placed in the world. *Note: You must name your Prop O’Matic Manager "PropManager" in the device settings for this to work.*
4. **`OnActivated()`**: This is your **Combat Event**. It runs when the button is pressed.
5. **`Manager.PingPlayerProps()`**: This is the **Skill Shot**. We are calling the function `PingPlayerProps` on our `Manager`. It doesn’t need any arguments (parameters) because it’s a "global" ping — it hits everyone hiding.
### Step 3: Testing It
1. Save your Verse code.
2. Go back to the editor. Make sure you have a **Prop O’Matic Manager** named "PropManager" (check the device's name field in the details panel).
3. Playtest your island.
4. Hide as a prop.
5. Press your button.
6. Look at your radar. Do you see the blip? If yes, you just wrote your first functional Verse API call.
## Try It Yourself
You’ve got the basic "Ping All" button. Now, let’s get specific.
**The Challenge:**
Modify the code above to create a **"Snitch Button."** Instead of pinging *everyone*, this button should only ping the player who *pressed it* (if they are hiding).
**Hint:**
You need to use a different function: `PingPlayerProp`. Unlike `PingPlayerProps` (plural), this one takes a parameter.
1. Look up `PingPlayerProp` in the Verse documentation.
2. It requires an `Agent` (player).
3. Inside the `OnActivated()` function, you can get the player who pressed the button using `GetPlayer(Agent)`.
4. Pass that agent into the function.
*Don’t worry if it breaks! Error messages are just the game telling you where you messed up the loadout. Fix it and try again.*
## Recap
* **Functions** are actions you call on devices, like firing a weapon or healing a teammate.
* **`PingPlayerProps`** is a built-in function in the Prop O’Matic Manager that reveals all hidden players.
* **The Scene Graph** is how you connect devices (like Buttons) to Managers (like Prop O’Matic) using their names.
* **Verse** is just a way to give your devices a brain. Start simple, test often, and don’t be afraid to break your island. It’s just a game.
## 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-device.verse · device
Turn this into a guided course
Add pingplayerprops 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.