Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Sorry to bother you again. The ladder thing is good. But now for the jumping when I am on a Jump Thru platform I can jump low and high, but on other ground it only jumps high. There is no variable jump and I can't figure out why. So the fix is kinda not good as I really want the variable jump. If you have any time or ideas I would appreciate it. There is no other issues and I am using the same sprite sizes and everything. I changed the art, but same sizes and origins.

(1 edit)

Variable jump is handled in player_controls_y, lines 16-18. Normally looks like this:

    if(jumped && !canjump && yspeed < 0){
        yspeed *= 0.5
    }

Not sure what could be wrong, but there's a lot of variables involved, so it's possible one of them gets changed behind your back with the new ordering of things. I think this would work just fine and with less potential for interference:

    if(p_a && yspeed < 0){
        yspeed *= 0.5
    }

(since we know that k_a is false going into this check, we have k_a && !p_a, i.e., the jump button is currently not pressed, but it was the previous step - i.e, it was released this step. We still want to check that the player is moving upwards so that check should be left in)

(+1)

That did it! it worked great! Thank you soooooooooo much!