Reference Devices compiles

sword_in_the_stone_device: Placing the Infinity Blade on Your Island

The Sword in the Stone device drops the legendary Infinity Blade into your island — a one-hit-kill melee weapon that any player can claim regardless of team. Because the device's Verse API exposes no methods or events of its own, the real power comes from pairing it with other devices (like `team_settings_and_inventory_device` and `trigger_device`) to build dramatic game moments around who picks up the blade.

Updated Examples verified on the live UEFN compiler
Watch the Knotsword_in_the_stone_device in ~90 seconds.

Overview

The sword_in_the_stone_device places the Infinity Blade at a fixed location on your island. The moment the round starts, the blade is available for any player — on any team — to walk up and grab. Whoever picks it up gains enormous combat power: massive damage, a shield, and a special lunge attack.

Because the device's Verse API surface is intentionally minimal (no callable methods, no listenable events), you control the context around the blade rather than the blade itself. Common design patterns include:

  • Announcing when a team member is eliminated (signaling the blade is now unclaimed again) using team_settings_and_inventory_device.
  • Gating access to the blade's spawn location behind a trigger or barrier that you enable/disable from Verse.
  • Tracking round state — end the round when the blade-holder's team runs out of respawns.

Reach for this device whenever you want a high-stakes, king-of-the-hill style moment where one powerful item changes the balance of power.

API Reference

sword_in_the_stone_device

Used to place the Infinity Blade on your island. When placed, the Infinity Blade becomes available to any player regardless of team affiliation.

Full public surface, resolved verbatim from the live Epic digest (Fortnite.digest.verse).

sword_in_the_stone_device<public> := class<concrete><final>(creative_device_base):

Walkthrough

Scenario: A medieval arena map. The Infinity Blade sits on a pedestal in the centre. When any team member is eliminated, your Verse device announces it to the island and checks whether that team has run out of respawns — if so, it calls EndRound to crown the surviving team the winner.

Place these devices in your UEFN level:

  • One sword_in_the_stone_device (the blade pedestal)
  • Two team_settings_and_inventory_device instances — one per team
  • Wire them to your Verse device via @editable fields
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Native }

# arena_blade_manager — announces eliminations and ends the round
# when a team runs out of respawns.
arena_blade_manager := class(creative_device):

    # The Sword in the Stone placed in the centre of the arena.
    # No Verse API to call on it directly — its presence in the
    # level is enough to spawn the Infinity Blade at game start.
    @editable
    BladeDevice : sword_in_the_stone_device = sword_in_the_stone_device{}

    # Team Settings device configured for Team 1 (e.g. Blue Knights).
    @editable
    Team1Settings : team_settings_and_inventory_device = team_settings_and_inventory_device{}

    # Team Settings device configured for Team 2 (e.g. Red Crusaders).
    @editable
    Team2Settings : team_settings_and_inventory_device = team_settings_and_inventory_device{}

    # Called once when the experience starts.
    OnBegin<override>()<suspends> : void =
        # Subscribe to elimination events for both teams.
        Team1Settings.TeamMemberEliminatedEvent.Subscribe(OnTeam1MemberEliminated)
        Team2Settings.TeamMemberEliminatedEvent.Subscribe(OnTeam2MemberEliminated)

        # Subscribe to the "out of respawns" events so we can
        # end the round when a team is fully wiped.
        Team1Settings.TeamOutOfRespawnsEvent.Subscribe(OnTeam1OutOfRespawns)
        Team2Settings.TeamOutOfRespawnsEvent.Subscribe(OnTeam2OutOfRespawns)

    # Fires every time a Blue Knights player is eliminated.
    # Agent is the eliminated player.
    OnTeam1MemberEliminated(Agent : agent) : void =
        Print("A Blue Knight has fallen — the Blade is up for grabs!")

    # Fires every time a Red Crusaders player is eliminated.
    OnTeam2MemberEliminated(Agent : agent) : void =
        Print("A Red Crusader has fallen — the Blade is up for grabs!")

    # Blue Knights have no more respawns — Red Crusaders win.
    OnTeam1OutOfRespawns(Payload : tuple()) : void =
        Print("Blue Knights wiped out! Red Crusaders claim the Infinity Blade!")
        # End the round — Team 2 wins.
        Team2Settings.EndRound()

    # Red Crusaders have no more respawns — Blue Knights win.
    OnTeam2OutOfRespawns(Payload : tuple()) : void =
        Print("Red Crusaders wiped out! Blue Knights claim the Infinity Blade!")
        # End the round — Team 1 wins.
        Team1Settings.EndRound()

Line-by-line explanation:

Lines What's happening
@editable BladeDevice Exposes the placed sword_in_the_stone_device to the Details panel. No Verse calls needed — placing it in the level spawns the blade automatically.
@editable Team1Settings / Team2Settings Two team_settings_and_inventory_device references, one per team, configured in the UEFN Details panel.
OnBegin Subscribes all four event handlers before any player can interact with the blade.
TeamMemberEliminatedEvent.Subscribe(...) Fires whenever a member of that team is eliminated — perfect for announcing the blade is now unclaimed.
TeamOutOfRespawnsEvent.Subscribe(...) Fires when a team has zero respawns left — the signal to end the round.
EndRound() Called on the winning team's team_settings_and_inventory_device to officially close the round.

Common patterns

Pattern 1 — Tracking who is on each team at round start

Use GetTeamMembers() to log a roster when the game begins, so you know exactly who is competing for the blade.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Native }

