Custom node system?

Take a look at the behaviour trees:

Scrub through, see if it’s applicable.