ReferenceDevices

Class Selector Device

class selector device

Updated
Watch the Knot — class_selector_device in ~90 seconds.

One step onto the Skull Brig’s barnacled plate, and your pirate instantly swaps from a swashbuckler to a sapper, ready to blast the gate.

The class and team selector device handles this loadout swap, firing its ClassSwitchedEvent the moment an agent claims a new role in the cage.

We subscribe to that event in OnBegin, and inside our handler, we grab the agent and call Disable so they can’t change their mind.

Reach for the class selector device whenever you need players to pick their role and lock in their gear for the rest of the island raid.

brig_selector := class(creative_device):
    @editable
    Selector : class_and_team_selector_device = class_and_team_selector_device{}
    OnSwitched(A : agent) : void =
        Selector.Disable()
    OnBegin<override>()<suspends>:void =
        Selector.ClassSwitchedEvent.Subscribe(OnSwitched)

Build your own lesson with class_selector_device

Generate a personalized, compile-checked lesson grounded in this exact reference.

Build a lesson →