Fair enough - this is the section of the BehaviorTree in question.
It’s cycling through a Selector - functionality is:
-
Investigation Sequence: If the AI hears the player (sets IsInvestigating to True), set the TargetLocationVector to the location the sound came from, wait 1 second, Move To to that location
-
Alert Sequence: If IsInvestigating is set, run a Selector that starts with the AttackSequence which triggers is AI CanSeePlayer is set, otherwise run a LastKnownLocation sequence (not relevant at the moment).
-
During the AttackSequence, wait 0.1 second, Focus on the target, wait, then start the BTTask_Attack.
I might need to record the gameplay because when I look at the BehaviorTree while playing, the AI successfully exists the Attack task. It looks like the issue lies with the blueprint for shooting as it appears to trigger, but won’t stop once triggered, despite having the BT set to abort the Attack task when the AI can no longer see the player.
