Designing Games with Game Maker
Miscellaneous variables and functionsHere are some variables and functions that deal with errors.
error_occurred Indicates whether an error has occurred The following functions exist that allow you to check whether certain variables exist and with which you can set variables and get their values. In all these functions the variable name is passed as a string!
variable_global_exists(name) Returns whether a global variable with the given name (a string) exists. For example, you can write:
You can also use these functions to pass variables to a script in a sort of by-reference way, by passing their names as strings and using the functions to change them. You can change the program priority using the following function:
set_program_priority(priority) Sets the priority for the program. You can indicate a value between -3 and +3. A value of -3 means that the program will only run if no other process on the computer requires processing time, or stated differently, when all other processes are idle. Values of -2 and -1 are below normal, so other processes will get priority. 0 is the normal value. +1 and +2 give a higher priority, resulting possibly in higher speed and smoother game flow. But other processes will get much less processing time. +3 indicates real-time mode. In real-time mode basically all time is allotted to the game. This can lead to serious problems with any other applications running on the computer. Also keyboard events and e.g. the pressing of the close box might no longer be recorded by Windows. So only use this if you want all the processor time. Also better check carefully before using it and save the game before running. |
Alternative versions
|
You can also read this manual on one single long page (± 1.5 mb) Also available in: ![]() Download helpfile
|





