[Tactics Pack] How does one stop the attack action once line of sight is broken

theishiopian

New member
Just got this asset, loving the concept and editor, but I've run into a problem. I can get the ai to attack once it sees a target, but once it starts attacking I can't get it to stop. I know that conditional aborts are the answer, but I can't seem to get the system to cooperate, no matter what I do it either keeps attacking, or can only attack once, after which it can't attack again, or even resume its patrol.

The current tree:
1611210026891.png

How could I modify this tree so that once line of sight is broken, my AI returns to its patrol route?
 
Since you are using a Lower Priority abort the Can See Object task will only be checked when Patrol is active. If you switch it to Both then it'll be checked when Attack is active as well.
 
That worked like a charm, thanks! For anyone with the same problem, this is what I have now:1611276681003.png
One thing I would be curious about is if there's a more efficient way to pass a target to the attack action than using a list, seems like it should be able to take a single target as well as a list. But if there's not that's cool, this works perfectly.
 
Top