reaper9111 Posted December 1, 2009 Share Posted December 1, 2009 Hello guys, i`m curently working on a mod that require me to have this script :-Running as a magic effect-Affect only the undead (all type of undead)-this script is to be include in a clothing enchantment... Scn MyScriptName Ref TargetRef Begin ScriptEffectStart If GetFactionRank UndeadFaction == 1 ;only undead affected ? Set TargetRef to GetSelf ;so they are affected...? Player.PushActorAway TargetRef 20 ;push them away at range of 20 unit EndIf End So, why is it not working ? Where am'i wrong and why ? :wallbash: Also, i wanted to know what is the best SCRIPT command (NOT CONSOLE) to disable all AI for a certain amount of time... ???Thankx for your time and for sharing your knowledge... :D Link to comment Share on other sites More sharing options...
grmblf Posted December 1, 2009 Share Posted December 1, 2009 Try using GetCreatureType == 2 to check if the creature is undead. Ohh, now I see... enchantment clothing? So you want kind of repeling undeads? This won't work so easy, enchantments affect those who wears the enchanted clothes, so TargetRef returns the player as well, I think. It would require checking constantly for references around the player and then applying the code above for each one. Link to comment Share on other sites More sharing options...
reaper9111 Posted December 2, 2009 Author Share Posted December 2, 2009 ok, i`ll see if i can manage something...Thankx ! Link to comment Share on other sites More sharing options...
Recommended Posts