OnBegin<override>()<suspends>: void =
# Wait for a player to touch the target platform
# (Simplified event binding)
TargetPlatform.OnBeginOverlap.Subscribe(
func(overlap_event: BeginOverlapEvent):
# Use the EXPOSED property here!
# Instead of hard-coding 2.0, we use DisappearDuration
TargetPlatform.SetVisibility(false)
# Wait for the time set in the editor
Wait(Time(DisappearDuration))
# Bring it back
TargetPlatform.SetVisibility(true)
)
Verse Library
verse
02 Fragment
Device toggling platform visibility based on a configurable duration after a player overlap event.
verse-library/editing-the-device-properties-in-uefn/02-fragment.verse