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

# 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)

Comments

    Sign in to vote, comment, or suggest an edit.Sign in