Verse Library verse

01 Fragment

Configures a power-up device with custom boost amount and activation cooldown times.

verse-library/using-rocket-boost-powerup-devices-in-fortnite-creative/01-fragment.verse

# This is a comment. It helps you remember what the code does.
# We are creating a script for our Rocket Boost device.

use: RocketBoostPowerupDevice

# This is a function. It is a set of instructions.
# The device will run this code when it starts.
OnBegin<override>()<suspends>: void =
    # We set up the power-up settings here.
    # This is where we use our Variables.
    
    # amount is a variable for how much boost to give.
    amount := 50.0
    
    # cooldown is a variable for how long to wait.
    cooldown := 10.0
    
    # We tell the device to use these settings.
    # This makes the power-up work with our rules.
    SetBoostAmount(amount)
    SetCooldownTime(cooldown)
    
    # We print a message to the console.
    # This helps us know the code is working.
    Print("Rocket Boost is ready! Drive over me!")

Comments

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