Jump to content

And the next problem...toggle effect script works, but effect shader persists


Recommended Posts

And yet another issue i recently have when trying to put a few custom spells together...

 

I created some custom toggleable spells, which are working flawlessly with the script i´m using- one slow time spell and a night vision spell.

Toggle on, toggle off- no problem. Now i want to do that with a detect life spell and it works too, but not as intended.

When i toggle the spell on, everything is fine, but when i toggle it off the effect shader persists- really weird. Is there a command a can use in the script to ensure,

that the shader go away too when toggleing the spell off? Or is there something else i´ve missed? It is possible to do it, because the predator vision mod does this without problems, but i cant figure out, how it would work...any ideas?

 

Here is the script i use for the spells (property change with the spell):

 

 

Scriptname AADetectAuraEffectToggleScript extends ActiveMagicEffect

SPELL Property DetectAura Auto

Event OnEffectStart (Actor akTarget, Actor akCaster)
If akTarget.HasSpell(DetectAura) == false
akTarget.AddSpell(DetectAura, false)
Else
akTarget.RemoveSpell(DetectAura)
EndIf
EndEvent

 

 

Thanks in advance

Link to comment
Share on other sites

DispelSpell() is the native function to remove all running effects of a spell. https://www.creationkit.com/index.php?title=DispelSpell_-_Actor

 

maybe something like this:

AADetectAuraEffectToggleScript

  Reveal hidden contents

 

Link to comment
Share on other sites

  • 2 weeks later...
  • Recently Browsing   0 members

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