action door_1() // attach this action to an entity at you want as door
{
while (!player) {wait (1);} // wait until the player is loaded
while (vec_dist (player.x, my.x) > 100) // wait until the player comes close to this entity
{
wait (1);
}
dosomethinghere(door); // here ur function that rotates the door, do ur put u change here already ur doors pan.
}