Reference Devices compiles

class_designer_device: Building Custom Player Classes in Verse

class_designer_device is where you define a reusable player class — its health, shields, speed multiplier, team, and starting loadout — entirely through the Details panel in UEFN. In Verse, it doesn't hand out the class itself; instead it gives you two query tools, GetClassMembers and IsOfClass, so your game logic can react to who currently belongs to that class.

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

Overview

A class_designer_device is a definition, not a switch. You place one instance per class you want (Defender, Scout, Guardian, Hunter — whatever your mode needs) and configure its attributes in the UEFN Details panel: Max Health, Max Shields, Movement Multiplier, Team, starting inventory, Grant Items on Respawn, and more. None of those attribute values are exposed to Verse — you set them visually, once, at design time.

What Verse can do is ask questions about the class at runtime: who is currently a member of it, and is a specific agent a member of it. That's exactly what the device's two methods are for. You then pair class_designer_device with a device that actually performs the switch — typically class_and_team_selector_device or a Class Selector UI/volume — which reads a player's zone entry, button press, or UI choice and calls into the class system to move them into the class you designed.

Reach for class_designer_device (plus its query methods) whenever your mode has distinct roles — Attacker vs Defender in a siege map, Hunter vs Hider in a prop hunt, Healer vs Tank in a squad game — and you need Verse logic that behaves differently depending on which class a player currently holds: gating a vault door to Guardians only, tallying how many Defenders are left standing, or confirming a class switch actually landed before granting a bonus.

API Reference

class_designer_device

Used together with class_and_team_selector_device to create class based gameplay. Defines custom class attributes and inventory loadouts.

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

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

Methods (call these to make the device act):

Method Signature Description
GetClassMembers GetClassMembers<public>()<reads>:[]agent Returns an array of agents that are currently of Class defined by this device.
IsOfClass IsOfClass<public>(Agent:agent)<transacts><decides>:void Is true if Agent is on Class defined by this device.

Walkthrough

Scenario: a vault room that only opens for players in the Guardian class. When any player steps on the vault plate, we check whether they belong to the Guardian class defined by a class_designer_device. If they do, we grant them a visible marker as proof of clearance. At game start we also sweep the roster once and mark every existing Guardian.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

vault_guardian_device := class(creative_device):

    @editable
    GuardianClass : class_designer_device = class_designer_device{}

    @editable
    VaultPlate : trigger_device = trigger_device{}

    @editable
    GuardianMarker : player_marker_device = player_marker_device{}

    OnBegin<override>()<suspends>:void =
        VaultPlate.TriggeredEvent.Subscribe(OnPlateStepped)
        MarkAllGuardians()

    OnPlateStepped(Agent : ?agent) : void =
        if (SteppingAgent := Agent?):
            if (GuardianClass.IsOfClass[SteppingAgent]):
                Print("Guardian verified. Vault access granted.")
                GuardianMarker.Attach(SteppingAgent)
            else:
                Print("Access denied: you are not a Guardian.")

    MarkAllGuardians():void =
        Members := GuardianClass.GetClassMembers()
        for (Member : Members):
            GuardianMarker.Attach(Member)```

Line-by-line:

- `GuardianClass : class_designer_device`  the editable field referencing the class definition you built in the Details panel (attributes, team, loadout all live there, not in this code).
- `VaultPlate : trigger_device`  a plate players step on; `TriggeredEvent` is a `listenable(?agent)`, so its payload is optional.
- `GuardianMarker : player_marker_device`  used purely to give visible proof that `IsOfClass`/`GetClassMembers` succeeded, by attaching a marker.
- `OnBegin` subscribes to the plate and performs one startup sweep via `MarkAllGuardians`.
- `OnPlateStepped` unwraps the optional agent with `if (SteppingAgent := Agent?):` before calling any device method that expects a plain `agent`.
- `GuardianClass.IsOfClass(SteppingAgent)` is a `<decides>` call  it succeeds (runs the `if` body) only if the agent currently belongs to this class, and fails silently into the `else` branch otherwise.
- `MarkAllGuardians` calls `GuardianClass.GetClassMembers()`, which returns `[]agent`  every agent presently in the Guardian class  and loops over it to mark each one.

## Common patterns

**Pattern 1  GetClassMembers to check squad presence.** Use the member list's length to branch on whether a class has anyone in it yet, e.g. before starting a round-specific event.

```verse
using { /Fortnite.com/Devices }

scout_roster_device := class(creative_device):

    @editable
    ScoutClass : class_designer_device = class_designer_device{}

    @editable
    RosterButton : button_device = button_device{}

    OnBegin<override>()<suspends>:void =
        RosterButton.InteractedWithEvent.Subscribe(OnButtonPressed)

    OnButtonPressed(Agent : agent) : void =
        Members := ScoutClass.GetClassMembers()
        if (Members.Length > 0):
            Print("The Scout squad is active.")
        else:
            Print("No Scouts have joined yet.")

