Let's assume your door model has its hinges in the origin (in MED) and is parallel to the x-Axis. Then you can simply write

vec_set(temp,player.x);
vec_to_ent(temp,my);
turn_direction = -sign(temp.y);

while(...)
my.pan += 5*turn_direction*time_step;
wait(1);
}


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends