Spawning Players and Handling Player Join/Leave Events
In this lesson you'll learn to
- Explain what a player-join event and a player-leave event are, using a game analogy.
- Write a Verse script that detects when a player joins your island and prints a welcome message.
- Write a Verse script that detects when a player leaves your island and prints a goodbye message.
- Place a Player Spawner device and connect it to your Verse script so new players appear on your island.
🎮 Welcome to Your Island — Who Just Walked In?
Imagine your island is a party. 🎉 Every time a friend walks through the door, you want to say "Hey, welcome!" And when someone leaves, you want to say "See you later!"
In Verse, you can do exactly that — with something called events.
📣 What Is an Event?
An event is something that happens during the game that your code can listen for and react to.
Think of it like a doorbell. 🔔
- The doorbell rings = the event happens.
- You answer the door = your code runs.
Two super important events in UEFN are:
| Event | When it fires |
|---|---|
PlayerAddedEvent |
A player joins your island |
PlayerRemovedEvent |
A player leaves your island |
These come from the game session — think of the game session as the referee who keeps track of everyone playing.
🧍 What Is a Player?
In Verse, every person playing your game is a player — that's the word Verse uses for a real human in the game.
When an event fires, Verse hands your code that player like a backstage pass 🪪. You can use it to do things to or for that specific person.
🪄 What Is GetPlayspace?
Your island in UEFN has a playspace. A playspace is like the stage where the whole game happens. It knows about every player on the island.
You call GetPlayspace() to get access to that stage. Once you have it, you can subscribe to (meaning: start listening to) the join and leave events.
🔗 What Does "Subscribe" Mean?
Subscribing to an event means telling Verse: "Hey, when this thing happens, please run my function."
It's like signing up for text alerts. 📱 Once you subscribe, every time the event fires, your function automatically runs!
🏁 Where Does Setup Code Go?
In a UEFN Verse device, there is a special function called OnBegin. It runs once, right when the game starts — like pressing the START button.
This is the perfect place to subscribe to events, because you want to start listening right away!
🪃 What Is a player_spawner_device?
A Player Spawner is a device you place on your island in UEFN. It marks a spot where players appear when they join. Think of it like a respawn pad. 🟢
You can reference it in your Verse script using player_spawner_device. But for basic joining/leaving detection, the events do all the heavy lifting — the spawner just controls where players pop in.
🧩 Putting It All Together
Here's the big picture of what your script will do:
- ⏱️ Game starts →
OnBeginruns. - 👂 You subscribe to the join and leave events.
- 🧍 A player joins → your "welcome" function runs automatically.
- 👋 A player leaves → your "goodbye" function runs automatically.
That's it! You're writing code that reacts to real players in real time. How cool is that? 🚀
Keep going — free
You've read the intro. The rest of this lesson — the worked example, the hands-on exercise, the quiz, and the recap — is free for members. Sign in to continue and track your progress.
New here? The whole Verse Basics track is free with a free account — sign in to start.
Sources
/docs/documentation/en-us/uefn/verse-prop-hunt-template-in-unreal-editor-for-fortnite /docs/documentation/en-us/fortnite/prop-hunt-template-in-unreal-editor-for-fortnite© Biloxi Studios Inc. — original Verse Island content.
Turn this into a guided course
Add Spawning Players and Handling Player Join/Leave Events 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.
🧭 The Keeper's log
Quest complete? Chart your next heading from the Build Your First Game expedition.