Scriptname BaboDefaultLockedDoorScript extends ObjectReference  

import game
import utility
import debug

Quest Property BaboFollowerQuest Auto
Int Property Nextstage Auto
ReferenceAlias Property Prisoner01 Auto
ReferenceAlias Property Prisoner02 Auto
ReferenceAlias Property Prisoner03 Auto
ReferenceAlias Property Prisoner04 Auto
ReferenceAlias Property Prisoner05 Auto
ReferenceAlias Property Prisoner06 Auto


;bool Property AlreadyLoaded Auto Hidden
bool Property DoOnce Auto



;EVENT OnLoad()
;	if AlreadyLoaded == FALSE
;	AlreadyLoaded = TRUE
;EndEVENT

Function ResetTrigger()
	GoToState("WaitingToBeOpened")
EndFunction

Auto STATE WaitingToBeOpened
	EVENT OnOpen (ObjectReference triggerRef)
		BaboFollowerQuest.setstage(Nextstage)
		If DoOnce == True
		GoToState("AlreadyOpened")
		EndIf
	EndEVENT
endSTATE

STATE AlreadyOpened
	;do nothing
EndSTATE