Overview
The Item Granter device (placed from the Creative device browser as Item Granter) solves a fundamental game-design problem: how do you give a player a specific item from Verse code? Whether you're building a wave-survival game that arms players at round start, a puzzle map that rewards a key item when a vault opens, or a shop that grants a weapon on purchase, the Item Granter is the bridge between your Verse logic and the player's inventory.
When to reach for it:
- You need to give a player a weapon, consumable, or resource at a scripted moment.
- You want to award a specific item index from the granter's configured item list.
- You need to respond to a game event (trigger stepped on, button pressed, enemy eliminated) and immediately arm the player.
The device is configured in the UEFN Details panel — you set which items it can grant there. Your Verse code then calls the API to decide when and to whom to grant them.
API Reference
(API surface could not be resolved for this device.)
Walkthrough
Scenario: The Vault Reward
A player steps on a pressure plate. A vault door swings open (handled by a mutator zone or door device), and the Item Granter immediately hands the player a weapon from its configured list. A second plate resets the vault.
This example wires a trigger_device (the pressure plate) to the Item Granter and calls GrantItem on the triggering agent.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# vault_reward_device
# Place this device on your island, then assign VaultPlate and WeaponGranter
# in the Details panel.
vault_reward_device := class(creative_device):
# The pressure plate the player steps on to open the vault
@editable
VaultPlate : trigger_device = trigger_device{}
# The Item Granter device configured with the vault reward weapon
@editable
WeaponGranter : item_granter_device = item_granter_device{}
# Whether the vault has already been claimed this round
var VaultClaimed : logic = false
OnBegin<override>()<suspends> : void =
# Subscribe to the plate's triggered event.
# trigger_device fires TriggeredEvent with ?agent
VaultPlate.TriggeredEvent.Subscribe(OnVaultPlateTriggered)
Print("Vault reward system armed.")
# Called whenever a player steps on VaultPlate
OnVaultPlateTriggered(Agent : ?agent) : void =
# Guard: only grant once per round
if (VaultClaimed = true):
return
# Unwrap the optional agent
if (A := Agent?):
# Grant the first configured item to the triggering player
WeaponGranter.GrantItem(A)
set VaultClaimed = true
Print("Vault reward granted!")
Line-by-line explanation:
| Lines | What's happening |
|---|---|
@editable VaultPlate |
Exposes the trigger device slot in the Details panel so you can drag-connect your in-world plate. |
@editable WeaponGranter |
Exposes the Item Granter slot — configure the item list in its own Details panel. |
var VaultClaimed |
A mutable flag so the vault can only be looted once. |
VaultPlate.TriggeredEvent.Subscribe(OnVaultPlateTriggered) |
Registers our handler; the event fires with ?agent (optional). |
if (A := Agent?) |
Safely unwraps the optional agent before passing it to the granter. |
WeaponGranter.GrantItem(A) |
The core call — hands the configured item to the player. |
set VaultClaimed = true |
Prevents double-grants. |
Common patterns
Pattern 1 — Grant a specific item by index on round start
If your Item Granter has multiple items configured, AwardItemIndex lets you pick exactly which slot to grant. Use this to arm players with different loadouts depending on game state.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# round_loadout_device
# Grants item at index 1 (second slot) to every player at round start.
round_loadout_device := class(creative_device):
@editable
LoadoutGranter : item_granter_device = item_granter_device{}
OnBegin<override>()<suspends> : void =
# Wait a moment for all players to fully spawn
Sleep(2.0)
# GetPlayspace().GetPlayers() returns all current players
for (Player : GetPlayspace().GetPlayers()):
# AwardItemIndex grants the item at the given 0-based index
# in the granter's configured item list
LoadoutGranter.AwardItemIndex(Player, 1)
Print("Granted loadout item index 1 to a player.")
Key point: AwardItemIndex(Agent, Index) is the call when you want a specific item from the granter's list rather than the default first item. Index is 0-based.
Pattern 2 — Grant an item when a button is interacted with (shop pattern)
A classic shop: player walks up to a button, presses it, and receives a weapon. The Item Granter handles the actual inventory transfer.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# weapon_shop_device
# Wire ShopButton and ShopGranter in the Details panel.
weapon_shop_device := class(creative_device):
@editable
ShopButton : button_device = button_device{}
@editable
ShopGranter : item_granter_device = item_granter_device{}
OnBegin<override>()<suspends> : void =
# button_device fires InteractedWithEvent with ?agent
ShopButton.InteractedWithEvent.Subscribe(OnShopButtonPressed)
OnShopButtonPressed(Agent : ?agent) : void =
if (A := Agent?):
# Grant the default (first) configured item to the buyer
ShopGranter.GrantItem(A)
Print("Shop: weapon granted to buyer.")
# Disable the button so each player can only buy once per round
ShopButton.SetEnabled(false)
Key point: button_device.InteractedWithEvent also delivers ?agent, so the same unwrap pattern applies. Disabling the button after purchase prevents exploit-buying.
Pattern 3 — Grant items to all players on a team elimination event
When a team wipes the opposing squad, reward survivors with bonus loot.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# team_wipe_reward_device
# Wire EliminationTracker (a tracker_device set to team eliminations)
# and BonusGranter in the Details panel.
team_wipe_reward_device := class(creative_device):
@editable
EliminationTracker : tracker_device = tracker_device{}
@editable
BonusGranter : item_granter_device = item_granter_device{}
OnBegin<override>()<suspends> : void =
# tracker_device fires TargetReachedEvent when the tracked value
# hits the configured target — here: team elimination count
EliminationTracker.TargetReachedEvent.Subscribe(OnTeamWipe)
OnTeamWipe(Agent : ?agent) : void =
# Reward every surviving player with a bonus item
for (Player : GetPlayspace().GetPlayers()):
BonusGranter.GrantItem(Player)
Print("Team wipe! Bonus items granted to all survivors.")
Key point: Iterating GetPlayspace().GetPlayers() and calling GrantItem in a loop is the standard pattern for rewarding all players simultaneously.
Gotchas
1. Always unwrap ?agent before calling GrantItem
TriggeredEvent and InteractedWithEvent deliver ?agent (an optional). Passing an optional directly to GrantItem is a compile error — you must unwrap first:
# WRONG — won't compile
Granter.GrantItem(Agent) # Agent is ?agent, not agent
# CORRECT
if (A := Agent?):
Granter.GrantItem(A)
2. @editable is mandatory — you cannot construct devices in code
You cannot write MyGranter := item_granter_device{} and expect it to refer to a placed device. The {} default creates an unplaced stub with no configured items. Always declare it @editable and connect it in the Details panel.
3. Item list is configured in the Details panel, not in Verse
Verse has no API to set which item the granter holds — that's done entirely in the UEFN editor. GrantItem grants whatever item is configured at index 0; AwardItemIndex lets you pick a different slot. If the granter has no items configured, calls silently do nothing.
4. AwardItemIndex is 0-based
The first item in the granter's list is index 0, the second is 1, and so on. Passing an out-of-range index silently fails — double-check your item list length in the Details panel.
5. Granting to AI agents
As of the 31.00 release notes, GrantItem works with AI agents (NPCs spawned by creature spawners). The same agent type is used — no special handling needed, but confirm the NPC can actually hold the item type you're granting.
6. Sleep before granting on OnBegin
If you call GrantItem inside OnBegin immediately, some players may not have fully spawned yet and will miss the grant. Add a short Sleep(1.0) or Sleep(2.0) before iterating players to ensure everyone is in the playspace.