Hello,
I am looking into actions on successful state. I have integrated to MoreMountains Inventory Engine (via Topdown engine).
I see there is a way to insert an item into the inventory. How is it suppose to work? I added the name of the inventory then it asks me to add the name of the item. What name is it referring to and how is it suppose to find it?
How to add item as reward to inventory?
-
- Posts: 39
- Joined: Sat Apr 20, 2024 7:03 pm
How to add item as reward to inventory?
- Attachments
-
- Screenshot 2024-04-26 at 21.27.37.png (102.05 KiB) Viewed 1463 times
Re: How to add item as reward to inventory?
Hi,
You'll generally add an Add Inventory Engine Item quest action to a quest's Successful state > Actions list or to the Success node's or Return To NPC node's > True > Actions list. See the Inventory Engine integration's Get Apples quest -> Return node -> True state > Actions list. It adds a blue shirt and removes 3 apples.
Inventory Engine identifies inventories by GameObject name. In the example, the inventory is named "RogueMainInventory".
The Add Inventory Engine Item quest action identifies items by their Item ID, which you can see if you inspect the item ScriptableObject asset in Resources/Items. You can have as many Resources folders as you want, but item assets must be in a subfolder named "Items" inside a Resources folder.
You'll generally add an Add Inventory Engine Item quest action to a quest's Successful state > Actions list or to the Success node's or Return To NPC node's > True > Actions list. See the Inventory Engine integration's Get Apples quest -> Return node -> True state > Actions list. It adds a blue shirt and removes 3 apples.
Inventory Engine identifies inventories by GameObject name. In the example, the inventory is named "RogueMainInventory".
The Add Inventory Engine Item quest action identifies items by their Item ID, which you can see if you inspect the item ScriptableObject asset in Resources/Items. You can have as many Resources folders as you want, but item assets must be in a subfolder named "Items" inside a Resources folder.
-
- Posts: 39
- Joined: Sat Apr 20, 2024 7:03 pm
Re: How to add item as reward to inventory?
Worked like a charm, thank you!
Re: How to add item as reward to inventory?
Glad to help!