Scriptname KA_RevDoorTrack extends ObjectReference  
{Tracks the door's open or closed state}
int property myIndex auto
bool property startsOpened auto
{False by default}
bool property isOpen auto

KA_revRitualMaster property master auto

bool isOpen = FALSE

EVENT onActivate(objectReference actronaut)
;if IsActivationBlocked()
if !(IsActivationBlocked())
;elseif isOpen == FALSE
if isOpen == FALSE
	isOpen = TRUE
	updateMaster()
elseif isOpen == TRUE
	isOpen = FALSE
	updateMaster()
endif
endif
endEVENT

FUNCTION updateMaster()
if myIndex == 01
			master.door01isOpen = isOpen
elseif myIndex == 02
			master.door02isOpen = isOpen
endif
endFUNCTION