Jump to content

[LE] Apply effect to an NPC


Recommended Posts

Yeah Skyrim can be a bit wonky that way. Another option is to just go back to using spell type instead of ability with a duration of 2 hours, and using Spell.Cast instead, again setting magnitude before casting. This way you don't have to remove it after.

Link to comment
Share on other sites

That sounds even better, because then it can be applied to multiple npcs at the same time. I tried it and it's applied, but I have the following problems:

- It's not removed after 2 hours.

1) I first tried to set the duration in the spell's window to 2 h and I unticked the "no duration" checkbox in the magic effect.. It didn't work, it says there as an active effect.

2) I then tried this:

 

GYHFollowerBoonSA.SetNthEffectDuration(0, 7200)

to set the duration. No result, it just doesn't go away, it stays there as an active effect.

 

- The effect can now be stacked which is not something I want. Instead if the player repeats the action that applies the effect, I'd like to just renew the duration to 2h again. (but not apply the effect again). This was easy with the alias/addSpell way, but is it possible with this cast method too?

Link to comment
Share on other sites

Hmmm, in my mod Charge or Fill - Spells I do something similar to debuff the players magicka regen rate, and using the cast method worked for me. If the spell is cast again, it doesn't stack but the duration resets. For the magic effect it's:

 

Casting Type: Constant effect.

Delivery: Target Actor

 

The spell is

Type: Spell

Casting: Constant effect

Delivery: Target Actor.

 

Hope that helps.

Link to comment
Share on other sites

Sorry for the delay. (Other projects, loads of stuff to do and this had a sudden fallback on the priority list).

 

Okay, I seem to have forgotten to change the Delivery key. I changed that to target actor, and now the Cast applies them properly. The timer is also there.

 

However, it still stacks, instead of getting the timer refilled when recasing. I then tried to tick "No Recast" in the magic effects, which according to the documentation should help (No Recast: Once the magic effect is applied to a target, it cannot be cast again on the same target until it has worn off or been dispelled.). But it changed nothing. It still stacks when it's recast. :mellow:

Link to comment
Share on other sites

  • Recently Browsing   0 members

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