fixes a few problems in ai targetting (#82998)

## About The Pull Request
fixes #82964 , fixes #82866

## Why It's Good For The Game
fixes several problems with ai targetting. this pr resolves civil war
that was brewing between several mobs. also fixes a major problem where
mobs would only search for targets and not perform any other behaviors.
also fixes a small problem where mobs would constantly stop and start
while chasing targets
## Changelog
🆑
fix: mobs in the same faction will no longer be at odds against one
another
fix: mobs can now perform behaviors alongside searching for targets
fix: mobs will no longer be starting and stopping when chasing targets
/🆑
This commit is contained in:
Ben10Omintrix
2024-05-03 02:03:55 +00:00
committed by SkyratBot
parent f1ba642e68
commit 649f2f9eaa
4 changed files with 10 additions and 7 deletions
@@ -21,6 +21,7 @@
return AI_BEHAVIOR_DELAY | AI_BEHAVIOR_SUCCEEDED
pawn.visible_message(span_notice("[pawn] calms down.")) // We can blackboard key this if anyone else actually wants to customise it
controller.clear_blackboard_key(BB_BASIC_MOB_RETALIATE_LIST)
controller.clear_blackboard_key(BB_BASIC_MOB_CURRENT_TARGET)
controller.CancelActions() // Otherwise they will try and get one last kick in
return AI_BEHAVIOR_DELAY