Verse Library verse

01 Fragment

Initializes a custom game class, binds a Prop O-Matic manager, and configures the default ping cooldown.

verse-library/setpingfrequency/01-fragment.verse

using { /Fortnite.com/Devices }

# This is our main script class. Think of it as the "Game Controller" for this island.
CreatePropSearchController() class MyPropGame: WorldActor():
    # This is the input slot where we drag our Prop O-Matic Manager device in UEFN.
    # It’s like plugging a controller into the console.
    Manager: PropOMaticManagerDevice = PropOMaticManagerDevice{}

    # This function runs once when the game starts.
    # It’s like the "Start Game" button on the battle bus.
    OnBegin<override>()<suspends>:void=
        # 1. Set the initial ping cooldown to 2.0 seconds.
        # This means players can ping every 2 seconds.
        Manager.SetPingFrequency(2.0)
        
        # Let's print a message to the console so we know it worked.
        # Think of this as checking your inventory to see if you got the item.
        print("Ping Cooldown Set to 2 seconds. Good luck hiding!")

    # This function runs every frame (60 times a second).
    # It’s like the game’s heartbeat. We can use it to check conditions.
    OnUpdate<override>()<suspends>:void=
        # For this tutorial, we’ll keep it simple.
        # In a real game, you might check the round number here
        # and change the ping speed if it’s the final circle!
        pass

Comments

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