# This is our main script file
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
# This is our main class. It holds all our code.
MovingWallScript := class(creative_device):
# This is a VARIABLE. It holds the Prop Mover device.
# We will set this in the editor later.
@editable
WallMover: prop_mover_device = prop_mover_device{}
# This is a VARIABLE for the Trigger.
@editable
MoveTrigger: trigger_device = trigger_device{}
# This function runs when the game starts.
OnBegin<override>()<suspends>: void =
# We connect the Trigger to a function.
# When the trigger is activated, it calls MoveWall.
MoveTrigger.TriggeredEvent.Await()
MoveWall()
# This is a FUNCTION. It is the recipe for moving the wall.
MoveWall()<suspends>: void =
# This line moves the wall!
# It tells the Prop Mover to start moving.
WallMover.Begin()
# We wait for 2 seconds.
Verse Library
verse
01 Device
Triggers a prop mover to slide a wall forward and back when activated.
verse-library/level-design-tips/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.