MultipleChoiceNode modify choices in runtime

Forums 💬 NodeCanvas ⚙️ Support MultipleChoiceNode modify choices in runtime

  • This topic has 0 replies, 2 voices, and was last updated 10 months ago by Gavalakis.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15220
    arika
    Participant

      Hi, I am making a MultipleChoiceNode that the amount of choices is variable in runtime on how many quest player can take at the moment.
      What is the suggest way to achieve this?
      Is there a way to access MultipleChoiceNode.availableChoices?
      Thank you for the help!

      #15221
      Gavalakis
      Keymaster

        Hello,
        There is no built-in way to achieve this at the moment, but you can access the node with ‘Graph.GetNodeWithTag(“tagName”)’ (just make sure to add a tag to the node from within its inspector). The availableChoices is also private at the moment and there are no AddChoice/RemoveChoice methods, therefore you will want to make it public to access it and add choices to it.

        With that said your suggestions is interesting to add as built-in. Would adding an optional pre-condition (condition task) check for each choice to filter whether it should be shown or not, work for what you want to achieve and as a feature in general?

        Let me know.

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