So I made a http://www.nexusmods.com/skyrim/mods/57506/? that allows followers to loot dead bodies and containers after combat ends. It does what it's supposed to, but some of my users have noticed that followers are unresponsive while in combat and just stand there while enemies hack away at them.
Each follower is put into an alias in a start enabled quest which has this script attached:
GlobalVariable Property po3_LOOT_CheckForCombatGlobal Auto Actor Property PlayerRef Auto ReferenceAlias Property Alias_Follower Auto ;---------------- EVENT ONCOMBATSTATECHANGED() ----------------Event OnCombatStateChanged(Actor akTarget, int aeCombatState)Actor Follower = Alias_Follower.GetReference() as ActorIf PlayerRef.IsInCombat() po3_LOOT_CheckForCombatGlobal.SetValue(0.0) Debug.Notification("Player is in combat")else po3_LOOT_CheckForCombatGlobal.SetValue(1.0) Follower.EvaluatePackage() ;start loot package Debug.Notification("Player is no longer in combat")endif Utility.Wait(Utility.RandomFloat(40.0,60.0)) po3_LOOT_CheckForCombatGlobal.SetValue(0.0) SheatheWeaponIfDrawn()EndEvent
These followers have several Acquire packages (all interrupt flags are checked and Weapons Unequipped flag is set) on them with these conditions:
PL GetCombatState == 0 AND
S GetGlobalVariable po3_LOOT_CheckForCombatGlobal == 1 AND
S GetInFaction po3_LOOT_LootXFaction == 1 AND
I'm really not sure what's going on here. In my testing all followers start fighting as soon as combat starts but some just give up and just stop halfway.
Is there any function to 'poke' them so they start fighting again?