News

iasa_script

Frees up the character to perform any action.

Example, called from attack_update.gml:

// this attack is cancellable on hit:
if (window == 3 && has_hit){
iasa_script();
}

set_attack

Changes the character’s state to the specified attack.

ArgumentTypeDescription
state:realThe attack to set

Example, called from attack_update.gml:

// allows the player to cancel the endlag of a successful parry into Nspecial (but not other specials):
if (state == PS_PARRY && window == 2 && perfect_dodged && special_pressed) {
if !(up_down || down_down || left_down || right_down) {
set_attack( AT_NSPECIAL );
}
}

set_state

Changes the character’s state.

For attack states use set_attack( state )  Reference→
ArgumentTypeDescription
state:realThe state to set

Example, called from attack_update.gml:

// this attack cancels into pratfall when you press the dodge button:
if (window == 3 && shield_pressed){
set_state( PS_PRATFALL );
}

get_state_name

Returns a string of the player’s state.

ArgumentTypeDescription
state_index:realThe state index to get the name of

Example, called from debug_draw.gml:

// draws the player's state:
draw_debug_text( x, y, "state: " + get_state_name( state ));

attack_end

Resets can_hit properties for all hitbox groups for the current attack. Can be used for looping attack windows, so that the hitboxes can hit again.

Example, called from attack_update.gml:

if (window == 3 && window_timer == 1 && attack_down){
window = 2;
window_timer = 0;
attack_end(); //refreshes window 2's hitbox
}