A simple "Timein" decorator

NodeCanvas Forums Custom Nodes & Tasks A simple "Timein" decorator

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15281
    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:
    timout
    After:
    timein

    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.

    Attachments:
    You must be logged in to view attached files.
    #15299
    Gavalakis
    Keymaster

    Looks interesting and thanks for sharing! 🙂

    Join us on Discord: https://discord.gg/97q2Rjh

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