Inverting a bool parameter

Forums 💬 NodeCanvas 🗨️ General Discussion Inverting a bool parameter

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #14451
    async0x42
    Participant

      I was thinking that the invert functionality for condition tasks might be useful when setting a boolean property/field (possible other locations that takes a bool value, since it provides an easy way to invert it)

      Attached is an example showing it, there’s a couple cases where I could see it being useful (for myself at least), but figured I’d post it in case this could be a useful thing to implement for others

      (Visually, perhaps just a checkbox [] with a ! that shows up beside it, when toggled, since there’s isn’t much room for words there)

      #14453
      Gavalakis
      Keymaster

        Hey,

        I see your point, but unfortunately at this point it is not that easy to implement, because a boolean parameter is not some class of it’s own, but rather simply a matter of BBParameter, so to implement this would resort in many if then elses, which is not really good to have 🙂

        On the other hand, I am looking at implementing an expression system, so you could actualy write something like:
        ” !someVar && someOtherVar “, or
        ” (_someFloat + _speed) * Time.deltaTime ”
        etc.

        More info on that will follow 😉

        Cheers!

        #14452
        async0x42
        Participant

          No worries, that expression system will be much better when it’s done anyways, looking forward to it!

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