Vladimir_spb
Member
I'm sorry I'm using google translate.
1. The character has a "crouch" state when I hold down the down key.
2. When the character is on the falling platform and hold down key, he remains in the crouch state and does not change it.
if (!is_on_ground && down_held) state = states.FALL; //Does not work!!!
or
if (!is_on_ground && vsp>0) state = states.FALL; //Does not work!!!
1. The character has a "crouch" state when I hold down the down key.
2. When the character is on the falling platform and hold down key, he remains in the crouch state and does not change it.
GML:
function player_crouch_state() {
show_state = "Crouch";
vsp += global.grav;
if (!is_on_ground && down_held) state = states.FALL; //Does not work!!!
}
or
if (!is_on_ground && vsp>0) state = states.FALL; //Does not work!!!