Reorder MultipleChoice options

Forums 💬 NodeCanvas ⚙️ Support Reorder MultipleChoice options

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #18235
    patientzerogames
    Participant

      Hi,

      is it somehow possible to change the order of choices in the MultipleChoice node of DialogueTrees?
      I often have several choices in my dialogue trees that are ordered “logically” based on their tone. But when I want to add a choice at a later stage it automatically gets added to the bottom of the list and I can’t find a way to change its position other then deleting all choices that are “above” it.

      Thanks

      #18240
      zsoik
      Participant

        Usually the choices are ordered in the way the outgoing connections are ordered. Did you try moving the outgoing nodes? That should reorder the choices, too.

        #18239
        patientzerogames
        Participant

          Hi zsoik

          how do I reorder the outgoing connections? All I can achive is to change which choice leads to which answer, but the order of the choices stays the same (#8 allways stays at the top in the gif and is also the first choice in game no matter what).

          Nodecanvas reordering

          #18238
          zsoik
          Participant

            Ah I see, from my experience it’s not possible to reorder the actual list of choices on the multiple-choice node. But from looking at MultipleChoiceNode.cs it should be relatively easy to implement reorder up/down buttons, as the availableChoices list just needs to be reordered.

            Edit: It actually is very easy. Open up MultipleChoiceNode.cs and after

            add

            That does allow you to reorder the choices with two buttons, moving the choice up or down. I haven’t tested the behaviour at runtime though, maybe the connections and the attached conditions won’t get reordered properly, even though in the graph editor it all seems to be correct.

            #18237
            patientzerogames
            Participant

              Thanks for the code.
              It still isn’t the most user friendly approach but it does the trick.

              @GAVALAKIS it would be nice if you could add something like this into the next release.
              And I’ve noticed that the X button (and the added “UP” and “DN” buttons) do not show if the statement of a choice is too long.
              So I’ve added this for now:

              #18236
              Gavalakis
              Keymaster

                Thanks for your input guys.
                I will wrap up and add zsoik’s proposition in the next version!

                Thanks!

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