Greetings guys,
Im working on my AI’s behaviour tree and im stuck on a problem.
In my behaviour tree the AI is normally always patrolling, however when GotEnemyInSight/Hear is Set and EnemyDistance is less then 1000 it starts moving towards the player and when close attack him.
Now on the left side im trying to build something for when the player is being chases and runs further away then 1000 the AI will lose the player and start searching. During this search I want him to move to the lastPosition variable, wait there a couple of seconds and then move back IF he doesnt see the player(and lower then the 1000 EnemyDistance) during the search. now I need to put the whole AI Attack part to the left side of my AI Lost part in order to keep track if he finds him… and again and again if I want to let him watch it all the time…
Can anybody tell me how I should change my behaviour tree to make sure that during the search he keeps looking to my AI Attack part if the conditions are met let him chase the player again.
Im sorry if my explaining isnt good, I hope you guys understand if not let me know
Thanks in regards,
Falko