Verse Library verse

01 Device

Applies a stat powerup to all players at game start to boost their grid score.

verse-library/configure-the-custom-stat/01-device.verse

# This is a simple Verse script.
# It runs when the island starts.

using { /Fortnite.com/Devices }
using { /Fortnite.com/Game }
using { /Verse.org/Simulation }

# This is our main script block.
# It holds all our code.
grid_score_script := class(creative_device):

    # Drag your Stat Powerup device into this property
    # in the UEFN Details panel before pressing Play.
    @editable
    ScoreBooster : stat_powerup_device = stat_powerup_device{}

    # This function runs when the game starts.
    OnBegin<override>()<suspends>: void =

        # We wait a tiny bit. This is safe.
        Sleep(1.0)

        # Get all players currently in the game.
        AllPlayers := GetPlayspace().GetPlayers()

        # Loop through each player and apply the powerup.
        for (Player : AllPlayers):
            # This will add 10 to the Grid Score for each player.
            ScoreBooster.ApplyToPlayer(Player)

Sign in free to read the full source 🌴

This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.

Sign in with Discord

Comments

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