Skip to main content

Command Palette

Search for a command to run...

Jump Buffers

Published
1 min read

You can change the step event of the player to has a jump buffer with a small delay allowed when jumping. This code gives a 10 frame allowance to jumping

can_jump--;
if place_meeting(x, y+1, tile_id){
    can_jump = 10;
    _ver = 0
}
if ( keyboard_check_pressed(vk_space) && can_jump > 0){
    audio_play_sound(sound_jump, 4, false);
    _ver = -4;
    can_jump = 0;
}