Pattern 2 — IsOfClass to confirm a class switch actually landed. Subscribe to class_and_team_selector_device.ClassSwitchedEvent, then use the matching class_designer_device.IsOfClass to verify which class the player ended up in before rewarding them.

using { /Fortnite.com/Devices }

class_switch_confirm_device := class(creative_device):

    @editable
    DefenderClass : class_designer_device = class_designer_device{}

    @editable
    ClassSelector : class_and_team_selector_device = class_and_team_selector_device{}

    OnBegin<override>()<suspends>:void =
        ClassSelector.ClassSwitchedEvent.Subscribe(OnClassSwitched)

    OnClassSwitched(Agent : agent) : void =
        if (DefenderClass.IsOfClass(Agent)):
            Print("Player switched into the Defender class.")

Pattern 3 — Combining both methods for a "last one standing" alert. When a Defender steps on a trigger, check their class membership, then use GetClassMembers to see how many Defenders remain overall.

using { /Fortnite.com/Devices }

last_defender_alert_device := class(creative_device):

    @editable
    DefenderClass : class_designer_device = class_designer_device{}

    @editable
    AlertTrigger : trigger_device = trigger_device{}

    OnBegin<override>()<suspends>:void =
        AlertTrigger.TriggeredEvent.Subscribe(OnTriggered)

    OnTriggered(Agent : ?agent) : void =
        if (TriggeringAgent := Agent?):
            if (DefenderClass.IsOfClass(TriggeringAgent)):
                Remaining := DefenderClass.GetClassMembers()
                if (Remaining.Length <= 1):
                    Print("Last Defender standing!")

Gotchas

  • IsOfClass is <decides>, not a bool-returning function. It returns void and either succeeds or fails; you can only call it inside a failure context like an if condition (if (Class.IsOfClass(Agent)):), never assign its result to a variable.
  • Unwrap optional agents first. Events like trigger_device.TriggeredEvent hand you ?agent. IsOfClass expects a plain agent, so unwrap with if (A := Agent?): before calling it — passing the optional directly won't compile.
  • class_designer_device never switches anyone into the class. It only defines attributes/loadout and answers membership queries. Pair it with class_and_team_selector_device, class_selector_device, or a Class Selector UI/volume to actually move a player into the class.
  • Attributes are Details-panel-only. Health, Shields, Movement Multiplier, Team, Grant Items on Respawn, etc. are all set visually in UEFN — there is no Verse method on this device to read or change them at runtime.
  • GetClassMembers is a live snapshot. It only reflects agents currently assigned to that class right now; players who switched out, left the class, or left the match won't appear, so re-call it whenever you need fresh data rather than caching the array.
  • One device instance per class. If your mode has three roles, you need three separate class_designer_device placements, each wired to its own @editable field — there's no single device that represents "all classes."

Device Settings & Options

The class_designer_device User Options panel in the UEFN editor — every setting you can tune.

Class Designer Device settings and options panel in the UEFN editor — Class Name, Class Description, Class Identifier, Grant Items On Respawn, Start With Pickaxe, Starting Health, Max Health, Starting Shields, Max Shields, Allow Overshield, Overshield: More Options, Overshield Max, Overshield Recharge Delay, Overshield Recharge Rate, Movement Multiplier, Allow Sprinting, Sprinting: More Options, Sprinting Energy Cost Per Second, Performance
Class Designer Device — User Options in the UEFN editor: Class Name, Class Description, Class Identifier, Grant Items On Respawn, Start With Pickaxe, Starting Health, Max Health, Starting Shields, Max Shields, Allow Overshield, Overshield: More Options, Overshield Max, Overshield Recharge Delay, Overshield Recharge Rate, Movement Multiplier, Allow Sprinting, Sprinting: More Options, Sprinting Energy Cost Per Second, Performance
⚙️ Settings on this device (19)

Setting names read from the panel above — may be partial; the screenshots are the source of truth.

Class Name
Class Description
Class Identifier
Grant Items On Respawn
Start With Pickaxe
Starting Health
Max Health
Starting Shields
Max Shields
Allow Overshield
Overshield: More Options
Overshield Max
Overshield Recharge Delay
Overshield Recharge Rate
Movement Multiplier
Allow Sprinting
Sprinting: More Options
Sprinting Energy Cost Per Second
Performance

Guides & scripts that use class_designer_device

Step-by-step tutorials that put this object to work.

Build your own lesson with class_designer_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 →