zhecircle Posted March 19, 2018 Share Posted March 19, 2018 (edited) Hello.I'm working on a mod to add a magic effect to all NPCs in a distance and dispelspell this effect after NPC is out of the distance.I try to find some toturials but failed. Is there exists a way to achiteve this goal efficiently?Thanks a lot~ BYW, I am a new modder, may this question is so stupid. But I'm still looking for an answer. :sad: Edited March 19, 2018 by zhecircle Link to comment Share on other sites More sharing options...
soupdragon1234 Posted March 19, 2018 Share Posted March 19, 2018 You use a cloak effect spell. https://www.creationkit.com/index.php?title=Dynamically_Attaching_ScriptsBe aware that you must be scrupulous about cleaning up afterwards to dispel a spell by using OnCellDetached() or similar on any attached scripts as it won't do it for you. It can be a cause of issues including bloat, brawl bug etc if you don't. Most people avoid using cloak effect for that reason. Link to comment Share on other sites More sharing options...
zhecircle Posted March 21, 2018 Author Share Posted March 21, 2018 You use a cloak effect spell. https://www.creationkit.com/index.php?title=Dynamically_Attaching_ScriptsBe aware that you must be scrupulous about cleaning up afterwards to dispel a spell by using OnCellDetached() or similar on any attached scripts as it won't do it for you. It can be a cause of issues including bloat, brawl bug etc if you don't. Most people avoid using cloak effect for that reason.Thank you so much! You advice works perfectly Link to comment Share on other sites More sharing options...
Recommended Posts