Verse Library verse

01 Fragment

Toggles player prop pings on or off when entering or leaving a designated trigger zone for hide-and-seek gameplay.

verse-library/setpingprops/01-fragment.verse

using { /Fortnite.com/Devices }

# This is our main script. Think of it as the "Game Rules" book.
PingControl = script:
    # We need a reference to our Prop O Matic Manager.
    # This is like plugging a controller into the console.
    BaseManager: prop_o_matic_manager_device = prop_o_matic_manager_device{}

    # This event fires when the game starts.
    OnBegin<override>()=initial:
        # When the game begins, let's make sure pings are ON by default.
        # This is our "Reset" button.
        BaseManager.SetPingProps(On=On)

    # This event fires when a player enters our trigger zone.
    # We'll connect this to a Trigger Volume later in the editor.
    PlayerEnteredTrigger = event (Player: player_device):
        # "Player" is the person who walked in.
        # We want to turn pings OFF so they can hide safely.
        # SetPingProps is the function. (On=Off) is the setting.
        BaseManager.SetPingProps(On=Off)

    # This event fires when a player leaves the zone.
    PlayerLeftTrigger = event (Player: player_device):
        # Now that they are in the dangerous open world, turn pings BACK ON.
        # This makes the game fair and challenging.
        BaseManager.SetPingProps(On=On)

Comments

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