Custom Nighteyes sometimes a constant effect.

Post » Sat Jun 06, 2015 4:45 am

So I dup'd Nighteyes magic effect and tweaked it to be part of a nighteyes fire and forget sell and a concentration spell. If done right nighteyes will hang and remain on constantly until you recast which is bad since neither of these spells are a constant effect type spell.

Even if I use conditionals it still will do this, so is there a way to force it off at end of spell?

Heres the nighteyes script source.

scriptName magicNightEyeScript extends ActiveMagicEffect{Scripted effect for the Night Eye Spell}import GlobalVariable;======================================================================================;; PROPERTIES /;=============/float property fDelay = 0.83 auto{time to wait before switching to constant Imod}ImageSpaceModifier property IntroFX auto{IsMod applied at the start of the spell effect}ImageSpaceModifier property MainFX auto{main isMod for spell}ImageSpaceModifier property OutroFX auto{IsMod applied at the end of the spell effect}Float Property fImodStrength = 1.0 auto{IsMod Strength from 0.0 to 1.0}sound property IntroSoundFX auto ; create a sound property we'll point to in the editorsound property OutroSoundFX auto ; create a sound property we'll point to in the editorGlobalVariable Property NightEyeTransitionGlobal auto;MagicEffect Property NightEyeEffect auto;Spell Property NightEyeDispelEffectSpell auto; Obtain the target of the active fire effect;Actor CasterActor;======================================================================================;; EVENTS /;=============/Event OnEffectStart(Actor Target, Actor Caster)    ;CasterActor = Caster    ; IntroFX.remove()    ; MainFX.remove()                                    ;Kill Imods from another cast, if running.    ; OutroFX.remove()            if NightEyeTransitionGlobal.GetValue() == 0.0        NightEyeTransitionGlobal.setValue(1.0)        int instanceID = IntroSoundFX.play((target as objectReference)) ; play IntroSoundFX sound from my self        introFX.apply(fImodStrength) ; apply isMod at full strength        utility.wait(fDelay) ; NOTE - neccessary?        ;MainFX.apply()        if NightEyeTransitionGlobal.GetValue() == 1.0            introFX.PopTo(MainFX,fImodStrength)                NightEyeTransitionGlobal.setValue(2.0)        endif    elseif NightEyeTransitionGlobal.GetValue() == 1.0        introFX.PopTo(MainFX,fImodStrength)            NightEyeTransitionGlobal.setValue(2.0)        self.dispel()    else        self.dispel()    endif    EndEvent; Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect NightEyeEffect)    ; NightEyeDispelEffectSpell.Cast(CasterActor); endEventEvent OnEffectFinish(Actor Target, Actor Caster)    ; if NightEyeTransitionGlobal.GetValue() == 1.0        ; utility.wait(fDelay)    ; endif;     ;debug.trace (self + ": We are killing the spell. The Globale is: " + NightEyeTransitionGlobal.GetValue())    if NightEyeTransitionGlobal.GetValue() == 2.0        NightEyeTransitionGlobal.setValue(3.0);         ;debug.trace (self + ": This is a valid outro play, see because 2.0 = " + NightEyeTransitionGlobal.GetValue())        int instanceID = OutroSoundFX.play((target as objectReference)) ; play OutroSoundFX sound from my self        ;MainFX.remove()        MainFX.PopTo(OutroFX,fImodStrength)        introFX.remove()        NightEyeTransitionGlobal.setValue(0.0)    endifendEvent

It looks to me you need to somehow reenforce or make a conditional effect to set NightEyeTransitionGlobal to zero. But I am unsure anyone want to give me any suggestions?

User avatar
Marquis T
 
Posts: 3425
Joined: Fri Aug 31, 2007 4:39 pm

Return to V - Skyrim

cron