I’m making the UI for the dialogues on my game, and I have a problem with the Multiple Choice Node. My characters “says” every choice (you navigate trhought them using the text bubbles) but I have no access to the actor of this Node, so, I can’t know who must say it.
The “say choice” doesn’t help, because this only works with the selected choice.
Any way I can access the “finalActor” on the Multiple Choice Node?
Sorry, but I’m afraid I did not understand the problem 🙂
If you are making a custom UI, then you can know which actor is to say the statement from the SubtitlesRequestInfo that is the parameter of the OnSubtitlesRequest event.
Hi, sorry for not answering earlier, I didn’t get a notification.
I did that for single request nodes, my problem is that “MultipleChoiceRequestInfo” doesn’t include the Actor of the “Question” itself. I need the actor because in my game the character says every option of the MultipleChoice nodes with a portrait, and that info is in the actor.
For example, in the screenshot attached, the character will say “0”, then you can navigate trought “Choice 1” and “Choice 2” with the same UI. Once selected, It will say the next option. I need the actor for the navigation part trought the options.
Indeed the MultipleChoiceRequestInfo does not contain the IDialogueActor that is selected in the node. I just added this now.
If you want to add it as well, please make the following changes:
1) In MultipleChoiceNode.cs, change line #70 to the following:
2) In DialogueEventArguments.cs, change class MultipleChoiceRequestInfo to the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
///Send along with a OnMultipleChoiceRequest event. Holds information of the options, time available as well as a callback to be called providing the selected option
publicclassMultipleChoiceRequestInfo{
///The actor related. This is usually the actor that will also say the options
publicIDialogueActor actor;
///The available choice option. Key: The statement, Value: the child index of the option
publicDictionary<IStatement,int>options;
///The available time for a choice
publicfloatavailableTime;
///Should the previous statement be shown along the options?
publicboolshowLastStatement;
///Call this with to select the option to continue with in the DialogueTree