Page 1 of 1

[Fixed!] Sending Messages between DS and AC

Posted: Fri Jul 24, 2020 5:32 pm
by CodePrincess
Hi everybody! It's nice to be back!

So, since the last time I was here, I've swapped out my first inventory system for Adventure Creator, which I love, but now I have to relearn a couple of things.

In this project you can cause an inventory to open up by using a variable as a flag. I want it to open at the end of a line of dialogue wait for the player to select an item, then update DS' variable to reflect the results. The dialogue should not advance until the inventory is closed. I remember learning about messages here a few months back, and tried to use them here, but it's not quite working yet.

Here's what an inventory summon looks like:
https://www.mediafire.com/view/t4w3cz8b ... 1.png/file

Here's where I try to update the message in Adventure Creator's action list:
https://www.mediafire.com/view/1murcfgy ... 2.png/file

And this is how it behaves in runtime. I notice that the dialogue progresses a couple of lines before stopping, despite the
continue@ command. At least, I think it's not supposed to advance until the inventory closes:
https://www.mediafire.com/view/8gkvv7ax ... 3.png/file

Thank you very much for lending your ear. I'm so excited about sharing this game when it's finally ready!

Re: Sending Messages between DS and AC

Posted: Fri Jul 24, 2020 6:00 pm
by CodePrincess
Oh, I forgot! I'm using Adventure Creator v. 1.71.7, Unity 2019.4.0f1 and Pixel Crushers' Dialogue System for Unity v 2.2.7!

Re: Sending Messages between DS and AC

Posted: Fri Jul 24, 2020 8:07 pm
by Tony Li
Hi! Welcome back!

In the second image (InventoryClosed02.png), I see the AC actionlist uses a Dialogue System Sequencer Message action.

How/when does this actionlist run? Are you sure it's running when the inventory is closed, and not before?

Side note: I don't know if this is a related issue, but {group} nodes are always pass-through. As long as it doesn't have false Conditions, when the conversation reaches a {group} node, it will immediately progress to the next node.

Re: Sending Messages between DS and AC

Posted: Fri Jul 24, 2020 8:50 pm
by CodePrincess
In the second image (InventoryClosed02.png), I see the AC actionlist uses a Dialogue System Sequencer Message action.

How/when does this actionlist run? Are you sure it's running when the inventory is closed, and not before?
It's connected to the "present" button and runs right before the Close Menu action.

Hold on....

Oh my gosh! Of course!

I needed to do the "continue() @Message("ClosedInventory") bit on the node beneath the inventory call, not the call itself!
Messages work just fine!
Thank you for pointing me in the right direction as always, Tony!

Re: Sending Messages between DS and AC

Posted: Fri Jul 24, 2020 8:55 pm
by Tony Li
Happy to help! Glad it's working now. :-)