News

get_window_value

Returns a value (real or undefined) from the attack grid for the specified attack, window and index.

ArgumentTypeDescription
attack:realThe attack to get the value of
window:realThe window to get the value of
index:realThe index of the attack grid to get the value of

Example, called from attack_update.gml:

// doubles current window vspeed:
vsp = get_window_value( attack, window, AG_WINDOW_VSPEED ) * 2;

reset_attack_value

Resets a value from the attack grid to the one originally initialized in [attack_name].gml.

ArgumentTypeDescription
attack:realThe attack to reset the value of
index:realThe index of the attack grid to reset the value of

Example, called from attack_update.gml:

// resets the number of jab windows to a number previously set in jab.gml:
reset_attack_value( AT_JAB, AG_NUM_WINDOWS );

set_attack_value

Overwrites a value from the attack grid for the specified attack and index. Default values are always 0.

ArgumentTypeDescription
attack:realThe attack to set the value of
index:realThe index of the attack grid to set the value of
value:realThe value to set

Example, called from jab.gml:

// sets the sprite of a jab attack to a custom sprite named "jab":
set_attack_value( AT_JAB, AG_SPRITE, sprite_get ( "jab" ) );

get_attack_value

Returns a value (real or undefined) from the attack grid for the specified attack and index.

ArgumentTypeDescription
attack:realThe attack to get the value of
index:realThe index of the attack grid to get the value of

Example, called from attack_update.gml:

// gives the character super armor during the final window of the attack:
if (window == get_attack_value( attack, AG_NUM_WINDOWS ) ) {
super_armor = true;
}

init_shader

Refreshes the character’s shader values. If you change any of their shader colors (including outline color), you must call this to tell the game the values have changed.

Example, called from update.gml:

// set the character's outline color to red:
outline_color = [ 255, 0, 0 ];
// tell the shader to update the character's colors:
init_shader();
// set the character's outline color back to black, but don't tell the shader that you changed it. This way, if the character action is interrupted before you can manually set the outline color back to black, it will still change back:
outline_color = [ 0, 0, 0 ];