# This is a Verse Script. It lives inside a device on your map.
# Think of this script as the "brain" of your dispenser.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Players }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# We create a "Device" class. This is the blueprint for our dispenser.
# In the Scene Graph, this device is a node that holds our logic.
dispenser_device := class(creative_device):
# --- VARIABLES: The "Loot Box" ---
# A reference to the button device placed on your map.
# In the UEFN Outliner, set this property to point at your button_device.
@editable
DispenserButton : button_device = button_device{}
# A reference to the item granter device that actually hands items to players.
# Place an item_granter_device on your map, configure its item in the UEFN
# Details panel (e.g. Launchpad, Port-A-Fort, Repair Torch), then wire it here.
# Change which device you point at to change the loot — no code edits needed!
@editable
ItemGranter : item_granter_device = item_granter_device{}
# --- FUNCTIONS: The "Combo Moves" ---
# This function takes a player and tells the item granter to give them the item.
# It's like a vending machine: Insert Coin (Player) -> Get Snack (Item).
GivePortableItem(Agent : agent) : void =
Verse Library
verse
01 Device
Creates a custom device class that links to a button and item granter to distribute loot to players.
verse-library/using-portable-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.