Assuming I understand you correctly, I can suggest two ways to do that:
1. Put a Dialogue Actor on each NPC. Name each reaction conversation according to the Dialogue Actor's name plus " Reaction". For example, if the NPC is "Adam", then the conversation would be "Adam Reaction". Start it like this:
Code: Select all
string title = DialogueActor.GetActorName(ProximitySelector.CurrentUsable.transform) + " Reaction";
DialogueManager.StartConversation(title, this.transform, ProximitySelector.CurrentUsable.transform);
2. Or define a Boolean variable "Reaction" in your dialogue database. Add two Dialogue System Trigger components to the NPC. Configure the first one to start the NPC's normal conversation (if any). Set its Conditions > Lua Conditions to: Variable["Reaction"] ~= true. Configure the second Dialogue System Trigger to start the NPC's reaction conversation and run Lua code to set Reaction false. Set its Conditions > Lua Conditions to: Variable["Reaction"] == true. Start it like this:
Code: Select all
DialogueLua.SetVariable("Reaction", true);
ProximitySelector.UseCurrentSelection();