A simple "Timein" decorator

Forums 💬 NodeCanvas 🤩 Custom Nodes and Tasks A simple "Timein" decorator

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12827
    mallninjamax
    Participant

      After growing tired of stacking a half-dozen decorators around a Timeout, I decided it was time to make a TimeIN decorator. The functionality I wanted was a short delay timer from when the player enters the view of my monster, to when the monster actually detects them. But I ended up using it in a couple other places already. The key problem with reversing a Timeout’s status, is that I also needed the branch to be interrupted and return Failure if the child node ever fails. Timeout only returns one status. The image below shows the length I had to go to to get that functionality.

      Before:
      [attachment file=”timout.jpg”]
      After:
      [attachment file=”timein.jpg”]

      My decorator will return Running if the child node returns Success or Running. If the child fails, it returns Failure. If the timein period is reached, and the child is still returning Success or Running, it will return Success.

      #12828
      Gavalakis
      Keymaster

        Looks interesting and thanks for sharing! 🙂

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