Highlord90 Posted May 16, 2014 Share Posted May 16, 2014 As some people may know when you reanimate a corpse with the Staff of Worms it usually attacks enemies for you but the guards seem to retain their faction loyalty and only attack you upon reanimation so I composed a script that I thought would fix this. The construction set accepts the script so I can assume its properly written but it doesn't have the desired effect of making guards not attack you and instead only attack enemies. Here's what I have sdo far, I've been testing it on Imperial City guards only but to no avail, anyone able to spot a mistake? SCN AAResurectionSCRIPT short updateCount Begin ScriptEffectStartSetFactionRank ICFaction -1SetFactionRank ImperialLegion -1SetFactionRank ImperialWatch -1SetFactionRank PlayerFaction, 1ActivateEnd Link to comment Share on other sites More sharing options...
kastano Posted May 16, 2014 Share Posted May 16, 2014 (edited) Just guessing (some thoughts) ,without knowing how reanimate works ,i havent complete mages guild quests in my current game SCN AAResurectionSCRIPTshort updatecountref targetGrefBegin ScriptEffectStartset targetGref to getself ;if (targetGref.GetInFaction ImperialLegion && targetGref.GetDead == 1 );maybe without the second conditionset updateCount to 1endifendBegin scripteffectupdateif updateCount == 1targetGref .SetFactionRank ICFaction -1targetGref .SetFactionRank ImperialLegion -1targetGref .SetFactionRank ImperialWatch -1targetGref .SetFactionRank PlayerFaction, 0targetGref.Moddisposition player 30targetGref.SetIgnoreFriendlyHits 1set updateCount to 0endifEnd or SCN AAResurectionSCRIPTshort introubref targetGrefBegin OnMagicEffectHit REANset targetGref to getselfif (targetGref.GetInFaction ImperialLegion && targetGref.GetDead == 1 )set introub to 1endifendBegin GameModeIf introub == 0ReturnElseIf introub == 1targetGref .SetFactionRank ICFaction -1targetGref .SetFactionRank ImperialLegion -1targetGref .SetFactionRank ImperialWatch -1targetGref .SetFactionRank PlayerFaction, 0targetGref.Moddisposition player 30targetGref.SetIgnoreFriendlyHits 1Set introub to 0endifendifEnd Edited May 16, 2014 by kastano Link to comment Share on other sites More sharing options...
Highlord90 Posted May 18, 2014 Author Share Posted May 18, 2014 I'll implement these and try em out right away thanks, let u know if it works Link to comment Share on other sites More sharing options...
kastano Posted May 19, 2014 Share Posted May 19, 2014 perhaps you should put a condition about guards classtargetGref .Setclass thief ;(if this function exists)or sth because he would detect crime cause of his class and come to arrest you Link to comment Share on other sites More sharing options...
Recommended Posts