I'm going to assume that you want to have the ego move to the door?
This isn't really much of a move object problem, but here's an example with some movement code.
Let's assume that one door is on the left side of the screen, and the other is on the right. If your character is on the left-hand side, we'll have him open the left door. If he is on the right-hand side, we'll have him open the right door. So:
if (said("open","door")) { left door
if (new_ego_x < 80) {
program.control();
move.obj(ego,x,y,stepsize,doneflag);
if (doneflag) {
end.of.loop(oLEFTDOOR,anotherdoneflag);
//Above should animate door opening
player.control();
set(left_door_open);
}
}
if (new_ego_x > 80) {
program.control();
move.obj(ego,x,y,stepsize,doneflag);
if (doneflag) {
end.of.loopoRIGHTDOOR,anotherdoneflag);
player.control();
set(right_door_open);
}
}
}
I left the variables open, since I have no idea where your doors are going to be, but that should give you something to chew on.