chuckmccaw Posted June 6, 2012 Share Posted June 6, 2012 So I've been through this a lot, from modding almost all ends of skyrim for my mod, i am once again stuck by the infection script, it is:A Disease effect and is already distributedA magic effect which is scripted with the following: Scriptname WalkingDeadInfection extends ActiveMagicEffect Faction Property FactionAdding Auto Race Property SetRace Auto Event OnEffectFinish(Actor akTarget, Actor akCaster) If (akTarget.IsDead() == 1) akTarget.Resurrect() akTarget.SetRace(SetRace) akTarget.RemoveFromAllFactions() akTarget.AddToFaction(FactionAdding) akTarget.StartCombat(Game.GetPlayer()) Endif EndEvent The problem is, in game nothing happens, they catch the disease, get killed and thats that Link to comment Share on other sites More sharing options...
scrivener07 Posted June 7, 2012 Share Posted June 7, 2012 Try Event OnEffectStart(). If your effect is constant it may never finish. Also, adding a Debug.x() to your scripts can help follow a script in game as it runs. Scriptname WalkingDeadInfection extends ActiveMagicEffect Faction Property FactionAdding Auto Race Property SetRace Auto Event OnEffectStart(Actor akTarget, Actor akCaster) Debug.Notification("I like turtles") If (akTarget.IsDead() == 1) Debug.Notification("Npc Infected") akTarget.Resurrect() akTarget.SetRace(SetRace) akTarget.RemoveFromAllFactions() akTarget.AddToFaction(FactionAdding) akTarget.StartCombat(Game.GetPlayer()) Endif EndEvent Link to comment Share on other sites More sharing options...
steve40 Posted June 7, 2012 Share Posted June 7, 2012 (edited) Debug.Notification("I like turtles") ROFL :laugh: Edited June 7, 2012 by steve40 Link to comment Share on other sites More sharing options...
chuckmccaw Posted June 7, 2012 Author Share Posted June 7, 2012 but surely that will only check if there dead when the effect first starts Link to comment Share on other sites More sharing options...
Sollar Posted June 7, 2012 Share Posted June 7, 2012 (edited) but surely that will only check if there dead when the effect first starts Did you try scrivener07's suggestions though? As I read it, there were two important parts: 1. Putting in some debug messages so you can see what's happening. Really hard to work with a script if you don't have any clue what's happening... and maybe, it's not even getting called! and 2. >Try Event OnEffectStart(). If your effect is constant it may never finish. Did you get the part about maybe your event isn't getting called because it may not have finished? So combine the approach and find out what's really going on. Edited June 7, 2012 by Sollar Link to comment Share on other sites More sharing options...
chuckmccaw Posted June 7, 2012 Author Share Posted June 7, 2012 I tried the above, nothing happens, i dont even get a message about the turtles :/ i fear that spell effects dont continue after death, i'm looking into soultraps script, as it does have an on death effect, but i cant decipher it Link to comment Share on other sites More sharing options...
steve40 Posted June 7, 2012 Share Posted June 7, 2012 (edited) I tried the above, nothing happens, i dont even get a message about the turtles :/ i fear that spell effects dont continue after death, i'm looking into soultraps script, as it does have an on death effect, but i cant decipher it Make sure that you have ticked the "NoDeathDispel" checkbox on your MagicEffect.If you aren't liking turtles then your spell isn't actually getting cast. Edited June 7, 2012 by steve40 Link to comment Share on other sites More sharing options...
chuckmccaw Posted June 7, 2012 Author Share Posted June 7, 2012 Ok, so i kinda realise i did'nt have no duration and no magnitude ticked, hence the worth being 0 for both, all works grand except that they come out unaggresive. is there any easy way to make them aggresive guys? Link to comment Share on other sites More sharing options...
pauderek Posted June 7, 2012 Share Posted June 7, 2012 (edited) You can use AddToFaction to add them to any of the enemies factions, like bandits and so:http://www.creationkit.com/AddToFaction_-_Actor To make him enemy of a certain faction use SetEnemy:http://www.creationkit.com/SetEnemy_-_Faction If you only want them to be aggresive to a specific actor use SetRelationshipRank:http://www.creationkit.com/SetRelationshipRank_-_Actor If you want everyone to attack this actor on sight use SetAttackActorOnSight, this will probably turn him hostile to everyone who is attacking him(haven't tried this one myself):http://www.creationkit.com/SetAttackActorOnSight_-_Actor You probably want them to be aggresive too so they don't run away like cowards, use SetActorValue for this and change aggression and confidence (I think):http://www.creationkit.com/SetActorValue_-_Actor Edited June 7, 2012 by pauderek Link to comment Share on other sites More sharing options...
Recommended Posts