This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
shop_item_slot [2020/12/02 18:31] – justin | shop_item_slot [2022/05/11 16:00] (current) – justin | ||
---|---|---|---|
Line 7: | Line 7: | ||
^Icon^Property^Description^ | ^Icon^Property^Description^ | ||
|{{: | |{{: | ||
+ | |{{: | ||
+ | |{{: | ||
=====Scripting===== | =====Scripting===== | ||
- | You can access certain properties of an shop item slot from a [[script]] by simply referencing the parent [[widget]] and the element by their unique IDs. See below for examples of retrieving the slot's [[item]]. In this case, we are assuming that the slot currently contains an [[item]], the [[widget]] has an ID of " | + | You can access certain properties of a shop item slot from a [[script]] by simply referencing the parent [[widget]] and the element by their unique IDs. See below for examples of retrieving the slot's [[item]]. In this case, we are assuming that the slot currently contains an [[item]], the [[widget]] has an ID of " |
**Retrieving the item data for a shop item slot:** | **Retrieving the item data for a shop item slot:** | ||
Line 15: | Line 17: | ||
$item_id = widget[" | $item_id = widget[" | ||
$item_count = widget[" | $item_count = widget[" | ||
+ | </ | ||
+ | |||
+ | **Changing the cost of an item in a shop item slot:** | ||
+ | <code bauxite> | ||
+ | widget[" | ||
</ | </ | ||