1
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.
 
 
 

40 lines
940 B

Scriptname _00E_SetTimescaleAndFreezeScript extends ObjectReference
Event OnTriggerEnter(ObjectReference akActionRef)
if akActionRef == PlayerREF
Debug.Notification("Trigger entered, Time-manipulation started")
TimescaleBefore = Timescale.GetValue()
Timescale.SetValue(TimescaleModValue)
RegisterForSingleUpdate(1)
EndIf
EndEvent
Event OnTriggerLeave(ObjectReference akActionRef)
if akActionRef == PlayerREF
Debug.Notification("Trigger left, timescale reset to normal")
Timescale.SetValue(TimescaleBefore)
EndIf
EndEvent
Event OnUpdate()
if GameHour.GetValue() == DesiredGameHour
UnregisterForUpdate()
Timescale.SetValue(0)
Else
RegisterForSingleUpdate(1)
EndIf
EndEvent
float TimescaleBefore
float Property TimescaleModValue Auto
float Property DesiredGameHour Auto ;Freeze the game-hour at this point
Actor Property PlayerREF Auto
GlobalVariable Property Timescale Auto
GlobalVariable Property GameHour Auto