So I'm trying to improve my "silence" effect script. Originally, it worked by repeatedly casting InterruptCast() on a target. However this causes the AI to derp; they keep trying to cast spells instead of taking out their weapons to attack. So to compensate, I'm trying to force them to equip their weapons using abPreventRemoval in EquipItem or EquipItemEx to well, try to prevent them from removing their weapon. The parameter doesn't seem to work at all though. Actors will briefly equip their fists but then take their spells out afterwards.
I tried a simple EquipItem(Unarmed, true) on non spell casting targets and get the same results: the target will briefly equip their fists, but then go back to using their weapon. I don't believe its directly related to the fists weapon, as I also forced an NPC to wield a dagger in their inventory and got similar results.
Has anyone gotten this parameter to work for NPCs?
Also, for the silence effect, I don't set their magicka to 0, as this prevents magicka draining effects (lightning or similar effects) to not actually take effect. I also don't want to change the actors combat style, as that's an actorbase function and will affect anyone sharing the same actorbase (although this situation may be unlikely). But, I'd still like a way to stop NPCs from derping when silenced... :/