Each Conversation Trigger has a Condition section. You can use a Dialogue System variable.
For example, let's say you have two conversations:
Lesson 1
Lesson 2
You can define a Boolean variable named "FinishedLesson1" that starts False. At the end of the Lesson 1 conversation, set the variable True. (In the Script field: Variable["FinishedLesson1"] = true)
Then set the Conditions on the Conversation Triggers:
Each Conversation Trigger has a Condition section. You can use a Dialogue System variable.
For example, let's say you have two conversations:
Lesson 1
Lesson 2
You can define a Boolean variable named "FinishedLesson1" that starts False. At the end of the Lesson 1 conversation, set the variable True. (In the Script field: Variable["FinishedLesson1"] = true)
Then set the Conditions on the Conversation Triggers:
Finally, you'll want to re-randomize "X" at the end of the conversation. Add a Lua On Dialogue Event component to the NPC. Set the Trigger to OnConversation. Add an element to On End, and use the same Lua as before:
Another approach is to skip all of these components. Use a single Conversation Trigger. In the conversation, set a random variable and branch to different sub-conversations as described in this post.
claudius_I wrote:in set enable on dialogue event. the only one script disable is selector. how i can fix that?
Do you want to assign more scripts? If so, increase the Size fields. This will make the lists bigger so you can assign more scripts.
If that's not the problem, please reply with more details or a screenshot explaining what you want to do.
I only can select (gameobject) in target and always is the same script (protagonista).
other problem that i have is when the conversation start. The name of the character is the name of the (Gameobject) and not the that writed in dialogue database.
claudius_I wrote:I only can select (gameobject) in target and always is the same script (protagonista).
You can drag a specific component into the target slot. Click and hold on the component title, and drag it into the target slot.
If the component is on a different GameObject, you'll need to use two Inspector tabs: To open another Inspector tab, right-click on another tab such as Game and select Add > Inspector. On one Inspector, select the GameObject with the Set Enabled On Dialogue Event, and click the padlock in the upper right to lock it. Then select the other GameObject, and drag the component title from one Inspector to the other.
claudius_I wrote:other problem that i have is when the conversation start. The name of the character is the name of the (Gameobject) and not the that writed in dialogue database.