# 1. Import the libraries we need.
# These are like the toolboxes containing all the Fortnite devices.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# 2. Define the Script Class.
# Think of this as the "Blueprint" for our device.
# It inherits from 'creative_device', which means it can interact with the game world.
RevengeTrapScript := class(creative_device):
# 3. The @editable keyword.
# This creates a property in the Device Properties panel in UEFN.
# It allows us to link a Trigger Volume from our level to this script.
@editable
TriggerVolume : trigger_device = trigger_device{}
# It also allows us to link a Prop Mover to launch the player.
@editable
PropMover : prop_mover_device = prop_mover_device{}
# 4. A variable to count launches.
# This is like a scoreboard that lives inside this script.
# 'var' makes it mutable so we can increment it later.
var LaunchCount : int = 0
# 5. The 'OnBegin' function.
# This runs once when the game starts.
OnBegin<override>()<suspends> : void =
Verse Library
verse
01 Device
Connects a trigger volume to a prop mover to launch players, tracking launches during gameplay.
verse-library/creating-the-verse-script/01-device.verse
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.