Arkkis Posted February 9, 2012 Share Posted February 9, 2012 Hey forumese! I got an idea of Zombiemod in Skyrim and I've been trying to make zombie disease people when they hit'em. So what is it I want to do, Zombie hits actor, actor gets sick with disease and it changes it faction to ZombieFaction. Here is my little test code for it: Scriptname ZombieDeseaseScript extends Actor {This should turn target to Zombie!} Faction Property ZombieFaction Auto Spell property ZombieSpell Auto Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \ bool abBashAttack, bool abHitBlocked) int ran = Utility.RandomInt(0, 0) if ran == 0 Actor target = Self.GetCombatTarget() ;Debug.MessageBox("New Zombie!") target.RemoveFromAllFactions() target.AddToFaction(ZombieFaction) endif EndEvent I know event is wrong and stuff.. But I would like to do it way that zombie hits and an enemy gets faction changed. How? ps. Sorry for my bad english :) Regards,Arkkis Link to comment Share on other sites More sharing options...
TheChan Posted February 9, 2012 Share Posted February 9, 2012 I'm pretty sure the OnHit event is for the actor whom the script is applied to, so if it's applied to the zombie, it will trigger when the zombie is hit. Link to comment Share on other sites More sharing options...
Arkkis Posted February 9, 2012 Author Share Posted February 9, 2012 I'm pretty sure the OnHit event is for the actor whom the script is applied to, so if it's applied to the zombie, it will trigger when the zombie is hit.I know this and said it already... Is there a way to activate script when actor attacks? Why factions changes does not work for me? Link to comment Share on other sites More sharing options...
Recommended Posts