Jump to content

How to add a magic effect to all nearby NPCs ?


zhecircle

Recommended Posts

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 by zhecircle
Link to comment
Share on other sites

You use a cloak effect spell. https://www.creationkit.com/index.php?title=Dynamically_Attaching_Scripts

Be 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

You use a cloak effect spell. https://www.creationkit.com/index.php?title=Dynamically_Attaching_Scripts

Be 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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...