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

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
CodePrincess
Posts: 111
Joined: Thu Sep 27, 2018 11:06 pm

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

Post 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.
Last edited by CodePrincess on Wed Nov 13, 2019 3:24 pm, edited 1 time in total.
Thank you so much for your help.

Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Trouble updating MM Inventory Engine display through Dialogue System

Post 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 331 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 331 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.
Attachments
mmAddItem2.png
mmAddItem2.png (35.27 KiB) Viewed 331 times
CodePrincess
Posts: 111
Joined: Thu Sep 27, 2018 11:06 pm

Re: Trouble updating MM Inventory Engine display through Dialogue System

Post 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!
Thank you so much for your help.

Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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?
Post Reply