Search For Lost Target
The Search For Lost Target branch will run when the agent saw/heard/took damage by a target and that target is no longer in the agent’s sights:
If a target was recently lost the Search bool variable will be set to true and the Bool Comparison task will return Success. The Reset task will reset the Ignore Target and Search variables so the agent will find any targets that come into sight. The Start Stop Ability task will activate the Speed Change ability which will have the agent run while searching for the lost target. The agent will then Seek towards the last known target position. As soon as the agent has arrived at that position the Search For Target task will perform the actual search. This task is parented by a Parallel Selector so the Wait task can also run at the same time. This will prevent the agent from searching too long – as soon as the Wait task returns Success the Search For Target task will also stop. Finally after the agent is done searching the Start Stop Ability task will deactivate the Speed Change task.