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) + "!";