Function | Description |
---|---|
object_add | Adds a new object. It returns the index of the object. You can now use this index in the routines above to set certain properties of the object and then you can use the index to create instances of the object. |
object_delete | Deletes the object with the given index. Make sure no instances of the object exist in any of the rooms. |
object_event_add | To give the object a behavior we must define events for the object. You can only add code actions to events. You need to specify the object, the event type, the event number (use the constants that have been specified before for the event_perform() function). Finally you provide the code string that must be executed. You can add multiple code actions to each event. |
object_event_clear | You can use this function to clear all the actions for a particular event. |
object_set_parent | Set the parentfor an object. |
Function | Description |
---|---|
variable_global_exists | Returns whether a global variable with the given name (a string) exists. |
variable_local_exists | Returns whether an instance variable with the given name (a string) exists for the current instance. |
variable_global_get | Returns the value of the global variable with the given name (a string). |
variable_global_array_get | Returns the value of index ind of the global array variable with the given name (a string). |
variable_global_array2_get | Returns the value of index ind1,ind2 of the global 2-dimensional array variable with the given name (a string). |
variable_local_get | Returns the value of an instance variable with the given name (a string). |
variable_local_array_get | Returns the value of index ind of an instance array variable with the given name (a string). |
variable_local_array2_get | Returns the value of index ind1,ind2 of an instance 2-dimensional array variable with the given name (a string). |
variable_global_set | Sets the global variable with the given name (a string) to the given value |
variable_global_array_set | Sets the index ind in the global array variable with the given name (a string) to the given value. |
variable_global_array2_set | Sets the index ind1,ind2 in the global 2-dimensional array variable with the given name (a string) to the given value. |
variable_local_set | Sets an instance variable with the given name (a string) to the given value. |
variable_local_array_set | Sets the index ind in an instance array variable with the given name (a string) to the given value. |
variable_local_array2_set | Sets the index ind1,ind2 in an instance 2-dimensional array variable with the given name (a string) to the given value. |
Function | Description |
---|---|
sprite_add_sprite | Adds the sprite stored the file fname to the set of sprite resources. The file must be a .gmspr file that is saved in the sprite property form in GameMaker. |
background_add_background | Adds the background stored the file fname to the set of background resources. The file must be a .gmbck file that is saved in the background property form in GameMaker. |
sprite_add_sprite | Adds the sprite stored the file fname to the set of sprite resources. The file must be a .gmspr file that is saved in the sprite property form in GameMaker. |
background_add_background | Adds the background stored the file fname to the set of background resources. The file must be a .gmbck file that is saved in the background property form in GameMaker. |
sprite_create_from_screen | Creates a sprite by copying the given area from the screen. |
sprite_add_from_screen | Adds an area of the screen as a next subimage to the sprite with index ind. |
background_create_from_screen | Creates a background by copying the given area from the screen. |
Function | Description |
---|---|
room_set_code | Sets the initialization code string for the room with the indicated index. |
script_get_text | Returns the text string of the script with the given index. |
execute_string | Execute the piece of code in the string str with the indicated arguments. |
execute_file | Execute the piece of code in the file with the indicated arguments. |
execute_program | Executes program "prog" with arguments "arg". "wait" indicates whether to wait for finishing. |
execute_shell | Executes the program (or file) in the shell. |
timeline_moment_add | Adds a code action to the time line at moment step. If the step does not exist it is created. So you can add multiple code actions for the same moment. |
These functions cannot be used any more due to changes in the
underlying runner that GameMaker: Studio uses to generate
the device specific packages making it impossible to generate
objects, images or code "on the fly" as was done before.