this is a little bit tricky, but try this(i did not test it):
entity which should open door
:plrdistwithin=100:setvar=plrinnear 1
:state=0:dimvar=plrinnear,setvar=plrinnear 0
(you must paste this in the entity script)example(default script):
:plrdistwithin=100:setvar=plrinnear 1
:state=0:dimvar=plrinnear,setvar=plrinnear 0
:state=0:state=1
and then for the door:
;Artificial Intelligence Script
;Header
desc = Auto Proximity Door (Open and Close)
;Triggers
:state=0,plrdistwithin=75,varequal=plrinnear 1:state=1,setframe=0,sound=$0
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff
:state=2,plrdistfurther=100:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:state=0,setframe=0
;End of Script