# 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(): 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(): void = # This line moves the wall! # It tells the Prop Mover to start moving. WallMover.Begin() # We wait for 2 seconds. # This gives time for the wall to move. Sleep(2.0) # Now we move the wall back! WallMover.Reverse()