Hello. I am coding a game like the old zelda and I get stuck on one thing: in the game I would like my character to jump when he is at the top of a cliff for example to land at the bottom of this cliff. the only problem is that I don't know how to do this. can someone help me?
What about:
when pressing jump
disable collision
disable player input
let the player move down on y-axis
enable collision
enable player input
?
that can be an idea but how to make so that the jump does not disable while I am still "in the air" (= on a solid)
Sorry, I think I do not understand the question.
when i jump off a cliff i disable player collisions and make it go down. But when should I reactivate the 8directions behavior?
Maybe it's possible to detect the bottom of the cliff?
If player.y > cliff.bottom: reactivate 8 direction?
this doesn't work with tilemap
Develop games in your browser. Powerful, performant & highly capable.
Can you see the cliff-side in your tilemap?
You could set your 8dir to inactive when your sprite is over the cliff-side.
Maybe make a tilemap of all cliff-sides.