Fixed Papyrus spam in _00E_FS_NQ07_LightScript

This commit is contained in:
Eddoursul 2024-01-27 22:31:45 +01:00
parent f5e9064d9e
commit 839df7c06f
2 changed files with 25 additions and 12 deletions

Binary file not shown.

View File

@ -4,14 +4,18 @@ Scriptname _00E_FS_NQ07_LightScript extends activemagiceffect
; EVENTS ; EVENTS
;===================================================================================== ;=====================================================================================
bool bActive
Event OnEffectStart(Actor akTarget, Actor akCaster) Event OnEffectStart(Actor akTarget, Actor akCaster)
bActive = true
EnableAllRefsInFormlist() EnableAllRefsInFormlist()
EndEvent EndEvent
Event OnEffectFinish(Actor akTarget, Actor akCaster) Event OnEffectFinish(Actor akTarget, Actor akCaster)
bActive = false
DisableAllRefsInFormlist() DisableAllRefsInFormlist()
EndEvent EndEvent
@ -26,13 +30,20 @@ Function EnableAllRefsInFormlist()
while iIndex > 0 while iIndex > 0
iIndex -= 1 if ! bActive
ObjectReference ref = _00E_FS_NQ07_LightList.GetAt(iIndex) as ObjectReference return
ref.EnableNoWait() endif
_00E_TeleportOutVFX.Play(ref)
ref.GetLinkedRef().EnableNoWait() iIndex -= 1
MAGIllusionNightEyeOn.Play(ref) ObjectReference ref = _00E_FS_NQ07_LightList.GetAt(iIndex) as ObjectReference
ref.EnableNoWait()
ref.GetLinkedRef().EnableNoWait()
if ref.Is3DLoaded()
_00E_TeleportOutVFX.Play(ref)
MAGIllusionNightEyeOn.Play(ref)
endif
endwhile endwhile
EndFunction EndFunction
@ -43,11 +54,13 @@ Function DisableAllRefsInFormlist()
while iIndex > 0 while iIndex > 0
iIndex -= 1 iIndex -= 1
ObjectReference ref = _00E_FS_NQ07_LightList.GetAt(iIndex) as ObjectReference ObjectReference ref = _00E_FS_NQ07_LightList.GetAt(iIndex) as ObjectReference
ref.DisableNoWait() if ref.Is3DLoaded()
ref.GetLinkedRef().DisableNoWait() MAGIllusionNightEyeOff.Play(ref)
MAGIllusionNightEyeOff.Play(ref) endif
ref.DisableNoWait()
ref.GetLinkedRef().DisableNoWait()
endwhile endwhile