» Uncategorized Posts

set_bg_data

Sets the values of a custom stage’s specific background layer.

You can set the following indexes:

Note that this only works on custom stages. Using this on a default stage will do nothing.

ArgumentTypeDescription
layer:realThe layer to change.Layers 1-6 are background, Layer 7 is ground level, and layers 8-9 are the foreground.
data:realThe data index to set. Can be one of the indexes listed above.
value:realThe value the data will be set to.

Example, called from a stage’s update.gml:
//This will cause the first background layer to sway up and down by 10 pixels over time.
set_bg_data(1, BG_LAYER_AUTOSCROLL_Y, sin(get_gameplay_time()) * 10 );

set_victory_sidebar

Overwrites character’s results screen sidebar image. (the one displaying their placement, defaulting to results_small.png.) Can be assigned to a 79x31px custom sprite using

sprite_get( sprite )  Reference→

ArgumentTypeDescription
sprite:realThe custom sprite to use

Example, called from load.gml:

set_victory_sidebar( sprite_get( "custom" ));

set_victory_portrait

Overwrites character’s victory portrait. Can be assigned to a 350x350px custom sprite using

sprite_get( sprite )  Reference→

ArgumentTypeDescription
sprite:realThe custom sprite to use

Example, called from load.gml:

set_victory_portrait( sprite_get( "custom" ));

set_article_color_slot

Changes the color slot of the currently selected color profile, affecting only articles and leaving the character alone.

ArgumentTypeDescription
shade:realThe color slot to change
red:realThe Red value to set the color to.
Should be between 0 and 255.
green:realThe Green value to set the color to.
Should be between 0 and 255.
blue:realThe Blue value to set the color to.
Should be between 0 and 255.
alpha:realThe Alpha value to set the color to, with 0 being fully transparent and 1 being opaque.

Example, called from post_draw.gml:

//This code sets the article's first color slot to be a partially-transparent white if they're set to a specific palette.
if get_player_color(player) == 13 {
set_article_color_slot(0, 255, 255, 255, 0.5);
}

set_character_color_shading

Sets the intensity of the color slot’s shading, with 1 being normal shading. Setting it to 0 will make it completely flat, reminiscent of the Early Access palettes in the base game. (Note that you aren’t restricted to just 1 or 0.)

ArgumentTypeDescription
shade:realThe color slot to change
value:realThe intensity of the shading.

//This code sets the first color slot to have completely flat shading if they're set to a specific palette.
if get_player_color(player) == 12 {
set_character_color_shading( 0, 0 );
}