using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# CuddleDispenser: a creative_device that wires a trigger_device
# to an item_granter_device so stepping on the trigger hands out loot.
cuddle_dispenser := class(creative_device):
# This is a "Variable".
# Think of a variable as a loot box.
# It starts empty, but we will fill it with the Item Granter.
# Tag this with @editable so UEFN shows it in the Details panel —
# that is where you drag-and-drop your Item Granter device to link it.
@editable
Granter : item_granter_device = item_granter_device{}
# This is a "Variable" for the Trigger device.
# Same idea: tag it @editable and assign it in the Details panel.
@editable
MyTrigger : trigger_device = trigger_device{}
# OnBegin is called automatically when the island starts.
# Think of it as the "Match Start" whistle — it runs once,
# and we use it to subscribe to the trigger's overlap event.
OnBegin<override>()<suspends> : void =
# Subscribe means: "Watch for this event and call my handler."
# TriggeredEvent fires whenever a player steps on the trigger.
MyTrigger.TriggeredEvent.Subscribe(OnPlayerTriggered)
Verse Library
verse
01 Device
Connects a trigger volume to an item granter to automatically reward players who step inside it.
verse-library/using-attack-items-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.