# Source URL: https://dev.epicgames.com/community/learning/tutorials/DE4L/fortnite-f653e5
# Local doc: verse-cortex-epic-docs/community/learning/tutorials/DE4L/fortnite-f653e5.md
# Section: editableではなければ
OnInteractButton(Agent:agent):void=
if:
RootInventory := GetRootInventory[Agent]
then:
NewItemEntity := Acorn_Creative_V1_Common{}
RootInventory.AddItemDistribute(NewItemEntity)
Verse Libraryverse
03 Editable
Adds a specific item entity to a player's root inventory upon interaction, useful for granting loot or quest rewards.
extracted-snippets/community/learning/tutorials/DE4L/fortnite-f653e5/03-editable.verse