Page 1 of 1

[Solved!]Trouble updating MM Inventory Engine display through Dialogue System

Posted: Sun Nov 10, 2019 2:29 pm
by CodePrincess
Nice to see everybody today!

So, I put the Inventory, Inventory Engine Lua and Dialogue System Inventory Event Listener scripts on the Dialogue Manager
and created a BaseItem asset. mmAddItem() successfully added the item to Dialogue manager's Inventory, but It does
not appear in the Inventory display itself.

Any ideas on what's wrong?

Thank you for your patience.

Re: Trouble updating MM Inventory Engine display through Dialogue System

Posted: Sun Nov 10, 2019 4:39 pm
by Tony Li
Hi!

Are there any errors or warnings in the Console window?

After mmAddItem(), if you inspect the inventory, does the Inspector show the item? For example, in the screenshot below the inventory shows a Teddy Bear:

mmAddItem1.png
mmAddItem1.png (44.43 KiB) Viewed 333 times

If you add the item to the Inventory at design time and then play the scene, does it appear in the UI? The screenshot below shows the Teddy Bear added at design time:

mmAddItem1.png
mmAddItem1.png (44.43 KiB) Viewed 333 times

If it doesn't show up in the UI, check your item asset's configuration.

You can also try setting up an item picker (for example, look at the prefab RetroCoinPicker), pick up the item without using the Dialogue System, and see if it shows in the UI.

Re: Trouble updating MM Inventory Engine display through Dialogue System

Posted: Wed Nov 13, 2019 3:24 pm
by CodePrincess
Making ItemPicker objects for all the items did the trick; they can even be deactivated! Also, interestingly, you need the Adventurer Game Object for the Inventory to work, too. Maybe because of the SetComponentEnabledOnDialogueEvent script?

Anyway, I can now update the inventory though Dialogue Menu! Onward to my trickiest situation yet!

Thank you again, for making this dream possible!

Re: [Solved!]Trouble updating MM Inventory Engine display through Dialogue System

Posted: Wed Nov 13, 2019 3:39 pm
by Tony Li
Glad to help!

The Adventurer GameObject shouldn't be necessary. The Set Component Enabled On Dialogue Event isn't really necessary either; it just disables the Adventurer's InventoryDemoCharacter component during conversations. What wasn't working without the Adventurer?