This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
item [2017/10/16 12:19] – created justin | item [2021/04/21 20:22] – justin | ||
---|---|---|---|
Line 4: | Line 4: | ||
An **item** represents anything that the player is able to pick up and collect in their [[inventory]] or place into [[item container|item containers]]. This includes potions, keys, weapons, or even quest items that the player must retrieve for an [[NPC]]. The items for your game are defined in the [[Item Editor]]. | An **item** represents anything that the player is able to pick up and collect in their [[inventory]] or place into [[item container|item containers]]. This includes potions, keys, weapons, or even quest items that the player must retrieve for an [[NPC]]. The items for your game are defined in the [[Item Editor]]. | ||
+ | =====Scripting===== | ||
+ | Certain item properties can be accessed from [[script|scripts]], | ||
+ | |||
+ | **Retrieving an item's name and description: | ||
+ | <code bauxite> | ||
+ | $item_name = item[" | ||
+ | $item_desc = item[" | ||
+ | </ | ||
+ | |||
+ | **Retrieving the ID and count (i.e. stack size) of an item in a storage slot:** | ||
+ | <code bauxite> | ||
+ | $item_id = widget[" | ||
+ | $item_count = widget[" | ||
+ | </ | ||
~~NOTOC~~ | ~~NOTOC~~ |