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.
[Help] Multiple child objects with Dialogue System Events
Re: [Help] Multiple child objects with Dialogue System Events
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.
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.
Re: [Help] Multiple child objects with Dialogue System Events
Thanks for the response Tony. Is this what you're talking about
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()?
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.
Re: [Help] Multiple child objects with Dialogue System Events
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.
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.
Re: [Help] Multiple child objects with Dialogue System Events
By using your scene and doing some debugging, it looks like this conversation here
is also triggering the Dialogue system event here
before the 2nd conversation starts.
I wondering if this is intended behavior, if it is, I could try to work around it.
is also triggering the Dialogue system event here
before the 2nd conversation starts.
I wondering if this is intended behavior, if it is, I could try to work around it.
Re: [Help] Multiple child objects with Dialogue System Events
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:
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: