Jump to content

Recommended Posts

Posted

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

Posted

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

 

  • 2 weeks later...
Posted (edited)

i figured out that the author of the predator vision mod used the blablabla.stop(target) command for the shaders, but when i try to use it, my script won´t compile. Man, such a simple task, but so much headache...

Edited by Elementargewalt
Posted (edited)

The syntax for that is

 

EffectPlaying.Stop(target of the EffectPlaying)

EffectShader property thisEffect auto
 
....
thisEffect.Stop(Game.GetPlayer())
Edited by Rasikko
  • Recently Browsing   0 members

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