Change condition priorities with C#
Posted: Thu Jun 22, 2023 4:23 am
Hi,
I want to change the condition priorities on a node with C#.
What I am trying to do is:
1- Somehow assign this variable with the DialogueEntry for node 1.
2- Once it is assigned I access its Link list
3- Then I do something like this to change a specific link priority
Currently changing the priority does nothing. I suspect it is because I have a copy and not the actual connection with the node data. So I am changing the copy instead of the real deal.
EDIT:
I also tried this, but it still doesn't work. I am not quite sure if this is the right approach to begin with..
I want to change the condition priorities on a node with C#.
What I am trying to do is:
1- Somehow assign this variable with the DialogueEntry for node 1.
Code: Select all
DialogueEntry parent_Respond_BTN = ??? ;
Code: Select all
List<Link> responses_Links
Code: Select all
DialogueManager.masterDatabase.GetDialogueEntry(responses_Links[2]).conditionPriority = ConditionPriority.High;
EDIT:
I also tried this, but it still doesn't work. I am not quite sure if this is the right approach to begin with..
Code: Select all
DialogueEntry parent_Respond_BTN = DialogueManager.masterDatabase.GetDialogueEntry(12, 6);
parent_Respond_BTN.outgoingLinks[2].priority = ConditionPriority.High;
parent_Respond_BTN.outgoingLinks[3].priority = ConditionPriority.High;