Verse Library verse

02 Organizing With Modules

Defines configurable inventory classes with limits, consumption rules, and icons for items.

extracted-snippets/documentation/en-us/fortnite/in-island-transactions-best-practices-and-debugging-in-fortnite/02-organizing-with-modules.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/in-island-transactions-best-practices-and-debugging-in-fortnite
# Local doc:  epic-docs/documentation/en-us/fortnite/in-island-transactions-best-practices-and-debugging-in-fortnite.md
# Section:    Organizing with Modules
Entitlements<public> := module:
using { EntitlementInfo }
# Using custom entitlement class to distinguish your entitlements.
my_island_entitlement<public> := class<abstract><castable>(entitlement){}
corn_seed_pack<public> := class<concrete>(my_island_entitlement):
var Name<override> : message = CornSeedPacket.Name
var Description<override> : message = CornSeedPacket.Description
var ShortDescription<override> : message = CornSeedPacket.ShortDescription
var Icon<override> : texture = # insert texture here
# Maximum of 10 corn seed packets in the inventory
MaxCount<override> : int = 10
# Each corn seed packet is consumable - usage removes it from Player's inventory
# To be implemented: consuming grants 10 corn seed entitlements
Consumable<override> : logic = true
PaidRandomItem<override> : logic = false
PaidArea<override> : logic = false

Comments

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