The Sky Is Falling: Building Your First Overlord Spire Boss Fight
Unverified — this example may not compile as-is.
The Verse code below did not pass our automated compile check, so it isn't marked verified and is hidden from the guide listing. The explanation may still be useful, but treat the code as a draft and adapt it before use.
The Sky Is Falling: Building Your First Overlord Spire Boss Fight
Forget the Battle Bus for a second. Imagine a massive, glowing spire crashing out of the sky, screaming at your squad, and unleashing homing missiles. That's the Overlord Spire, and it's basically Fortnite's answer to "what if the map itself was the final boss?"
In this tutorial, we're going to build a boss arena where players have to survive the Spire's chaotic attacks. We won't just place a prop; we're going to use Verse to make the Spire react to the players, turning a static object into a dynamic, angry god of destruction.
What You'll Learn
- The Scene Graph: How the Spire "knows" where you are (think of it as the game's nervous system).
- Events vs. Functions: The difference between "something happened" and "do this thing."
- Targeting Logic: How to force the Spire to focus on one player instead of randomly shooting everyone.
- State Management: How to turn the Spire on and off like a light switch.
How It Works
To understand the Overlord Spire in Verse, you first need to understand the Scene Graph.
The Scene Graph: Your Island's Nervous System
Imagine your Fortnite island is a giant, living body. The Scene Graph is the skeleton and nervous system combined. Every object in your world—a wall, a player, a Spire—is a "Node" in this graph. They are connected in a hierarchy. The Spire isn't just a 3D model sitting on the ground; it's an active entity with properties (health, position) and behaviors (attacks).
When you place an Overlord Spire in UEFN, you aren't just dropping a rock. You're spawning a complex object that has a "brain" (code) attached to it.
Events: The "Ouch" Moment
In programming, an Event is a signal that says, "Hey, something just happened!" It doesn't do anything itself; it just announces it.
- Game Analogy: Think of an Event like the "Elimination" sound effect. When someone dies, the game announces "Elimination!" It doesn't heal the winner or drop loot by itself. It just shouts the news so other devices can hear it.
- Spire Context: The Spire has an event called
OnActivated. This is the Spire shouting, "Hey! Players are close!"
Functions: The "Do This" Command
A Function is a set of instructions that actually does something. It's an action.
- Game Analogy: Think of a Function like pressing the "Heal" button on a medkit. The announcement isn't enough; you need the actual action of health returning.
- Spire Context: The Spire has functions like
SetTarget(focus on one player) orDestroy(self-destruct).
The Workflow: Hooking It Up
We want to create a scenario where:
- The Spire is dormant (off).
- A player enters the arena.
- The Spire wakes up (
Enable). - The Spire locks onto the nearest player (
SetTarget). - Players destroy the Spire's health bar.
- The Spire explodes (
Destroy).
We will use a Perception Trigger (a device that detects if players can "see" or are near something) to trigger the Spire's functions. This is like setting up a tripwire that doesn't just explode, but turns on a security camera.
Let's Build It
We are going to build a "Boss Arena." When a player steps on the trigger plate, the Overlord Spire activates and targets that player.
Step 1: The Setup (UEFN Editor)
- Open UEFN and create a new island.
- Build a simple circular arena (walls, floor, ceiling).
- Place an Overlord Spire in the center.
- Place a Perception Trigger (or a simple Trigger Volume) around the Spire. Set its "Activation Distance" so it covers the entry point.
- Create a Verse Device (or use the built-in Verse logic if your device supports direct binding, but for this tutorial, we'll assume a standard Verse script attached to the Spire or a manager device). Note: In modern UEFN, you often attach Verse scripts directly to devices or use a "Game Mode" script. For clarity, we will write a script that assumes it has access to the Spire device.
Step 2: The Verse Code
Here is a simplified, annotated script. This assumes you have a reference to the overlord_spire_device and a trigger_device.
# Import necessary Verse libraries
using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# Define our Boss Script as a creative_device so it can live in the UEFN editor.
# Think of creative_device as the base class every placeable Verse object inherits from.
boss_script := class(creative_device):
# This is our "Constant" - the Spire we want to control.
# Think of this like saving a specific player's username so you can DM them later.
# Bind this in the UEFN editor's Details panel after placing your Verse device.
@editable
SpireDevice : overlord_spire_device = overlord_spire_device{}
# The trigger volume players walk into to wake the boss.
# Bind this to a trigger_device placed around the arena entrance in the editor.
@editable
ArenaTrigger : trigger_device = trigger_device{}
# This is our "Variable" - the current target.
# Think of this like the "Focus" in a camera or the "Target Lock" in a missile.
# option(?agent) lets us represent "no target yet" safely.
var CurrentTarget : ?agent = false
# This function runs when the script starts (like when the island loads)
OnBegin<override>()<suspends> : void =
# Subscribe to the trigger so we know when a player enters the arena.
# Analogy: Arming the tripwire before the fight starts.
ArenaTrigger.TriggeredEvent.Subscribe(OnPlayerEntered)
# Subscribe to the Spire's destroyed event so we can react when it dies.
# Analogy: Setting up the "Victory" camera before the fight begins.
SpireDevice.DestroyEvent.Subscribe(OnSpireDestroyed)
# The Spire starts disabled in the editor; enable it now so it is ready.
# Analogy: Flipping the breaker switch to power the boss arena.
SpireDevice.Enable()
# Print a message to the debug log (like the in-game console).
# Analogy: The boss saying "I'm awake!"
Print("Overlord Spire Activated!")
# This function is called when a player enters the trigger zone.
# trigger_device passes an ?agent (an optional agent) to its subscribers.
OnPlayerEntered(TriggeringAgent : ?agent) : void =
if (Agent := TriggeringAgent?):
# Store who walked in so other functions can reference the target.
set CurrentTarget = option{Agent}
# Set the Spire's target to the agent who walked in.
# Analogy: The boss locking eyes with you. Now it only attacks you.
# This makes the fight fairer (and more personal) than random attacks.
SpireDevice.SetTarget(Agent)
# Cast to fort_character to read the player's name for the debug log.
# Analogy: The announcer shouting the challenger's name.
if (FortChar := Agent.GetFortCharacter[]):
Print("Target locked on: " + FortChar.GetDisplayName())
# This function is called when the Spire is destroyed.
# DestroyEvent carries an ?agent payload (the destroyer, if any).
OnSpireDestroyed(Unused : ?agent) : void =
# Analogy: The boss explodes and the "Victory" screen plays.
Print("Overlord Spire Destroyed! Victory!")
# Clear the stored target now that the fight is over.
set CurrentTarget = false
# We could trigger a "Win" condition here, like opening the exit door.
# ExitDoor.Activate() # Requires an @editable prop_mover_device reference```
### Walkthrough: What's Happening?
1. **`boss_script := class(creative_device)`**: This is a container for our logic. Think of it as a "Boss Manual." It holds the rules for how the boss behaves. Extending `creative_device` is what lets UEFN see it as a placeable object.
2. **`SpireDevice : overlord_spire_device`**: This is a **Variable**. It's a slot where we store a reference to the actual Overlord Spire object in the game world. Without this, our code doesn't know *which* Spire to control.
3. **`OnBegin`**: This runs once when the game starts. We call `SpireDevice.Enable()`. This is crucial. By default, Spires might be disabled to prevent them from attacking players before they are ready. This line flips the switch.
4. **`OnPlayerEntered`**: This is an **Event Handler**. It waits for a player to walk into the trigger zone. When it happens, it calls `SpireDevice.SetTarget(Agent)`. This is the "Target Lock" mechanic. Instead of the Spire randomly shooting, it focuses all its aggression on the person who triggered it.
5. **`var CurrentTarget : ?agent`**: Using `option(?agent)` with `false` as the empty state is the safe Verse way to represent "nobody targeted yet," avoiding null-pointer crashes if the Spire tries to act before anyone has entered.
## Try It Yourself
Now that you have the basics, here is your challenge:
**The Challenge:** Modify the script so that when the Spire is destroyed, it doesn't just log a message. Instead, it triggers a **Prop Mover** device to open a secret door.
**Hint:**
1. Add a new variable in your `class` for the `prop_mover_device`.
2. In the `OnSpireDestroyed` function, call the `Activate` function on that Prop Mover.
3. *Note:* You will need to bind the Prop Mover device in the UEFN editor to your script's variable.
**Stuck?**
* Check the Verse API for `prop_mover_device` functions. Look for `Activate` or `MoveToNextWaypoint`.
* Remember: You need to connect the device in the editor first, or your script won't know where the door is!
## Recap
* The **Scene Graph** is the hierarchy of all objects in your world. The Spire is an active node in this graph.
* **Events** (like `OnPlayerEntered`) announce that something happened.
* **Functions** (like `Enable` or `SetTarget`) are the actions you take in response.
* The Overlord Spire is a powerful boss device that can be controlled via Verse to create dynamic, reactive encounters.
## References
* https://dev.epicgames.com/documentation/en-us/fortnite/using-overlord-spire-devices-in-fortnite
* https://dev.epicgames.com/documentation/en-us/fortnite/using-devices-in-fortnite
* https://dev.epicgames.com/documentation/en-us/fortnite/37-00-fortnite-ecosystem-updates-and-release-notes
* https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-devices-in-fortnite-creative
* https://dev.epicgames.com/documentation/fortnite/verse-api/fortnitedotcom/devices/overlord_spire_device
Verse source files
- 01-device.verse · device
Turn this into a guided course
Add using-overlord-spire-devices-in-fortnite 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.