[Help] Multiple child objects with Dialogue System Events

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
jnhasty7
Posts: 16
Joined: Sun Apr 28, 2019 8:21 pm

[Help] Multiple child objects with Dialogue System Events

Post by jnhasty7 »

Hello,

I'm trying to disable/enable dialogue interactions after one is complete.
I'm trying to use the Dialogue System Events to achieve this, but the Dialogue System event doesn't seem to be switching the next child object to active.

So I'm trying to set active true the game object of the next dialogue, and then next set active false of the previous like shown below, but it's not working.

Image
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: [Help] Multiple child objects with Dialogue System Events

Post by Tony Li »

Hi,

What you're showing in the screenshots should work. However, the conversation must use 'Seranez' or 'Seranez explains it' as the actor or conversant GameObject. For example, if you're starting the conversation using a Dialogue System Trigger, then Seranez should be assigned to Actions > Start Conversation > Conversation Conversant or Conversation Actor. This table explains which GameObjects receive OnConversationStart and OnConversationEnd messages. If the GameObject doesn't receive the message, then the Dialogue System Events won't run.
jnhasty7
Posts: 16
Joined: Sun Apr 28, 2019 8:21 pm

Re: [Help] Multiple child objects with Dialogue System Events

Post by jnhasty7 »

Thanks for the response Tony. Is this what you're talking about

Image

I have that set on both.

Could it be that I have two children with Dialogue System events, and when one conversation ends, both of those dialogue system events are running their OnConversationEnd()?
Last edited by jnhasty7 on Fri May 24, 2019 11:09 am, edited 1 time in total.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: [Help] Multiple child objects with Dialogue System Events

Post by Tony Li »

Yes, that looks correct. Here is an example scene in which I tested it:

ActivateDeactivateExample_2019-05-24.unitypackage

Perhaps you can compare it to your own scene to see if there are any important differences.

Please feel free to send an example to tony (at) pixelcrushers.com. I'll be happy to take a look.
jnhasty7
Posts: 16
Joined: Sun Apr 28, 2019 8:21 pm

Re: [Help] Multiple child objects with Dialogue System Events

Post by jnhasty7 »

By using your scene and doing some debugging, it looks like this conversation here

Image

is also triggering the Dialogue system event here

Image

before the 2nd conversation starts.
I wondering if this is intended behavior, if it is, I could try to work around it.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: [Help] Multiple child objects with Dialogue System Events

Post by Tony Li »

Yes, that can happen. It's the way Unity handles messages.

You could remove the GameObject.SetActive entry from Dialogue System Events, and instead use the SetActive() sequencer command with a very short delay to prevent it from coming active on the same frame that the OnConversationEnd message is being sent:

setActive.png
setActive.png (22.06 KiB) Viewed 690 times
Post Reply