» Uncategorized Posts

shader_start

Used at the beginning of draw scripts to recolor the following draw calls according to the character’s color profile. Must be followed by shader_end()  Reference→

Example, called from post_draw.gml:

// draws a hat that is recolored by the shader:
shader_start();
draw_sprite_ext( sprite_get( "cool_hat" ), hat_image_index, x, y );
shader_end();

set_num_palettes

Sets the maximum numbers of alternate color palettes that your character can use.

ArgumentTypeDescription
num:realThe number of alternate color palettes to set. Must be a value between 6 and 16

Example, called from colors.gml:

// changes the maximum number of palettes to 10:
set_num_palettes( 10 );

view_get_yview

Returns the y position (top side) of the current viewport.

Example, called from article1_update.gml:

// destroys articles out of the upper view side:
if (y < view_get_yview()) {
instance_destroy();
}

view_get_xview

Returns the x position (left side) of the current viewport.

Example, called from article1_update.gml:

// destroys articles out of the left view side:
if (x < view_get_xview()) {
instance_destroy();
}

view_get_hview

Returns the height of the current viewport.

Example, called from article1_update.gml:

// destroys articles out of the lower view side:
if (y > view_get_yview() + view_get_hview()) {
instance_destroy();
}