Scriptname AAACloseDoorScript extends ObjectReference  

ObjectReference Property OpenDoor Auto

Auto State Trigger
      Event OnTriggerEnter(ObjectReference triggerRef)
	Actor actorRef = triggerRef as Actor
               if (actorRef == game.GetPlayer())
                           OpenDoor.SetOpen(false)
                           gotoState ("done")
                    endif
       EndEvent
endState

STATE done

endSTATE