I've tried resurrecting the original actors, applying a shader and sending them on their way, but a lot of commands don't work on resurrected actors I think, so I'm not bothering with it anymore. Now I'm spawning a zombie actor on top of anyone that dies who has the zombie ability. The zombie ability is first given through a typical on target script spell, but it has to subsequently spread to everyone that this actor kills.
All of that works fine and dandy (after a day or so of frustration) except that the zombies just have some typical draugr rags on. I want them instead to have all of the equipment that the original actor had, to make it a bit more convincing. So, I wrote this, and it doesn't work.
Scriptname AAAZombieTurnEffScript extends activemagiceffectRace Property AAAZombieRace autoKeyword Property ActorTypeUndead autoKeyword Property ActorTypeNPC autoKeyword Property VendorItemArmor autoKeyword Property VendorItemClothing autoFaction Property PatientZeroFaction autoFaction Property AAAZombieFaction autoActor CasterActor TargetSpell Property AAAZombietoZombieAb autoSpell Property AAAZombieTurnAb autoActor ZombieEffectShader Property AAAZombieShader auto ActorBase Property AAAZombieActor Auto ActorBase Property AAAZombieActorF Auto event OnEffectSTart(Actor akTarget, Actor akCaster) Target = akTarget Caster = akCasterendEventevent OnDeath(Actor akKiller) ;if akKiller.GetRace()==AAAZombieRace|| Target.IsInFaction(PatientZeroFaction) ==true && Target.HasKeyWord(ActorTypeNPC)==true && Target.GetRace()!=AAAZombieRace Utility.Wait(2) Target.Disable(1) if (Target.GetBaseObject() as ActorBase).Getsix()==0 Zombie = Target.PlaceActorAtMe(AAAZombieActor) else Zombie = Target.PlaceActorAtMe(AAAZombieActorF) endIf Zombie.Disable() Target.RemoveAllItems() Zombie.Enable();endIfendEventevent OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer) if akBaseItem.HasKeyword(VendorItemArmor) || akBaseItem.HasKeyword(VendorItemClothing) Zombie.AddItem(akBaseItem) Zombie.EquipItem(akBaseItem) endIfendEvent
Basically, the items get removed, but they don't go to the zombie. I'm wondering if this has something to do with the fact that RemoveAllItems removes and deletes everything simultaneously, not giving the OnItemRemoved event time to do its thing.
Suggestions?
