I feel like I might be using Group nodes wrong? I saw the FAQ about it, but a more in-depth look at it would be nice I think...
Here's my conversation. I'm attempting to have this NPC give a Quest that contains 5 sub entries.
<quest-start> conditionals check that the quest is currently "unassigned". That node chain ends with script that sets the Quest and the first 4 entries to "active".
<quest-mid> conditionals check that the quest is "active" and that the 5th entry is "unassigned". This is supposed to be like a "Huh, what are you doing? Go do the quest."
In the game once all 4 entries are done, an observation trigger sets the 5th to "active". (This is mainly for my HUD tracker to say "Return to NPC".
<quest-end> conditional simply checks that the both the quest and 5th entry are "active".
Both mid-quest and end-quest never trigger... Despite their conditionals being met. Am I doing something wrong here?
My Grouping Doesn't Seem to Work?
Re: My Grouping Doesn't Seem to Work?
Hi,
That screenshot looks correct to me. Maybe there's an issue with the conditions. Please temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. This will log a lot of information to the Console window.
For example, if the quest is active:
Here's how to interpret it:
^ Conversation started. <branch> group has no conditions, so we follow it.
^ The quest isn't in the unassigned state, so we don't use the <quest-start> group.
^ The quest is active, so we follow the <quest-mid> group. This leads to the active quest text, which we add to a list of lines that are currently true (i.e., available for the NPC to speak).
^ The quest isn't in the success state, so we don't use the <quest-end> group.
^ This is just the <START> node.
^ After evaluating all possible paths, the conversation ends up with a list of lines whose conditions are true. It then plays the first line in the list. In our case, the list only has the one line ('Huh? I told you to get...').
Side note: The first of the two "Sequencer" lines shows the sequencer command as the Dialogue System's parser understands it. The second one appears when the command actually runs and shows any special value that need to be filled in at runtime, such as 'speaker'.
That screenshot looks correct to me. Maybe there's an issue with the conditions. Please temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. This will log a lot of information to the Console window.
For example, if the quest is active:
Code: Select all
Dialogue System: Starting conversation 'New Conversation 1', actor=, conversant=NPC (UnityEngine.Transform).
Dialogue System: Add Group (NPC): ID=1:1 'branch' (True)
Dialogue System: Lua(return CurrentQuestState("My Quest") == "unassigned")
Dialogue System: Block on False Link (NPC): ID=1:2 '' Condition='CurrentQuestState("My Quest") == "unassigned"'
Dialogue System: Lua(return CurrentQuestState("My Quest") == "active")
Dialogue System: Add Group (NPC): ID=1:3 'mid' (True)
Dialogue System: Add Link (NPC): ID=1:6 'Active text.' (True)
Dialogue System: Lua(return CurrentQuestState("My Quest") == "success")
Dialogue System: Block on False Link (NPC): ID=1:4 '' Condition='CurrentQuestState("My Quest") == "success"'
Dialogue System: says ''
Dialogue System: Sequencer.Play( None()@0 )
Dialogue System: NPC says 'Active text.'
Dialogue System: Sequencer.Play( Delay(2)@0 )
Dialogue System: Sequencer: Delay(2)
Code: Select all
Dialogue System: Starting conversation 'New Conversation 1', actor=, conversant=NPC (UnityEngine.Transform).
Dialogue System: Add Group (NPC): ID=1:1 'branch' (True)
Code: Select all
Dialogue System: Lua(return CurrentQuestState("My Quest") == "unassigned")
Dialogue System: Block on False Link (NPC): ID=1:2 '' Condition='CurrentQuestState("My Quest") == "unassigned"'
Code: Select all
Dialogue System: Lua(return CurrentQuestState("My Quest") == "active")
Dialogue System: Add Group (NPC): ID=1:3 'mid' (True)
Dialogue System: Add Link (NPC): ID=1:6 'Huh? I told you to get....' (True)
Code: Select all
Dialogue System: Lua(return CurrentQuestState("My Quest") == "success")
Dialogue System: Block on False Link (NPC): ID=1:4 '' Condition='CurrentQuestState("My Quest") == "success"'
Code: Select all
Dialogue System: says ''
Dialogue System: Sequencer.Play( None()@0 )
Code: Select all
Dialogue System: NPC says 'Huh? I told you to get...'
Dialogue System: Sequencer.Play( Delay(2)@0 )
Dialogue System: Sequencer: Delay(2)
Side note: The first of the two "Sequencer" lines shows the sequencer command as the Dialogue System's parser understands it. The second one appears when the command actually runs and shows any special value that need to be filled in at runtime, such as 'speaker'.