|
|
freeze_mode == 2
#128405
05/06/07 20:17
05/06/07 20:17
|
Joined: Jul 2006
Posts: 783 London, UK
sheefo
OP
User
|
OP
User
Joined: Jul 2006
Posts: 783
London, UK
|
I am making a pause feature for my game, and I noticed that I need to set freeze_mode to 2 instead of 1. This, however, is dangerous  It seems every function is paused at the next wait() function when freeze_mode is set to 2, then resumed again when freeze_mode is reset to 0. The only functions active are those executed by "on_" events and they only run for one frame, even if it has a wait(1) command. For my game, I need to make a scene with a glowing pause image and stuff like that, but this is not possible since the function with the loop only runs for one frame. Is there a workaround to make a loop run during freeze_mode? Is there a way to isolate a function from the freeze list? My loop is "while(freeze_mode == 2)", with a "wait(1)" command in it, and after that wait(1) it stops. This is frustrating!
|
|
|
Re: freeze_mode == 2
[Re: sheefo]
#128408
05/06/07 22:17
05/06/07 22:17
|
Joined: Jul 2002
Posts: 4,436 Germany, Luebeck
Xarthor
Expert
|
Expert
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
|
Quote:
0 - All functions are running (default) 1 - Entity functions (my != NULL) and particle functions are suspended, all other functions are running 2 - All functions are suspended.
Okay, why not use freeze_mode=1 and set the my pointer of the functions which shall run to anything else than null?
|
|
|
Re: freeze_mode == 2
[Re: JazzDude]
#128410
05/07/07 03:17
05/07/07 03:17
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
Expert
|
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
freeze_mode = 1.5; lol...
The only solution I see is to use freeze_mode = 1; and adjust all your functions to work around that...
You can also use enable_key/mouse = 0; to disable those "on_xxx" events, and then in your while loop use "while (!key_p)"...
xXxGuitar511 - Programmer
|
|
|
|