[DialogTree] Accessing actors on Multiple Choice Node

NodeCanvas Forums Support [DialogTree] Accessing actors on Multiple Choice Node

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12080
    elendow
    Participant

    Hi,

    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?

    Thanks for your help!

    Cheers.

    #12085
    Gavalakis
    Keymaster

    Hello,

    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.

    So, you dont have to dig into the dialogue tree or the nodes since all information needed is passed within the events raised.

    Let me know if that helpds.
    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

    #12103
    elendow
    Participant

    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.

    Thanks a lot!
    Cheers.

    Attachments:
    You must be logged in to view attached files.
    #12108
    Gavalakis
    Keymaster

    Hey,

    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:

    Let me know if that works for you.
    Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

    #12111
    elendow
    Participant

    Hi!

    That worked perfect, thank you very much!

    Cheers!

    #12116
    Gavalakis
    Keymaster

    Great!
    Thanks for letting me know, and glad I could be of help!
    I will of course keep this change in there for the next version as well 🙂

    Cheers!

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.