Hi, I would make a new boolean in the blackboard (something like “MoveToTargetLocation”) and set it initially to true in your controller. Then make a new decorator to check wether or not a boolean blackboard key value is true (return true if true, false if false) and use that to check wether or not execute the move to. Then make a new “task” that sets a boolean blackboard key. And after the move to set the boolean value “MoveToTargetLocation” to false. So then it will execute that branch only once (unless you set “MoveToTargetLocation” to true again.) And of course this branch should be left of the roaming branch (so it will only execute the roaming branch if this branch fails).
I want to make some simple enemy AI. It’s supposed to spawn, instantly run to a pre-defined spot (a player structure) and after that roam around. When a player is seen, it should chase and attack the player.
So I have a task that finds the first location, sets it in the blackboard. Then a simple MoveTo brings the AI there (works fine). After that, AI should be in roaming state, so I want this to be done only once (the enemies start way off, run to the player camp and roam there). Is there some sorta OnSuccess I can call after the MoveTo so I can flip a boolean “Stage 1 done” or something like that?
Maybe I didn’t quite understand… Do I even need a boolean in order to deactivate a whole branch from being repeated again or does it work with hirarchy somehow?
Also, does anyone know any good knowledge base for AI development or is there nothing more to it?
(Following this guide and the videos referenced by it)