2021-10-05 22:15:58 +00:00
|
|
|
Scriptname _00E_FS_NQ07_LightScript extends activemagiceffect
|
|
|
|
|
|
|
|
;=====================================================================================
|
|
|
|
; EVENTS
|
|
|
|
;=====================================================================================
|
|
|
|
|
2024-01-27 21:31:45 +00:00
|
|
|
bool bActive
|
|
|
|
|
2021-10-05 22:15:58 +00:00
|
|
|
Event OnEffectStart(Actor akTarget, Actor akCaster)
|
|
|
|
|
2024-01-27 21:31:45 +00:00
|
|
|
bActive = true
|
2021-10-05 22:15:58 +00:00
|
|
|
EnableAllRefsInFormlist()
|
|
|
|
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
Event OnEffectFinish(Actor akTarget, Actor akCaster)
|
|
|
|
|
2024-01-27 21:31:45 +00:00
|
|
|
bActive = false
|
2021-10-05 22:15:58 +00:00
|
|
|
DisableAllRefsInFormlist()
|
|
|
|
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
;=====================================================================================
|
|
|
|
; FUNCTIONS
|
|
|
|
;=====================================================================================
|
|
|
|
|
|
|
|
Function EnableAllRefsInFormlist()
|
|
|
|
|
|
|
|
int iIndex = _00E_FS_NQ07_LightList.GetSize()
|
|
|
|
|
|
|
|
while iIndex > 0
|
|
|
|
|
2024-01-27 21:31:45 +00:00
|
|
|
if ! bActive
|
|
|
|
return
|
|
|
|
endif
|
|
|
|
|
|
|
|
iIndex -= 1
|
|
|
|
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
|
|
|
|
|
2021-10-05 22:15:58 +00:00
|
|
|
endwhile
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function DisableAllRefsInFormlist()
|
|
|
|
|
|
|
|
int iIndex = _00E_FS_NQ07_LightList.GetSize()
|
|
|
|
|
|
|
|
while iIndex > 0
|
|
|
|
|
2024-01-27 21:31:45 +00:00
|
|
|
iIndex -= 1
|
|
|
|
ObjectReference ref = _00E_FS_NQ07_LightList.GetAt(iIndex) as ObjectReference
|
|
|
|
if ref.Is3DLoaded()
|
|
|
|
MAGIllusionNightEyeOff.Play(ref)
|
|
|
|
endif
|
|
|
|
ref.DisableNoWait()
|
|
|
|
ref.GetLinkedRef().DisableNoWait()
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
endwhile
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
;=====================================================================================
|
|
|
|
; PROPERTIES
|
|
|
|
;=====================================================================================
|
|
|
|
|
|
|
|
VisualEffect Property _00E_TeleportOutVFX Auto
|
|
|
|
|
|
|
|
Sound Property MAGIllusionNightEyeOn Auto
|
|
|
|
Sound Property MAGIllusionNightEyeOff Auto
|
|
|
|
|
|
|
|
FormList Property _00E_FS_NQ07_LightList Auto
|