Page 2 of 2

Re: Just bought Inventory Engine, & playmaker for Dialogue System, are there any tutorials on how to use them together?

Posted: Fri Feb 02, 2024 9:47 pm
by Tony Li
Glad to help!

This is just kind of a proof of concept. You may need to tweak it to do exactly what you want in your game.

Re: Just bought Inventory Engine, & playmaker for Dialogue System, are there any tutorials on how to use them together?

Posted: Mon Feb 05, 2024 3:16 am
by need_verification
Tony Li wrote: Fri Feb 02, 2024 9:47 pm Glad to help!

This is just kind of a proof of concept. You may need to tweak it to do exactly what you want in your game.
I've been able to tweak it mostly to what I'd like it to do :)

I am a little lost though, in the original package, how does it know the player is selecting the correct item (the "apple") and continuing the conversation?

I would like to be able to determine what Item needs to be check for.

----------------------------------------------------------
I tried messing with this code:
SendMessage(Open,,SelectFruitDisplay);
WaitForMessage(SelectedItem)

and

mmRemoveItem("RogueMainInventory", Variable["SelectedItem"], 1)

I assumed it was going off the "apple ID" but when I looked at the scriptable object, the ID was a string :
I can't seem to figure it out. Sorry for being a hassle.

Re: Just bought Inventory Engine, & playmaker for Dialogue System, are there any tutorials on how to use them together?

Posted: Mon Feb 05, 2024 8:59 am
by Tony Li
Hi,

You'll want to use the Conditions section to check the value of Variable["SelectedItem"]. Here's an updated example that adds a Ball item:

DS_InventoryEngine_SelectItemExample_2024-02-05.unitypackage

The conversation now looks like this:

conditionalItem.png
conditionalItem.png (15.15 KiB) Viewed 280 times

There's an empty "delay" node between the node that opens the UI and the conditional nodes. This prevents the conversation from trying to check the value of the variable before the player has selected something from the UI.

The bottom two nodes check the value of the variable, and the conversation chooses one of them accordingly.