Adjust Shop Item Quantity
Adjust Shop Item Quantity¶
Adjusts the quantity of an item in the currently open shop.
Properties¶
System¶
| Name | Explanation | Type |
|---|---|---|
| Quantity | The amount to adjust the shop item's quantity by. Positive values increase the quantity and negative values decrease it. | Variable or Value |
| Result | The switch to store whether the quantity adjustment succeeded. | Switch or Value |
| Shop Item | The variable referencing the shop item to operate on. | Variable or Value |
| Store Results | When enabled, the result of the quantity adjustment is stored in a switch. | Toggle |
Examples¶
Increase a Shop Item Quantity by 1¶
This increases the quantity of the shop item referenced by Global Variable 0 by 1.
{"Data":{"Quantity":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Result":{"IsGlobalSwitch":true,"IsLocalSwitch":false,"IsValue":false,"Value":false,"SwitchIndex":0,"Metadata":null},"ShopItem":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":0,"Metadata":null},"StoreResults":false,"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Shop.AlterShopItemQuantityCommand"}
Decrease a Shop Item Quantity and Store the Result¶
This decreases the quantity of the shop item referenced by Local Variable 1 by 3 and stores whether the adjustment succeeded in Global Switch 0.
{"Data":{"Quantity":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"-3","VariableIndex":0,"Metadata":null},"Result":{"IsGlobalSwitch":true,"IsLocalSwitch":false,"IsValue":false,"Value":false,"SwitchIndex":0,"Metadata":null},"ShopItem":{"IsGlobalVariable":false,"IsLocalVariable":true,"IsValue":false,"Value":"","VariableIndex":1,"Metadata":null},"StoreResults":true,"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Shop.AlterShopItemQuantityCommand"}