Scriptname _00E_Complex_StartSceneSC extends ObjectReference  

Event OnTriggerEnter(ObjectReference akActionRef)

	If akActionRef == PlayerREF
		If __Config_bStageRequired
			If __Config_ParentQuest.GetCurrentStageID() == __Config_iSceneStage
				__Config_SceneToPlay.ForceStart()
				If __Config_DeleteAfterTrigger
					Self.Delete()
				EndIf
			EndIf
		Elseif (__Config_ParentQuest.IsRunning())
			__Config_SceneToPlay.ForceStart()
			If __Config_DeleteAfterTrigger
				Self.Delete()
			EndIf	
		EndIf
	EndIf

EndEvent

Actor Property PlayerREF Auto

Quest Property __Config_ParentQuest Auto
{The quest which the scene to play is a child of}

Scene Property __Config_SceneToPlay Auto

int Property __Config_iSceneStage Auto
{Which stage of the quest is required for the scene to start playing.}

bool Property __Config_DeleteAfterTrigger Auto
{Whether the triggerbox should be deleted after (sucessfully) firing. Default = False}

bool Property __Config_bStageRequired = True Auto
{Whether this trigger only fires if a certain stage of the parent quest is currently active. Default = True If not, the scene will ONLY play if the Quest is running.}