Quoting jigalypuff.
Does the function stop running btw?
Which function?
The following probably terminate fine for that condition:
creditsf_add,
creditsf_set,
creditsf_update
tile_event
However, another tile function, or other functions might need some adjustment.
Look for non-terminating loops and resources which should be purged or hidden.
From another thread,
Help with unit placement, a sample offered by THIS:
function tile_position() {
my.enable_click = on;
my.event = tile_event;
//MOUSE_RANGE = ?; // default = 1000
my.tilt = 90;
my.orientated = on;
my.transparent = on;
while(1) {
my.alpha = 80+20*sin(my.x+my.y+total_ticks*15);
wait(1);
}
}
If something like that is used, that may be a problem, or it might not be.
while(1) can be replaced with while(me), and the ship selection portion might be placed in it's own level, so that maybe, on the next portion (playable portion), another level is loaded and the loop terminates automatically?
The loop might terminate on level change without modification (from while(1) to while(me)).
(Supposedly, on level change, globals keep 'their' values.
So, for example, the value of credit variables might stay the same.
Some variables might have to be reinitialized.
Some variables might be used to store state between levels.)
More information may be required to answer the question adequately / pseudo-adequately / inadequately again.