Condition List problem

Forums 💬 NodeCanvas ⚙️ Support Condition List problem

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #18930
    ratking
    Participant

      Hallo,

      is it possible that the Condition List is not doing a certain, useful optimization for “All True Required”? That is, stopping evaluation as soon as it hits a False.

      Example: I have this constellation: http://i.imgur.com/xYEJR1W.jpg – and when the variable $TargetPlayer is null, it should just stop and return Fail. But instead it throws an error, as it still tries to evaluate the distance check with a GameObject that is now null.

      #18934
      Gavalakis
      Keymaster

        Hello,

        Yes, I had commented that code when I was looking after something and forgot it.
        Please open up ConditionList.cs and uncomment code at lines #75-80.

        Let me know and thanks for the reminder.

        #18933
        ratking
        Participant

          Hey, that seems to work. Interesting enough, this was even my main problem – is it true that I can’t really check a GameObject for null via the CheckVariable<GameObject> condition? Somehow I never get False, because if I keep Value B as “None (GameObject)”, it’s not equal to null. Should I use something else to check for null – or just write my own node?

          #18932
          Gavalakis
          Keymaster

            Hey,

            Please use the “Check Unity Object” for Unity objects. That’s because of the special null operator that Unity objects use and the reason why the generic CheckVariable won’t work in many cases.

            Thanks 🙂

            #18931
            ratking
            Participant

              I see… thanks!

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