scn CrNightkinCloakUntilFireScriptshort combatcheckshort soundcheckfloat timerEffectint Cloaked ; 0 = Stealth Boy effect not on ; 1 = Stealth Boy effect on ; This var is meant to ensure we never try to remove ; the effect when it's not already on.begin onLoad ModActorValue sneak 100 ; Add the effect, update the flag if Cloaked == 0 addspell StealthBoyInvisibilitySpell set Cloaked to 1 endif set soundcheck to 0 set timerEffect to 0endbegin OnSTARTCombat set combatcheck to 1endbegin OnCombatEND set combatcheck to 0endbegin OnDeath set combatcheck to 0 ; If the nightkin is currently using the Stealth Boy effect, remove it if Cloaked == 1 RemoveSpell StealthBoyInvisibilitySpell set Cloaked to 0 endifendbegin GameMode ref refvar ; <--------------- YO ITS RIGHT IN THE BLOCK set refvar to this ;if GetDetected player ; startcombat player ;endif if combatcheck == 1 ref mytarget ; <---------------------- YO IT DID IT AGAIN set mytarget to refvar.GetCombatTarget endif else if refvar.GetDead == 0; addspell StealthBoyInvisibilitySpell set soundcheck to 0 endif endif if GetAnimAction == 2 && Cloaked == 1; ShowWarning "Nightkin attacking, decloaking now" RemoveSpell StealthBoyInvisibilitySpell set Cloaked to 0 endifend
And this isn't the only place I've seen this.
Alright so. huh??? I didn't even know you could do that?