Can you read what conditions are in a ConditionTask?

Forums 💬 NodeCanvas ⚙️ Support Can you read what conditions are in a ConditionTask?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #16477
    asusralis
    Participant

      I have a ConditionTask that determines whether a node ‘fails’ or not, and I want to display the conditions to the user. However, I can’t seem to find a way to read each condition applied to a ConditionTask. If it’s not possible, what is the best way to do what I’m trying to do?

      #16481
      Gavalakis
      Keymaster

        Hello,

        I am a bit confused about what you mean by saying “each condition applied to a ConditionTask”, because ConditionTasks are conditions :-).

        Do you mean multiple ConditionTasks assigned (applied), within a Condition List? Can you please give an example so that I can understand?

        Thank you.

        #16480
        asusralis
        Participant

          I have a ConditionTask field that shows in the node’s inspector where I can add multiple conditions to it. It seems when I add two or more it changes to a ConditionList . I’m assuming when two or more are added it creates a ConditionList and assigns the ConditionTask field to it? I think that’s where I was confused. Is it common to just have a ConditionList field so there’s no need to cast?

          #16479
          Gavalakis
          Keymaster

            Hello again,

            Yes. When more than one task is added, a list of tasks is formed to contain the first task as well as any other added later. You can have a ConditionList (or ActionList) declared directly, but the current TaskDrawer will not work well with that. I have just modified it though so that it does and attached it for you here 🙂

            Please let me know if that works for you.

            Thanks.

            #16478
            asusralis
            Participant

              Thank you so much! It makes sense now.

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