If you're basing your game off the updated template game, there is a bug in it which causes you to run out of memory if you use the tp command (thanks go to Andrew_Baker for pointing this out).
Open logic.000 and find the code that reads:
if (new_room) { // First interpreter cycle in a new room
// Note: Everything other than logic 0 is discarded
// from memory when new.room is executed
load.logics(90); // Load game specific functions logic into memory
clear.lines(24,24,0); // clear bottom line of screen (remove ego's coords if shown)
animate.obj(ego);
load.view.v(ego_view_no);
set.view.v(ego, ego_view_no);
observe.objs(ego);
old_clock_seconds = 255; // make sure clock gets updated this cycle
// on this cycle (if turned on)
}
Then change it to this:
if (new_room) { // First interpreter cycle in a new room
// Note: Everything other than logic 0 is discarded
// from memory when new.room is executed
load.logics(90); // Load game specific functions logic into memory
if (debug_active)
{
load.logics(99); // load debug logic into memory
}
clear.lines(24,24,0); // clear bottom line of screen (remove ego's coords if shown)
animate.obj(ego);
load.view.v(ego_view_no);
set.view.v(ego, ego_view_no);
observe.objs(ego);
old_clock_seconds = 255; // make sure clock gets updated this cycle
// on this cycle (if turned on)
}
As far as I can tell, this fixes the problem.
This only needs to be done if you are using the UPDATED template game. If you are using the template game that ships with AGI Studio 1.31, then you should not have to do this.