Verse Library verse

01 Standalone

Listens for a specific signal remote ID and automatically triggers a linked teleporter to rescue players.

verse-library/using-signal-remote-manager-devices-in-fortnite-creative/01-standalone.verse

using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }

# This is our main class. Think of it as the "Game Manager" device.
# It inherits from creative_device_base, which means it can hold other devices.
signal_remote_bailout := class(creative_device_base):
    
    # @editable means you can change this value in the UEFN editor.
    # We need a reference to the Signal Remote Manager we placed in the world.
    @editable
    MyRemoteManager : signal_remote_manager_device = signal_remote_manager_device{}
    
    # We need a reference to the Teleporter that will save the player.
    # Drag your Teleporter device into this slot in the editor!
    @editable
    BailOutTeleporter : teleporter_device = teleporter_device{}
    
    # This is the "Event" that fires when a signal is received.
    # It’s like the "Trigger" on a trap. When the remote is used, this runs.
    OnSignalReceived : event(SignalId: int, Sender: agent): void = 
        # Check if the signal ID matches our "Bail Out" signal.
        # Let's assume Signal ID 1 is our "Bail Out" button.
        if SignalId == 1:
            # Send the player to the teleporter.
            # The teleporter handles the actual movement.
            BailOutTeleporter.TriggerEvent()
            
            # Optional: Tell the player they’re being rescued!
            # This sends a message to the player who pressed the button.
            Sender.SendHudMessage("Bailing out! See you at base.")

Comments

    Sign in to vote, comment, or suggest an edit. Sign in