[Fixed!] Sending Messages between DS and AC

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

[Fixed!] Sending Messages between DS and AC

Post 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!
Last edited by CodePrincess on Fri Jul 24, 2020 8:57 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
CodePrincess
Posts: 111
Joined: Thu Sep 27, 2018 11:06 pm

Re: Sending Messages between DS and AC

Post 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!
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: Sending Messages between DS and AC

Post 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.
CodePrincess
Posts: 111
Joined: Thu Sep 27, 2018 11:06 pm

Re: Sending Messages between DS and AC

Post 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!
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: Sending Messages between DS and AC

Post by Tony Li »

Happy to help! Glad it's working now. :-)
Post Reply