using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# This is our main script. It runs the show.
# creative_device is the real base class for Verse devices in UEFN.
secret_room_manager := class(creative_device):
# We need a reference to the door.
# In Verse, we call things "variables".
# A variable is like a box that holds a value.
# Wire this PropMoverDevice in the UEFN Details panel.
@editable
Door : prop_mover_device = prop_mover_device{}
# We need a reference to the Player Counter device.
# Wire this PlayerCounterDevice in the UEFN Details panel.
@editable
Counter : player_counter_device = player_counter_device{}
# We need a reference to the Trigger device that watches the zone.
# Wire this TriggerDevice in the UEFN Details panel.
@editable
ZoneTrigger : trigger_device = trigger_device{}
# OnBegin runs when the game starts.
OnBegin<override>()<suspends> : void =
# Subscribe to the trigger so we know when a player enters the zone.
# TriggeredEvent fires each time an agent steps into the trigger volume.
Verse Library
verse
01 Device
Links a trigger volume, prop mover, and player counter to control secret room access.
verse-library/using-player-counter-devices-in-fortnite-creative/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.