Thread:Epic Manky/@comment-108.85.152.134-20150428225827

I have an idea for jumping. How about setting it so that when the button for jumping is pressed, a value is set for max jump? With that, the loop for movement could be made make you fall when ANOTHER value for the player's current jump exceeds it!

In terms of code, I think this might work:

MAXJUMP=5

(this would be the max number of blocks the player can ascend before falling)

CURRJUMP=0

(how many blocks player has jumped, reset when touching ground)

ONGROUND=1

(whether or not the player is on the ground;1 is true, 0 is false)

I will now skip to the main part of the jumping mechanic itself.

Different lines are separated by line breaks.

IF CURRJUMP==MAXJUMP THEN IF ONGROUND==0 THEN PY=PY-1:LOCATE PX,PY:?"↣": LOCATE PX,PY+1:?" "

IF CURRJUMP>0 THEN IF CURRJUMP 