enderalse/scripts/source/_00e_complexaddsilenceduringscenessc.psc

47 lines
1.3 KiB
Plaintext
Raw Normal View History

Scriptname _00E_ComplexAddSilenceDuringScenesSC extends ObjectReference
;=====================================================================================
; EVENTS
;=====================================================================================
Event OnTriggerEnter(ObjectReference akActionRef)
If akActionRef == PlayerREF
int iSceneIndex = scenesArray.Length - 1
bool bASceneIsPlaying
while iSceneIndex >= 0 && !bASceneIsPlaying
If scenesArray[iSceneIndex].IsPlaying()
bASceneIsPlaying = True
silenceToAdd.Add()
Else
iSceneIndex -= 1
EndIf
EndWhile
silenceToAdd.Remove()
EndIf
EndEvent
Event OnTriggerLeave(ObjectReference akActionRef)
If akActionRef == PlayerREF
silenceToAdd.Remove()
EndIf
EndEvent
;=====================================================================================
; PROPERTIES
;=====================================================================================
Scene[] Property scenesArray Auto
MusicType Property silenceToAdd Auto
Actor Property PlayerREF Auto