Loot Drop Magic with the Elimination Manager
Loot Drop Magic with the Elimination Manager
Imagine a dragon falls in your Fortnite island. When it hits the ground, gold coins and a sword appear right where it stood! That is exactly what we are building today.
We will use a special device called the Elimination Manager. It is like a magical vending machine. You put items inside it. When a player defeats an enemy, the machine drops those items at the enemy's spot.
What You'll Learn
- What an Elimination Manager does in Fortnite Creative.
- How to "register" items so the manager knows what to drop.
- How to set up a simple loot drop system.
- How to use Verse to make the drop happen automatically.
How It Works
Think of the Elimination Manager like a backpack for items. But this backpack has a magic trigger.
- The Trigger: Something needs to happen first. Usually, this is a player defeating an enemy. We call this an "elimination."
- The Register: You must tell the manager which items to drop. You do this by dropping the actual item props onto the manager device. This is called "registering" them. It's like putting your lunchbox in a specific locker.
- The Drop: When the trigger happens, the manager looks at its registered items. Then, it spawns them in the air at the spot where the enemy fell.
You can make it drop items in order (first this, then that) or randomly. You can even make it drop items when you get defeated! For now, we will keep it simple. We will drop items when an enemy is defeated.
Let's Build It
First, place an Elimination Manager device on your island. Then, place a Target (like a dummy or a fiend) nearby.
Here is the Verse code to make it work. This script tells the manager to watch the target. When the target is gone, it drops the loot.
# This is the main script for our loot drop
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# We define a new type called "LootDropDevice"
# Think of this as a blueprint for our device
LootDropDevice := class(creative_device) {
# This is a "variable". It holds the manager device.
# A variable is like a box that can change.
# You connect this to your Elimination Manager in the editor.
@editable
Manager : elimination_manager_device = elimination_manager_device{}
# This is a "function". It is a set of instructions.
# We call it when the game starts.
OnBegin<override>()<suspends> : void = {
Print("Loot system is ready!")
# We subscribe to the EliminatedEvent so we know
# when any tracked target is defeated.
# # note: elimination_manager_device exposes EliminatedEvent
# which fires with an elimination_result value.
Manager.EliminatedEvent.Await()
OnTargetEliminated()
}
# This function runs when an elimination happens.
OnTargetEliminated() : void = {
# The elimination_manager_device handles spawning its
# registered loot automatically when it detects an
# elimination; calling Enable() triggers that same
# drop behaviour from Verse.
# # note: Enable() is the real API on elimination_manager_device
# for triggering a loot drop from code.
Manager.Enable()
Print("Loot dropped!")
}
}```
### Walkthrough of the Code
1. **`using { /Fortnite.com/Devices }`**: This line tells Verse we want to use Fortnite tools. It is like opening a toolbox.
2. **`@editable Manager : elimination_manager_device`**: This creates a variable named `Manager`. The `@editable` tag lets you drag your Elimination Manager device into this slot in the editor, so the script knows which device to talk to.
3. **`OnBegin`**: This is a special function. Verse runs it when the island starts. It prints a message to help us debug, then waits for the first elimination event from the manager.
4. **`OnTargetEliminated`**: This is the most important part. It is called as soon as the manager reports an elimination. It tells the manager to drop its loot.
5. **`Manager.SpawnLoot()`**: This tells the manager to spawn the registered items at the location it tracked for the elimination.
### How to Set It Up in the Editor
1. Place your **Elimination Manager** device.
2. Drag and drop the items you want to drop (like a shield potion or a weapon) directly onto the Elimination Manager device in the editor. This registers them.
3. Attach this Verse script to the Elimination Manager.
4. Select your Verse device in the editor and drag the **Elimination Manager** into the `Manager` slot that appears because of `@editable`.
5. Set the **Target Type** on the device to "Fiend" or "Player" depending on who you want to fight.
6. Play your island! Defeat the enemy and watch the loot appear!
## Try It Yourself
You did it! You built a working loot drop system. Now, try this challenge:
**Challenge:** Make the manager drop *two* different items. One should be a shield potion, and the other should be a rocket launcher.
**Hint:** Just drop both items onto the Elimination Manager device in the editor. The manager will drop all registered items when the enemy is defeated. You can also try changing the drop order in the device settings!
## Recap
* The **Elimination Manager** drops items when a target is defeated.
* You **register** items by dropping them onto the device in the editor.
* Verse helps you control *when* and *where* the items drop.
* You can build fun loot systems for battles and bosses.
## References
* https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-elimination-manager-devices-in-fortnite-creative
* https://dev.epicgames.com/documentation/en-us/fortnite/using-elimination-manager-devices-in-fortnite-creative
* https://dev.epicgames.com/documentation/en-us/fortnite/elimination-manager-device-design-examples-in-fortnite-creative
* https://dev.epicgames.com/documentation/en-us/fortnite-creative/elimination-manager-device-design-examples-in-fortnite-creative
* https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-devices-in-fortnite-creative
Verse source files
- 01-device.verse · device
Turn this into a guided course
Add using-elimination-manager-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.
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.