4
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

47 lines
1.3 KiB

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