how might one put a limit on how high an object can jump? aka - if i hold down the "up" key i don't want my actor to soar to the sky
int jumpCounter = 0;
if (Greenfoot.isKeyDown("up")) { jumpCounter++; if (jumpCounter < 20) { // move upwards .... } }