Verse Library verse

01 Fragment

Creates a repeating loop that launches players upward with set force upon landing.

verse-library/using-air-vent-devices-in-fortnite-creative/01-fragment.verse

# This script makes an air vent launch players
# when they stand on it.

using { /Fortnite.com/Devices }
using { /Verse.org/Sim }

# This is our Air Vent device
AirVent := AirVentDevice{}

# This function runs when the game starts
OnBegin<override>()<suspends>:void= {
    # Wait for the game to start
    # Then wait for a player to land
    repeat {
        # Wait for a player to touch the vent
        # This is called an 'Event'
        AirVent.LandedEvent?.Invoke()
        
        # Launch the player up!
        # We set the force to 500 units
        AirVent.SetLaunchForce(500)
        
        # Wait a bit before launching again
        Wait(0.5)
    }
}

Comments

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