Script Version 1 Released October 28, 2019.
This script addresses problem where 2 enemy AI are too close together and they either do not shoot (and jerk around), or shoot through each other without hitting each other. I encountered this a few times in my Scripted AI CQB Movement script, and decided it would be fun to solve it with a melee attack.
Videos:
I'm adding this to my Scripted AI CQB Movement script. But someone else might want to use this for other purposes (AI scripts, cutscenes, etc.). So here it is if someone wants the whole thing or pieces of it.
Download V1 zip file and put unzip folder to your missions directory:
Features:
Loop senses when AI within 2 meters of enemies, and chooses one AI to do melee attack.
AI uses Forehand/Backhand/Overhead strike animations with rifle attached to hand.
Strike pushes near enemies back to give fighter some breathing room (very helpful when being ratpacked by zombies!)
Randomized Loser reactions:
Drop weapon
Ragdoll to ground after strike
Try and pull pistol after losing primary weapon
Striker executes victim after striking him.
Pain grunts and shouts using in-game voice files (all vanilla voice languages supported)
Thanks to @LSValmont, @GEORGE FLOROS GR, EO and others for suggestions and support.