enderalse/scripts/source/_00e_complexscenetriggerscript.psc

79 lines
2.4 KiB
Plaintext
Raw Normal View History

Scriptname _00E_ComplexSceneTriggerScript extends ObjectReference
;=====================================================================================
; STATES
;=====================================================================================
Auto State WaitingForTrigger
Event OnTriggerEnter(ObjectReference akActionRef)
if ((QueststageForStart == QuestForScene.GetStage()) && !Done) || (!Done && !Config_StageRequired)
if Config_NotTriggeredByPlayer == True
if akActionRef == TriggerActor
Done = True
if Config_Force == True
StartScene.ForceStart()
Else ;if Config_Force == False
StartScene.Start()
EndIf
if StartScene.IsPlaying()
GoToState("AllDone")
EndIf
Else
Return
EndIf
Else ;If Config_NotTriggeredByPlayer == False
if akActionRef == PlayerREF
Done = True
if Config_Force == True
StartScene.ForceStart()
Else ;if Config_Force == False
StartScene.Start()
EndIf
GoToState("AllDone")
Else
Return
EndIf
EndIf
Endif
EndEvent
EndState
State AllDone
Event OnTriggerEnter(ObjectReference akActionRef)
; Do nothing
EndEvent
EndState
;=====================================================================================
; PROPERTIES
;=====================================================================================
bool Done = False
Bool Property Config_Force = False Auto
{Shall this scene be force started? Default: FALSE}
Bool Property Config_StageRequired = True Auto
Bool Property Config_NotTriggeredByPlayer Auto
{Default: FALSE}
Scene Property StartScene Auto
Quest Property QuestForScene Auto
{Which scene does the quest belong to?}
Int Property QueststageForStart Auto
{Which stage is necessary for the triggerbox to take effect?}
Actor Property TriggerActor Auto
{Which actor shall trigger the scene to begin? Only use if Config_NotTriggeredByPlayer is set to true!}
Actor Property PlayerREF Auto