Reference Devices compiles

trigger_device + hud_message_device: Checkpoints on the Sunny Cove

A checkpoint is that satisfying beat where a player crosses a marker and the game says "nice, progress saved!" On Verse Island we build that moment out of two real devices: a trigger_device that fires when a player steps on a shoreline plate, and a hud_message_device that pops a cheerful banner on their screen. This article shows you the exact Verse API for both, taught through one bright, cel-shaded cove.

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

Overview

Picture a 2D cel-shaded lagoon: palm shadows, turquoise water, a wooden dock leading to a pirate ship. You want each player who runs down the dock to hit a checkpoint — a spot where the game acknowledges their progress with a big friendly on-screen message.

There is no single magic "checkpoint device" in Verse for this narrative beat — you compose it from two workhorse devices:

  • trigger_device — the sensor. Place it on the dock; when a player steps into it, its TriggeredEvent fires and hands you the agent that stepped in. You can also fire it from code with Trigger(), limit how many times it can fire with SetMaxTriggerCount, and control cooldown with SetResetDelay.
  • hud_message_device — the announcer. Call Show(...) to flash a banner (to everyone or to one specific agent), SetText to change the message, and Hide to clear it.

Reach for this pairing whenever a player reaching a place should cause visible feedback: checkpoints, area unlocks, "you found the treasure!" moments, tutorial waypoints.

API Reference

team

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

team<native><public> := class<unique><epic_internal>:

trigger_device

Used to relay events to other linked devices.

Full public surface, resolved verbatim from the live Epic digest (Fortnite.digest.verse). Inherited members are merged from trigger_base_device.

trigger_device<public> := class<concrete><final>(trigger_base_device):

Events (subscribe a handler to react):

Event Signature Description
TriggeredEvent TriggeredEvent<public>:listenable(?agent) Signaled when an agent triggers this device. Sends the agent that used this device. Returns false if no agent triggered the action (ex: it was triggered through code).

Methods (call these to make the device act):

