Create a flag it can check, that resets when touching the ground
Originally posted by code!Freeram = $xx
;This part should be there somewhere at the top of your levelasm
LDA $13EF
BEQ asdf ;check if mario is touching ground
STZ !Freeram ;if yes, reset custom counter
asdf: ;otherwise, keep the counter as it is
LDA !Freeram ; check freeram to see if player is allowed to jump
BNE notallowed ; if not, skip the jumping routine
INC !Freeram ;if allowed, increase freeram so player can't jump again
;code for jumping here
notallowed:
Follow Us On