using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Verse }
# This script makes the floor disappear when a player steps on it.
# We attach this script to a Trigger Volume device.
VanishingFloorTrigger := class(creative_device):
# 1. The Trigger Volume itself (the device we attached this script to)
@editable
this_device: trigger_device = trigger_device{}
# 2. A reference to the floor prop we want to hide/show
# We will link this in the editor!
@editable
floor_to_hide: creative_prop = creative_prop{}
# 3. How long the floor stays hidden (in seconds)
hide_duration: float = 3.0
# This function runs when the script initializes (when the game starts)
OnBegin<override>()<suspends>: void =
# We don't need to do anything special here yet,
# but we could set up initial states.
this_device.TriggeredEvent.Await()
OnBeginOverlap()
# This function is called when a player enters the trigger volume
OnBeginOverlap()<suspends>: void =
# Great, a player stepped on us!
Verse Library
verse
01 Device
Hides a linked prop when a player enters a trigger volume, waits, then reveals it.
verse-library/hide-the-entity/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.