Original Discord Post by newbietechbro | 2024-08-22 00:18:08
I want to have different sections start depending on which tracked image is detected. Is there a way to make it so that the npc doesn’t automatically start from a section?
Images:
Original Discord Post by newbietechbro | 2024-08-22 00:18:08
I want to have different sections start depending on which tracked image is detected. Is there a way to make it so that the npc doesn’t automatically start from a section?
Images:
Reply by k3kalinix | 2024-08-22 21:29:15
<@1118275510926053447>
Reply by sconvai | 2024-08-22 23:53:27
We have something called as decision only start section. For that you can create first section with no objective. Then connect all your possible start section with decision. Then based on your decision the connected section will become the start section.
Reply by sconvai | 2024-08-22 23:53:31
<@796390213164859422>
Reply by newbietechbro | 2024-08-23 14:12:39
I see, I will look into that then thanks.
Reply by newbietechbro | 2024-08-26 14:04:27
<@1118275510926053447> and for anyone else looking into this: I want the npc to automatically start a section depending on which tracked image is scanned. So, I tried to have two separate “starts” each with their own trigger and depending on which tracked image I scan, it will set the selectedTriggerIndex variable in NarrativeDesignTrigger.cs accordingly through a singleton, therefore triggering the appropriate section to start with when the npc spawns. This works.
However, as the interaction goes down the narrative tree, the npc doesn’t follow the decisions accurately. For example, intro 2 should connect to Tour part 2.1 but it will always connect to intro 1. Basically, the npc always jumps back to intro 1 even if its not part of the narrrative flow.
I also tried to have an “Empty” start section with not objective and have the narrative branch off into two separate “parts”. That didn’t work either as the npc does not always connect to the next section properly.
Has anyone found a solution to this or has tried something similar? Is the only option to have separate characters if I want different decision trees?
Images:
Replying to newbietechbro’s Message
Reply by newbietechbro | 2024-08-26 14:04:27
<@1118275510926053447> and for anyone else looking into this: I want the npc to automatically start a section depending on which tracked image is scanned. So, I tried to have two separate “starts” each with their own trigger and depending on which tracked image I scan, it will set the selectedTriggerIndex variable in NarrativeDesignTrigger.cs accordingly through a singleton, therefore triggering the appropriate section to start with when the npc spawns. This works.
However, as the interaction goes down the narrative tree, the npc doesn’t follow the decisions accurately. For example, intro 2 should connect to Tour part 2.1 but it will always connect to intro 1. Basically, the npc always jumps back to intro 1 even if its not part of the narrrative flow.
I also tried to have an “Empty” start section with not objective and have the narrative branch off into two separate “parts”. That didn’t work either as the npc does not always connect to the next section properly.
Has anyone found a solution to this or has tried something similar? Is the only option to have separate characters if I want different decision trees?
Reply by sconvai | 2024-08-26 20:53:38
This should not happen. Can you confirm that you are correctly maintaing session. When you first invoke trigger it will return you a session-id. You need to pass that session-id in all the subsequent interactions, otherwise it will always goes back to original Intro1 start section.
Reply by newbietechbro | 2024-08-27 11:15:34
Do you mean in narrativedesignmanager.cs or in the inspector? But in the narrative design, I already specify that after Intro2, it should either go to 2.1 or end.
And also it seems like even when i click “Check for Update” in the inspector, it doesn’t reflect the latest narrative design. On the convai site, I got rid of End1 and End2 but those sections are still seen in the inspector
Images:
Reply by k3kalinix | 2024-08-27 11:19:28
<@&1163218322200989806>
Replying to newbietechbro’s Message
Reply by newbietechbro | 2024-08-27 11:15:34
Do you mean in narrativedesignmanager.cs or in the inspector? But in the narrative design, I already specify that after Intro2, it should either go to 2.1 or end.
And also it seems like even when i click “Check for Update” in the inspector, it doesn’t reflect the latest narrative design. On the convai site, I got rid of End1 and End2 but those sections are still seen in the inspector
Reply by starboy_24 | 2024-08-28 08:21:07
You are not accidentally invoking the trigger1 right? Because if you just invoke trigger2 and then go down the intro2 section it should work properly. Can you show how you are handling the ND triggers inside unity?
Reply by starboy_24 | 2024-08-28 08:22:11
As for the ND sections updating, I tested it and it worked well, could you please check deleting them and clicking check for updates. If doesn’t work we can get on a call
Reply by newbietechbro | 2024-08-28 10:51:24
No i am not, I deliberately invoke trigger2 in the code. It does invoke trigger2 (plays section intro 2) but it doesn’t connect to section 2.1 as intended, and rather connects to intro1 (which is not a connecting that I have made in the graph)
Replying to starboy_24’s Message
Reply by starboy_24 | 2024-08-28 08:22:11
As for the ND sections updating, I tested it and it worked well, could you please check deleting them and clicking check for updates. If doesn’t work we can get on a call
Reply by newbietechbro | 2024-08-28 11:03:00
I have a base scene (scanner.cs) that determines the SelectedTriggerIndexSetter.Instance.selectedTriggerIndex
And then I use that in narrativedesigntrigger.cs
Images:
Reply by newbietechbro | 2024-08-28 11:06:02
by the way, the narrative design works fine if I scan the image that starts trigger one (it will follow the narrative design path fro intro1 to 1.4 to end), it just doesn’t follow the path if it starts at trigger two
Reply by k3kalinix | 2024-08-29 22:25:15
<@679221735458996224>
Reply by k3kalinix | 2024-09-22 21:47:17
Are you still facing the issue?
If so, could you please share the Session ID?
This conversation happened on the Convai Discord Server, so this post will be closed.