For this game, on Scene 6, when we press the space bar, we want the item called Cube to jump up and come back down. We DO NOT want it to continue ascending when we hold down the space bar or when it’s pressed quickly multiple times.
How can we do this? Delightex Edu :: Video Game, November 2026
Thanks!
@CoRichard_Li already make a geometry games with different mode!
From one of your previous students, I suggest a variable that starts at 0 and a loop that checks “when (variable) is 0 run
when spacebar is clicked
add 1 to (variable)
push cube up (x amount) (using physics blocks)”
I heavily suggest adding physics to the cube so the jumping feels more natural and it is way easier to code.
You can also have a loop that checks when the cube hits the ground to subtract 1 from (variable) which would mean at the start just add 1 to be safe.