2021-10-05 22:15:58 +00:00
|
|
|
Scriptname _00E_ComplexSceneTriggerScript extends ObjectReference
|
|
|
|
|
|
|
|
;=====================================================================================
|
|
|
|
; STATES
|
|
|
|
;=====================================================================================
|
|
|
|
|
|
|
|
Auto State WaitingForTrigger
|
|
|
|
|
|
|
|
Event OnTriggerEnter(ObjectReference akActionRef)
|
|
|
|
|
2024-01-10 14:08:24 +00:00
|
|
|
if ((QueststageForStart == QuestForScene.GetCurrentStageID()) && !Done) || (!Done && !Config_StageRequired)
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
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
|