enderalse/source/scripts/_00e_actorsuddenappearscript.psc

50 lines
1.1 KiB
Plaintext
Raw Normal View History

Scriptname _00E_ActorSuddenAppearScript extends actor
Keyword Property LinkCustom01 Auto
Function StartSuddenAppear()
; Debug.Trace(self + ": StartSuddenAppear")
_SetStageFlag(1)
MoveTo(GetLinkedRef(LinkCustom01))
EnableNoWait()
GoToState("SuddenAppear")
EndFunction
Function EndSuddenAppear()
GoToState("")
UnregisterForUpdateGameTime()
_SetStageFlag(0)
; Debug.Trace(self + ": Terminated")
EndFunction
State SuddenAppear
Event OnBeginState()
RegisterForSingleUpdateGameTime(1.0) ; Failsafe timeout
EndEvent
Event OnDying(Actor akKiller)
; Debug.Trace(self + ": OnDying")
EndSuddenAppear()
EndEvent
Event OnDeath(Actor akKiller)
; Debug.Trace(self + ": OnDeath")
EndSuddenAppear()
EndEvent
Event OnCombatStateChanged(Actor akTarget, Int aeCombatState)
If aeCombatState != 0
; Debug.Trace(self + ": OnCombatStateChanged")
EndSuddenAppear()
EndIf
EndEvent
Event OnUpdateGameTime()
; Debug.Trace(self + ": OnUpdateGameTime")
EndSuddenAppear()
EndEvent
EndState
Function _SetStageFlag(Int iStage)
2023-12-08 02:45:53 +00:00
SetActorValue("Variable01", iStage as Float)
EndFunction