But what I'm trying to tell you is that the best place for
animate.obj(o0);
load.view(2);
set.view(o0,2);
position(o0,90,88);
draw(o0);
is like this:
if (new_room) {
//some other code here
animate.obj(o0);
load.view(2);
set.view(o0,2);
position(o0,90,88);
draw(o0);
}
In fact, when I look at your code again... you should never have to use the command, animate.obj(o0). The ego is automatically animated, isn't it?
Either way, try using something more like this
if (new_room) { //Initialize a brand new object to replace the ego temporarily.
//The ego doesn't like using a lot of the normal animation
//functions, in my experience.
//some other code here
animate.obj(o1);
load.view(2);
set.view(o1,2);
position(o1,90,88);
draw(o1);
}
if(controller(c35) || f16) { //Press TAB to run loop, not sure whether it should
//be f16 or !f16
program.control(); //keep the ego from moving
erase(o0);
end.of.loop(o0,f16);
}
//you were using an extra } here, and you don't need that error message here
if (f16) { //Not sure whether it should be f16 or !f16
//but this block should be called when the end.of.loop() ends
erase(o1);
draw(o0);
player.control();
}
This is a bit crude, and it won't solve all of your problems, but it should be a step in the right direction. Remember that you should keep graphic initializations in the header, and that you should never have to reinitialize the ego object.