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