I’m glad you bumped this, there was an issue in the last behavior tree I posted for @CrispyArrow and I wasn’t able to get back here.
Just in case anyone else was looking here, given the way the attack harness is setup my behavior tree won’t work, but we can rework it so that it does:
root
parallel (succeed: any, fail: any, tie breaker: fail)
sequencer (repeat: forever)
detect (form variable: attacktarget)
custom action (class: AIChooseAttackPosition)
sequencer
parallel (succeed: any, fail: any, tie breaker: fail)
custom action (repeat: until success, class: AIUpdateAttackPosition)
waypoint patrol
move
sequencer (repeat: until failure)
custom action (class: AIUpdateAttackPosition)
move (move target: attackposition)
move (face target: attacktarget)
I believe this would work. Honestly I’m not very happy with the way it turned out though. I feel like AIUpdateAttackPosition should return a success/failure, but I understand why it doesn’t (we never wanted a case where an AI took a position and never gave it back).
I have some plans on taking our attack harness and doing further things with it. Maybe add it to the starter kit, it is pretty useful.