Use Inventory Item
Use Inventory Item¶
Applies the effects of an inventory item to a hero, consuming it if it is a consumable type.
Properties¶
System¶
| Name | Explanation | Type |
|---|---|---|
| Hero | The hero who will use the item. | Character |
| Inventory Item | The inventory item to use on the hero. | InventorySlot |
| Result | The switch to store whether the item use succeeded. | Switch or Value |
| Store Results | When enabled, the success or failure of the item use is stored in a switch. | Toggle |
Examples¶
Use an Inventory Item on Hero 0¶
This applies the effects of the inventory item referenced by its unique ID to hero 0.
{"Data":{"Hero":{"ReferenceType":0,"Index":0,"IsUniqueID":true,"Identifier":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Metadata":null},"InventorySlot":{"ReferenceType":0,"Index":0,"IsUniqueID":true,"Identifier":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Metadata":null},"Result":{"IsGlobalSwitch":true,"IsLocalSwitch":false,"IsValue":false,"Value":false,"SwitchIndex":0,"Metadata":null},"StoreResults":false,"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Inventory.UseItemCommand"}
Use an Inventory Item on Hero 2 and Store the Result¶
This uses the inventory item on hero 2 and stores whether the use succeeded in Global Switch 0.
{"Data":{"Hero":{"ReferenceType":0,"Index":2,"IsUniqueID":true,"Identifier":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"2","VariableIndex":0,"Metadata":null},"Metadata":null},"InventorySlot":{"ReferenceType":0,"Index":0,"IsUniqueID":true,"Identifier":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Metadata":null},"Result":{"IsGlobalSwitch":true,"IsLocalSwitch":false,"IsValue":false,"Value":false,"SwitchIndex":0,"Metadata":null},"StoreResults":true,"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Inventory.UseItemCommand"}