# This is a Verse script. It controls a game device.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Native }
using { /UnrealEngine.com/Temporary/Diagnostics }
# This is our main device. It is like the brain.
# It wires up to a trigger_device and a customizable_light_device
# placed on the island in the UEFN editor.
ball_sensor_manager := class(creative_device):
# Wire this to a Trigger Device in the UEFN editor.
# The trigger device watches the area where the ball rolls.
@editable
BallTrigger : trigger_device = trigger_device{}
# Wire this to a Customizable Light Device in the UEFN editor.
# This is the light that turns on when the ball arrives.
@editable
Light : customizable_light_device = customizable_light_device{}
# OnBegin runs when the game starts.
# Think of it as the "start" button being pressed.
OnBegin<override>()<suspends> : void =
# We tell the trigger to listen.
# It watches for anything to enter its space,
# including physics props rolling into the volume.
# note: Verse trigger_device fires TriggeredEvent for
# players; for physics prop overlap, enable
# "Physics Events Enabled" on the trigger in the editor.
Verse Library
verse
01 Device
Activates a light device when a physics-enabled prop enters a designated trigger volume area.
verse-library/physics-enabled-options/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.