Just to make sure it's clear that this thing isn't constrained and almost useless, end.of.loop doesn't have to appear in the new room section. It just needs to appear inside an if-statement that will execute once and only once instead of every interpreter cycle. For example, this code is from Jen's Quest:
if (said("open", "door"))
{
if (posn(ego,
JENS_ROOM_DOOR_RANGE_X1, JENS_ROOM_DOOR_RANGE_Y1,
JENS_ROOM_DOOR_RANGE_X2, JENS_ROOM_DOOR_RANGE_Y2))
{
// attempting to open the door to Jennifer's room
stop.motion(ego);
program.control();
prevent.input();
nCurrentDoor = JENS_ROOM_DOOR;
end.of.loop(oJensRoomDoor, bDoorDoneOpening);
}
else
{
print(MSG_NOT_CLOSE_ENOUGH);
}
}
Sorry if there's weird indenting. This code isn't actually a direct copy and paste. Sort of a pieced together job.