using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# revenge_trap_manager is a Verse device you place in your UEFN level.
# Wire TrapButton, TrapDoor, and LootSpawner to these properties
# in the UEFN editor Details panel.
revenge_trap_manager := class(creative_device):
# TrapButton: a button_device placed in the level.
# Wire it here via the UEFN editor.
@editable
TrapButton : button_device = button_device{}
# TrapDoor: a conditional_button_device used as a gate/door lock.
# Wire your door-controlling device here.
# note: Verse has no dedicated "door_device"; use a conditional_button_device
# or a gate_device to enable/disable passage.
@editable
TrapDoor : conditional_button_device = conditional_button_device{}
# LootSpawner: an item_spawner_device that drops loot when activated.
@editable
LootSpawner : item_spawner_device = item_spawner_device{}
# OnBegin is called automatically when the game session starts.
OnBegin<override>()<suspends> : void =
# Subscribe to the button's InteractedWithEvent.
# This event fires whenever any player presses TrapButton.
Verse Library
verse
01 Device
Manages button, door, and spawner devices to create an interactive trap that triggers on player interaction.
verse-library/receivers/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.