But my
Camera_OneFrame_Function is junk I made up on the fly, not really useful.
But there is a problem with what you have. Here is how I see it "should" be done. ( Leave main() as it is)
function Camera_OneFrame_Function()
{
//normal contents of camera action while loop
if(key_w) camera.x += 5 * time_step;
if(key_s) camera.x -= 5 * time_step;
if(key_a) camera.y += 5 * time_step;
if(key_d) camera.y -= 5 * time_step;
}
action Normal_Camera_Action()
{
while(1)
{
//default lite-c camera
Camera_OneFrame_Function();
wait(1);
}
}
function pause()
{
if(freeze_mode == 2) freeze_mode = 0;
else freeze_mode = 2;
//
while(freeze_mode==2)
{
//continue camera while frozen
Camera_OneFrame_Function();
wait(1);
}
}