42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
Scriptname _00E_Complex_AddSilenceSC extends ObjectReference
|
|
|
|
Event OnTriggerEnter(ObjectReference akActionRef)
|
|
|
|
If akActionRef == PlayerREF
|
|
If (__Config_QuestToSet.GetCurrentStageID() >= __Config_iMinStage) && (__Config_QuestToSet.GetCurrentStageID() <= __Config_iMaxStage)
|
|
_00E_SilenceLongTransitionHighPriority.Add()
|
|
bActive = true
|
|
EndIf
|
|
EndIf
|
|
|
|
EndEvent
|
|
|
|
Event OnTriggerLeave(ObjectReference akActionRef)
|
|
|
|
If akActionRef == PlayerREF
|
|
_00E_SilenceLongTransitionHighPriority.Remove()
|
|
UnregisterForUpdate()
|
|
bActive = false
|
|
EndIf
|
|
|
|
EndEvent
|
|
|
|
; 2.1.4 Failsafe to ensure silence removal when OnTriggerLeave does not fire
|
|
Event OnTrigger(ObjectReference akActionRef)
|
|
If bActive && akActionRef == PlayerREF
|
|
RegisterForSingleUpdate(3.0)
|
|
EndIf
|
|
EndEvent
|
|
|
|
Event OnUpdate()
|
|
_00E_SilenceLongTransitionHighPriority.Remove()
|
|
bActive = false
|
|
EndEvent
|
|
|
|
int Property __Config_iMinStage Auto
|
|
int Property __Config_iMaxStage Auto
|
|
Actor Property PlayerREF Auto
|
|
Quest Property __Config_QuestToSet Auto
|
|
MusicType Property _00E_SilenceLongTransitionHighPriority Auto
|
|
bool bActive
|