Verse Library verse

01 Fragment

Controls prop movers and timers via Verse code instead of visual graph wiring.

verse-library/from-unreal-editor-for-fortnite/01-fragment.verse

# This is a Verse script for a Revenge Trap.
# It launches a player when they step on a pressure plate.

# 1. Define the Function: "LaunchPlayer"
# Think of this as defining the "Launch" loadout slot.
# It takes no inputs (empty parentheses) and returns nothing (void).
LaunchPlayer := function () {
    # Find the Prop Mover device by its name in the world.
    # If it doesn't exist, this will fail, so make sure you named it correctly!
    pad := World.FindDeviceByName ("LaunchPad")
    
    # Check if the device actually exists.
    # This is like checking if your gun has ammo before shooting.
    if (pad != nil) {
        # "Activate" the Prop Mover.
        # This tells the device to start moving its target.
        pad.Activate ()
        
        # Optional: Wait 2 seconds, then reset it.
        # This is like the cooldown on a special ability.
        World.SetTimer (2.0, func () {
            pad.Deactivate ()
        })
    }
}

# 2. Define the Event: "OnPlayerBeginOverlap"
# This is the referee listening for a rule break.
# It listens for any player stepping on the Pressure Plate.
OnPlayerBeginOverlap := function (event : Event < (Player : 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