Scriptname KA_RevFlameCycle extends ObjectReference  

actor property playerRef auto
KA_RevFlameCycle property nextInChain auto
objectReference property rangeMarker auto
float property waitTime = 7.00 auto
int property clearDistance = 2400 auto
objectreference property TriggerBox auto

bool property isFirst auto
;bool property isLast auto

Event OnActivate(ObjectReference akActionRef)
	if isFirst
		TriggerBox.Disable()
		utility.wait(waitTime)	
		nextInChain.activateself()	
	else
			utility.wait(waitTime)
			nextInChain.activateself()
	endif
endEvent

FUNCTION activateself()
if (playerRef.getDistance(rangeMarker) <= (clearDistance))
	activate(self)
else
	TriggerBox.Enable()
endif
endFUNCTION