Verse Library verse

01 Fragment

Displays a welcome HUD message when a player spawns at a designated pad.

verse-library/using-player-spawn-pad-devices-in-fortnite-creative/01-fragment.verse

# This is a simple Verse script for a Spawn Pad
# It listens for when a player starts

using { /Fortnite.com/Devices }

# We create a "Device" for our spawn pad
# Think of this as holding the physical object
my_spawn_pad : PlayerSpawnPadDevice = PlayerSpawnPadDevice{}

# We create a "Device" for our message sign
# This is the HUD Message we placed
my_message : HUDMessageDevice = HUDMessageDevice{}

# This function runs when the game starts
# It is called an "Event"
OnPlayerSpawned := func (player : Player) -> void:
    # This line sends the "Show" signal
    # to the message device
    my_message.Show("Welcome to my island!")
    
    # You can also print to the console
    print("Player spawned safely!")

Comments

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