blade_roster_logger := class(creative_device):

    @editable
    BladeDevice : sword_in_the_stone_device = sword_in_the_stone_device{}

    @editable
    Team1Settings : team_settings_and_inventory_device = team_settings_and_inventory_device{}

    @editable
    Team2Settings : team_settings_and_inventory_device = team_settings_and_inventory_device{}

    OnBegin<override>()<suspends> : void =
        # Give players a moment to spawn before reading the roster.
        Sleep(2.0)

        Team1Members := Team1Settings.GetTeamMembers()
        Team2Members := Team2Settings.GetTeamMembers()

        Print("=== Blade Arena Roster ===")
        Print("Blue Knights: {Team1Members.Length} fighters")
        Print("Red Crusaders: {Team2Members.Length} fighters")
        Print("The Infinity Blade awaits in the centre!")

Key point: GetTeamMembers() returns []agent — the current live members of that team. Call it after Sleep so spawners have had time to place everyone.


Pattern 2 — Rewarding the team that scores the most enemy eliminations

Subscribe to EnemyEliminatedEvent on each team to track kill counts. When a team hits a target score, call EndRound on the other team's device to signal defeat.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Native }

blade_kill_race := class(creative_device):

    @editable
    BladeDevice : sword_in_the_stone_device = sword_in_the_stone_device{}

    @editable
    Team1Settings : team_settings_and_inventory_device = team_settings_and_inventory_device{}

    @editable
    Team2Settings : team_settings_and_inventory_device = team_settings_and_inventory_device{}

    # Target number of enemy kills to win the round.
    @editable
    KillsToWin : int = 5

    var Team1Kills : int = 0
    var Team2Kills : int = 0

    OnBegin<override>()<suspends> : void =
        Team1Settings.EnemyEliminatedEvent.Subscribe(OnTeam1Kill)
        Team2Settings.EnemyEliminatedEvent.Subscribe(OnTeam2Kill)

    # A Blue Knight eliminated an enemy.
    OnTeam1Kill(Eliminator : agent) : void =
        set Team1Kills = Team1Kills + 1
        Print("Blue Knights: {Team1Kills} / {KillsToWin} kills")
        if (Team1Kills >= KillsToWin):
            Print("Blue Knights reach the kill goal — they win!")
            # End the round in favour of Team 1.
            Team2Settings.EndRound()

    # A Red Crusader eliminated an enemy.
    OnTeam2Kill(Eliminator : agent) : void =
        set Team2Kills = Team2Kills + 1
        Print("Red Crusaders: {Team2Kills} / {KillsToWin} kills")
        if (Team2Kills >= KillsToWin):
            Print("Red Crusaders reach the kill goal — they win!")
            Team1Settings.EndRound()

Key point: EnemyEliminatedEvent sends the eliminator (the agent who scored the kill), not the victim. Call EndRound() on the losing team's device — that's the convention UEFN uses to signal defeat.


Pattern 3 — Welcoming each new spawn with a blade reminder

Subscribe to TeamMemberSpawnedEvent to greet every player as they enter the arena and remind them the blade is available.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Native }

blade_spawn_greeter := class(creative_device):

    @editable
    BladeDevice : sword_in_the_stone_device = sword_in_the_stone_device{}

    @editable
    Team1Settings : team_settings_and_inventory_device = team_settings_and_inventory_device{}

    @editable
    Team2Settings : team_settings_and_inventory_device = team_settings_and_inventory_device{}

    OnBegin<override>()<suspends> : void =
        Team1Settings.TeamMemberSpawnedEvent.Subscribe(OnPlayerSpawned)
        Team2Settings.TeamMemberSpawnedEvent.Subscribe(OnPlayerSpawned)

    # Fires for every player on either team when they spawn or respawn.
    OnPlayerSpawned(SpawnedAgent : agent) : void =
        Print("A warrior enters the arena — the Infinity Blade awaits in the centre!")

Key point: Both teams share the same handler here — that's fine because the message is the same for everyone. You can subscribe the same method to multiple events.

Gotchas

1. The device has NO callable Verse methods or events

sword_in_the_stone_device exposes zero methods and zero events in its Verse API. You cannot enable, disable, hide, or listen to it from code. All game logic must live in companion devices (team_settings_and_inventory_device, trigger_device, barrier_device, etc.). The @editable BladeDevice field is there purely so UEFN can link the placed prop to your script for documentation or future API expansion — you will never call a method on it.

2. The blade is team-agnostic by design

The official documentation states: "When placed, the Infinity Blade becomes available to any player regardless of team affiliation." You cannot restrict pickup to one team via Verse. If you need team-gating, use a barrier_device to physically block the path to the blade and enable/disable it from Verse.

3. EndRound() goes on the LOSING team's device

A common mistake is calling EndRound() on the winning team. In UEFN's model, EndRound() signals that that team's round is over (i.e., they lost). Always call it on the team you want to mark as defeated.

4. TeamOutOfRespawnsEvent sends tuple(), not agent

This event carries no agent payload — it just signals the moment the respawn count hits zero. Your handler signature must be (Payload : tuple()) : void, not (Agent : agent) : void, or the subscription will fail to compile.

5. GetTeamMembers() is a snapshot, not a live list

GetTeamMembers() returns the team roster at the moment you call it. If you call it at OnBegin before players spawn, you may get an empty array. Use Sleep(2.0) or subscribe to TeamMemberSpawnedEvent to wait until the roster is populated.

6. One blade, one location

The Infinity Blade spawns at the exact position of the sword_in_the_stone_device prop in the level. You cannot move it at runtime from Verse. If your design needs a dynamic spawn point, use a item_spawner_device configured with a different weapon instead.

Build your own lesson with sword_in_the_stone_device

Generate a personalized, step-by-step lesson plan built around this object — grounded in this exact reference and our compile-verified knowledge base.

Build a lesson →