Designing Games with GameMaker
Scripts
Scripts cannot be changed during the execution of the game. The scripts are part of the game logic. Changing scripts would lead to self-rewriting code which very easily leads to errors. Also there are other ways to achieve this. If you really need to execute a piece of code that is not known at design time (e.g. from a file) you can use the following functions:execute_string(str,arg0,arg1,...) Execute the piece of code in the string str with the indicated arguments.
execute_file(fname,arg0,arg1,...) Execute the piece of code in the file with the indicated arguments.
Sometimes you want to store a script index in a variable and execute it. For this you can use the following function
script_execute(scr,arg0,arg1,...) Execute the script with index scr with the given arguments.
« Paths | Time lines »
Alternative versions
You can also read this manual on one single long page (± 1.5 mb)
Also available in:
Download helpfile
Also available in:
Download helpfile