Method Signature Description
Trigger Trigger<public>(Agent:agent):void Triggers this device with Agent being passed as the agent that triggered the action. Use an agent reference when this device is setup to require one (for instance, you want to trigger the device only with a particular agent.
Trigger Trigger<public>():void Triggers this device, causing it to activate its TriggeredEvent event.
Enable Enable<public>():void Enables this device.
Disable Disable<public>():void Disables this device.
SetMaxTriggerCount SetMaxTriggerCount<public>(MaxCount:int):void Sets the maximum amount of times this device can trigger. * 0 can be used to indicate no limit on trigger count. * MaxCount is clamped between [0,20].
GetMaxTriggerCount GetMaxTriggerCount<public>()<transacts>:int Gets the maximum amount of times this device can trigger. * 0 indicates no limit on trigger count.
GetTriggerCountRemaining GetTriggerCountRemaining<public>()<transacts>:int Returns the number of times that this device can still be triggered before hitting GetMaxTriggerCount. Returns 0 if GetMaxTriggerCount is unlimited.
SetResetDelay SetResetDelay<public>(Time:float):void Sets the time (in seconds) after triggering, before the device can be triggered again (if MaxTrigger count allows).
GetResetDelay GetResetDelay<public>()<transacts>:float Gets the time (in seconds) before the device can be triggered again (if MaxTrigger count allows).
SetTransmitDelay SetTransmitDelay<public>(Time:float):void Sets the time (in seconds) which must pass after triggering, before this device informs other external devices that it has been triggered.
GetTransmitDelay GetTransmitDelay<public>()<transacts>:float Gets the time (in seconds) which must pass after triggering, before this device informs other external devices that it has been triggered.

hud_message_device

Used to show custom HUD messages to one or more agents.

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

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

Events (subscribe a handler to react):

Event Signature Description
ShowMessageEvent ShowMessageEvent<public>:listenable(agent) Called when a Message has been Shown on-screen. Returns an Agent if it was Shown on a specified Agent's screen.
HideMessageEvent HideMessageEvent<public>:listenable(agent) Called when a Message has been Hidden on-screen. Returns an Agent if it was Hidden from a specified Agent's screen.
ClearAllMessagesEvent ClearAllMessagesEvent<public>:listenable(agent) Called when all queued Messages from all players that are affected by this HUD Message Device have been cleared.

Methods (call these to make the device act):

Method Signature Description
Show Show<public>(Agent:agent):void Shows the currently set HUD Message on Agents screen. Will replace any previously active message. Use this when the device is setup to target specific agents.
Show Show<public>():void Shows the currently set Message HUD message on screen. Will replace any previously active message.
Hide Hide<public>():void Hides the HUD message.
Hide Hide<public>(Agent:agent):void Hides the currently set HUD Message on Agents screen. Use this when the device is setup to target specific agents.
Show Show<public>(Agent:agent, Message:message, ?DisplayTime:float Displays a Custom message to a specific Agent that you define.Setting DisplayTime to 0.0 will display the HUD message persistently.If not defined, or less than 0.0 the message will show for the time set on the device.
Show Show<public>(Message:message, ?DisplayTime:float Displays a Custom message that you define for all PlayersSetting DisplayTime to 0.0 will display the HUD message persistently.If not defined, or less than 0.0 the message will show for the time set on the device.
SetDisplayTime SetDisplayTime<public>(Time:float):void Sets the time (in seconds) the HUD message will be displayed. 0.0 will display the HUD message persistently.
GetDisplayTime GetDisplayTime<public>()<transacts>:float Returns the time (in seconds) for which the HUD message will be displayed. 0.0 means the message is displayed persistently.
SetText SetText<public>(Text:message):void Sets the Message to be displayed when the HUD message is activated. Text is clamped to 150 characters.
ClearAllMessages ClearAllMessages<public>():void Clears all queued Messages from all players that are affected by this HUD Message Device.

Walkthrough

Here is the full sunny-cove checkpoint. A player runs down the dock, steps on the trigger plate, and a golden "Checkpoint reached!" banner pops up just for them. We also count how many checkpoints remain and announce the last one to everyone.

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

# A localized-text helper: `message` params need a localized value, not a raw string.
cove_msg<localizes>(S:string):message = "{S}"

checkpoint_cove := class(creative_device):

    # The plate on the dock. A player stepping in fires its TriggeredEvent.
    @editable
    DockPlate : trigger_device = trigger_device{}

    # The banner device that announces progress.
    @editable
    Announcer : hud_message_device = hud_message_device{}

    OnBegin<override>()<suspends>:void =
        # This checkpoint can be reached up to 3 times total across the round.
        DockPlate.SetMaxTriggerCount(3)
        # Short cooldown so a player can't spam it by jittering on the plate.
        DockPlate.SetResetDelay(1.0)
        # Make sure the plate is listening.
        DockPlate.Enable()

        # React whenever someone steps on the plate.
        DockPlate.TriggeredEvent.Subscribe(OnCheckpointReached)

    # Event handlers are METHODS at class scope.
    # TriggeredEvent is listenable(?agent), so we receive an ?agent.
    OnCheckpointReached(MaybeAgent : ?agent):void =
        # How many crossings are left after this one?
        Remaining := DockPlate.GetTriggerCountRemaining()

        # Unwrap the optional agent before using it.
        if (Player := MaybeAgent?):
            # Show a personal banner ONLY on this player's screen for 3 seconds.
            Announcer.Show(Player, cove_msg("Checkpoint reached! Sail on!"), ?DisplayTime := 3.0)

        # When the plate has been used up, tell the whole cove.
        if (Remaining = 0):
            Announcer.Show(cove_msg("Final checkpoint claimed on the dock!"), ?DisplayTime := 5.0)

Line by line:

  • cove_msg<localizes>(S:string):message — every hud_message_device text param is a message (localized). This tiny helper wraps a plain string. There is no StringToMessage.
  • @editable DockPlate : trigger_device and @editable Announcer : hud_message_device — you MUST declare placed devices as editable fields, then link them in the Details panel. A bare DockPlate.Trigger() on an undeclared device fails with Unknown identifier.
  • SetMaxTriggerCount(3) — the plate will only fire 3 times, then goes quiet. Values are clamped to [0,20]; 0 means unlimited.
  • SetResetDelay(1.0) — after each fire, one second must pass before it can fire again.
  • TriggeredEvent.Subscribe(OnCheckpointReached) — wire the plate to our method inside OnBegin.
  • OnCheckpointReached(MaybeAgent : ?agent) — because TriggeredEvent is listenable(?agent), the handler receives an optional agent (it's empty if triggered purely from code).
  • GetTriggerCountRemaining() — returns crossings left; 0 when the max is reached.
  • if (Player := MaybeAgent?): — unwrap the option. Only then can we call the per-agent Show(Agent, Message, ?DisplayTime) overload.
  • The Remaining = 0 check fires the broadcast Show(Message, ?DisplayTime) overload for everybody.

Common patterns

1. Fire a checkpoint from code (no player needed) and announce persistently. Maybe a timer or a treasure-chest event should force the checkpoint. Use the no-arg Trigger() and a persistent banner via DisplayTime := 0.0.

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

cove_msg<localizes>(S:string):message = "{S}"

auto_checkpoint := class(creative_device):

    @editable
    TreasurePlate : trigger_device = trigger_device{}

    @editable
    Banner : hud_message_device = hud_message_device{}

    OnBegin<override>()<suspends>:void =
        # Set the banner's stored text and pin it on screen forever (0.0 = persistent).
        Banner.SetText(cove_msg("The cove is now open!"))
        Banner.SetDisplayTime(0.0)

        # Fire the trigger from code with no agent -- the TriggeredEvent still runs.
        TreasurePlate.Trigger()

        # Show the stored message to everyone.
        Banner.Show()

2. Target one pirate with Trigger(Agent) and react to the show event. When your trigger is configured to require a specific agent, pass it. You can also subscribe to ShowMessageEvent to know when a banner actually appeared.

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

cove_msg<localizes>(S:string):message = "{S}"

targeted_checkpoint := class(creative_device):

    @editable
    ShorePlate : trigger_device = trigger_device{}

    @editable
    Herald : hud_message_device = hud_message_device{}

    OnBegin<override>()<suspends>:void =
        ShorePlate.TriggeredEvent.Subscribe(OnShoreStep)
        # ShowMessageEvent is listenable(agent) -- fires when a banner is shown.
        Herald.ShowMessageEvent.Subscribe(OnBannerShown)

    OnShoreStep(MaybeAgent : ?agent):void =
        if (Player := MaybeAgent?):
            # Re-trigger the plate specifically for that agent.
            ShorePlate.Trigger(Player)
            Herald.Show(Player, cove_msg("Welcome to the shore, matey!"))

    OnBannerShown(Agent : agent):void =
        # A banner just appeared for this agent; clear everything after acknowledging.
        Herald.ClearAllMessages()

3. Disable the plate after the moment, and clear all banners. Once the story beat is done, stop the plate from firing and wipe queued messages.

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

cove_msg<localizes>(S:string):message = "{S}"

one_shot_checkpoint := class(creative_device):

    @editable
    Plate : trigger_device = trigger_device{}

    @editable
    Sign : hud_message_device = hud_message_device{}

    OnBegin<override>()<suspends>:void =
        Plate.TriggeredEvent.Subscribe(OnCross)

    OnCross(MaybeAgent : ?agent):void =
        if (Player := MaybeAgent?):
            Sign.Show(Player, cove_msg("Progress saved!"), ?DisplayTime := 4.0)
        # This is a one-shot: turn off the plate so it never fires again.
        Plate.Disable()
        # And tidy up any leftover banners across the cove.
        Sign.ClearAllMessages()

Gotchas

  • TriggeredEvent gives you ?agent, not agent. It's listenable(?agent). Always if (Player := MaybeAgent?): before using it. Code-fired Trigger() (no arg) hands your handler an empty option — so the personal-banner branch simply won't run, which is exactly what you want.
  • message params are localized. You cannot pass "hello" directly to Show or SetText. Define a <localizes> helper (cove_msg above) and pass cove_msg("hello"). There is no StringToMessage.
  • You must declare devices as @editable fields. Calling SomePlate.Trigger() on a device you never declared inside the class(creative_device) fails to compile. Declare it, then link the real placed device in the Details panel.
  • ?DisplayTime is optional and float. Pass it as ?DisplayTime := 3.0 (a float literal). 0.0 means persistent; a negative value falls back to the device's own setting. Verse does not auto-convert int to float, so never write ?DisplayTime := 3.
  • SetMaxTriggerCount clamps to [0,20]. Passing 100 won't error but silently clamps to 20. Use 0 for unlimited, and check GetTriggerCountRemaining() (which returns 0 when unlimited too — so distinguish carefully).
  • ClearAllMessages wipes banners for ALL players. If you only want to clear one player's banner, use Hide(Agent) instead of ClearAllMessages().
  • Two Show overloads look alike. Show(Agent)/Show() display the device's stored text (set with SetText), while Show(Agent, Message, ?DisplayTime)/Show(Message, ?DisplayTime) display a custom message you pass in that moment. Pick based on whether the text is fixed or dynamic.

Guides & scripts that use team

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

Build your own lesson with team

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 →