Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do you make a sprite jump while turning?
- Heart333
-
79 posts
How do you make a sprite jump while turning?
So I decided to create a Geometry Dash type game on Scratch, but I have no idea what scripts to put to make the square jump and rotate! If you've ever played Geometry Dash before, then you know how when you touch the screen/press the spacebar the square jumps and rotates, then it falls back in the same position. When you press the spacebar again, it does the sequence all over again.
Any help would be greatly appreciated. Thank you!
Any help would be greatly appreciated. Thank you!

- qinkeer
-
27 posts
How do you make a sprite jump while turning?
In that case you should look inside this: So I decided to create a Geometry Dash type game on Scratch, but I have no idea what scripts to put to make the square jump and rotate! If you've ever played Geometry Dash before, then you know how when you touch the screen/press the spacebar the square jumps and rotates, then it falls back in the same position. When you press the spacebar again, it does the sequence all over again.
Any help would be greatly appreciated. Thank you!
https://scratch.mit.edu/projects/68663896/
- purplebook163
-
500+ posts
How do you make a sprite jump while turning?
Did you figure it out?
- Heart333
-
79 posts
How do you make a sprite jump while turning?
In that case you should look inside this: So I decided to create a Geometry Dash type game on Scratch, but I have no idea what scripts to put to make the square jump and rotate! If you've ever played Geometry Dash before, then you know how when you touch the screen/press the spacebar the square jumps and rotates, then it falls back in the same position. When you press the spacebar again, it does the sequence all over again.
Any help would be greatly appreciated. Thank you!
https://scratch.mit.edu/projects/68663896/
That's kinda what I wanted, except I wanted a jump that rotates a full 1/4 turn and that's it- it comes back down.
Play Geometry Dash and you'll see what I mean. Thanks for the tip though!
Last edited by Heart333 (June 27, 2015 02:45:31)
- Heart333
-
79 posts
How do you make a sprite jump while turning?
Nope! Any suggestions would be greatly appreciated! Did you figure it out?

- Superthunder5000
-
73 posts
How do you make a sprite jump while turning?
when green flag clickedIs this what you mean by turning while jumping ???
forever
if <key [Up v] pressed?> then
repeat (10)
change y by (Anything)
turn ccw (10) degrees
end
end
end
end
Last edited by Superthunder5000 (June 27, 2015 02:55:36)
- jtmit
-
60 posts
How do you make a sprite jump while turning?
You could try something like:
and this:
Maybe scratch should have an update with a block like:
when [whatever] key pressed
set [jumping?] to [1]
repeat (10)
change y by (10)
end
set [jumping?] to (0)
and this:
when green flag clicked
forever
if <(jumping) = [1]> then
repeat (10)
turn cw (9) degrees
end
end
end
Maybe scratch should have an update with a block like:
turn () degrees while moving () steps
Last edited by jtmit (Nov. 26, 2015 00:47:57)
- flora4
-
2 posts
How do you make a sprite jump while turning?
You could try something like:when [whatever] key pressed
set [jumping?] to [1]
repeat (10)
change y by (10)
end
set [jumping?] to (0)
and this:when green flag clicked
forever
if <(jumping) = [1]> then
repeat (10)
turn cw (9) degrees
end
end
end
Maybe scratch should have an update with a block like:turn () degrees while moving () steps
- BKFighter
-
1000+ posts
How do you make a sprite jump while turning?
Please don't necropost. This topic is a few months old and you didn't add anything relevant.You could try something like:when [whatever] key pressed
set [jumping?] to [1]
repeat (10)
change y by (10)
end
set [jumping?] to (0)
and this:when green flag clicked
forever
if <(jumping) = [1]> then
repeat (10)
turn cw (9) degrees
end
end
end
Maybe scratch should have an update with a block like:turn () degrees while moving () steps
- coollegoguy
-
20 posts
How do you make a sprite jump while turning?
Make your jumping program first, then find out how many frames exactly it takes to touch the ground after jumping. Then do the math, take 90 degrees and divide that by the number of frames it took. then add a block saying to turn that many degrees every frame.
- Top_Slugga
-
8 posts
How do you make a sprite jump while turning?
if <I wonder how to do this> then
forever
Keep searching google until I find something that's kind of useful
end
end
Last edited by Top_Slugga (Jan. 6, 2021 16:25:15)
- dark492
-
8 posts
How do you make a sprite jump while turning?
when green flag clicked
point towards [ v]
- gozhaym
-
3 posts
How do you make a sprite jump while turning?
when green flag clicked
forever
if <key [ w] pressed> then
repeat (9)
point towards ((direction) + (10))
wait (.1) secs
end
yeah not so much smooth
But atleast i tryed
AND LITTLE BUG
Last edited by gozhaym (Oct. 3, 2021 07:41:48)
- Cheese_Person100
-
1 post
How do you make a sprite jump while turning?
It doesn't go back down so it doesn't count as a jump
- Jaga78910
-
1 post
How do you make a sprite jump while turning?
I tried it all but nothing worked???
- MrKingofScratch
-
100+ posts
How do you make a sprite jump while turning?
You can check out a tutorial by @griffpatch here
- lanzpogi1660
-
1 post
How do you make a sprite jump while turning?
when green flag clicked
forever
if <key [ w] pressed> then
repeat (9)
point towards ((direction) + (10))
wait (.1) secs
end
yeah not so much smooth
But atleast i tryed
AND LITTLE BUG
when green flag clickedthis code is smooth you guys try it!
point in direction (90)
forever
point in direction (45)
repeat until <key [w] pressed>
point in direction ((direction) + (5))
- Discussion Forums
- » Help with Scripts
-
» How do you make a sprite jump while turning?