» Uncategorized Posts

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 );
}

get_char_info

Returns with various values from the character’s main folder that are otherwise inaccessible.

ArgumentTypeDescription
player:realPlayer number to get info from
info:realThe type of info to get

Note that any property with STR in the name will return as a string. Everything else returns as a number.

The values you can get using this function can be the following macros:

Macro Associated file Description
INFO_HUD hud.png The normal sprite used in the character’s HUD bar during gameplay.
Returns a sprite index.
INFO_HUDHURT hud_hurt.png The hitstun sprite used in the character’s HUD bar during gameplay.
Returns a sprite index.
INFO_ICON icon.png The sprite used in the custom character select menu.
Returns a sprite index.
INFO_PORTRAIT portrait.png The large sprite used on the results screen when the character wins.
Returns a sprite index.
INFO_OFFSCREEN offscreen.png The icon that displays when the character itself is offscreen.
Returns a sprite index.
INFO_CHARSELECT charselect.png The sprite used in the character select screen when the character is selected and loaded.
Returns a sprite index.
INFO_STR_NAME name
(in config.ini)
The character’s name.
Returns a string.
INFO_STR_AUTHOR author
(in config.ini)
The author of the character.
Returns a string.
INFO_STR_DESCRIPTION description
(in config.ini)
The description of the character.
Returns a string.
INFO_PLURAL plural
(in config.ini)
Will return true if the character’s name refers to multiple characters.
Returns true or false.
INFO_VER_MAJOR major version
(in config.ini)
The whole number (before the decimal) in the character’s version number.
Returns a number.
INFO_VER_MINOR major version
(in config.ini)
The fractional number (after the decimal) in the character’s version number.
Returns a number.

Example, called from hit_player.gml:

// Grabs the name of the character you just hit and then adds it to a string that can be drawn later.
hit_text = "See ya, " + get_char_info( hit_player_obj.player, INFO_STR_NAME) + "!";