Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do I make a character jump for a platformer game
- karlee202
-
4 posts
How do I make a character jump for a platformer game
Can somebody tell me how to make a character jump in a platform game?
- levtey
-
100+ posts
How do I make a character jump for a platformer game
when green flag clickedYou should also have a separate script that says
forever
if <key [up arrow or space v] pressed?> then
repeat [number]
change y by [number]
end
end
end
when green flag clicked
forever
if <not <touching [ground v]?>> then
change y by [same number as jump]
end
end
Last edited by levtey (May 10, 2014 19:53:55)
- Happyman10123
-
3 posts
How do I make a character jump for a platformer game
that doesnt work
- ADHDPotato
-
37 posts
How do I make a character jump for a platformer game
Mind sharing a screenshot? That would make it easier to help. If you don't want to, then look how I did it in my coding for my platform game. Just look at the scripts under sprite 2.
http://scratch.mit.edu/projects/23287648/#editor
http://scratch.mit.edu/projects/23287648/#editor
- RandomPerson1789
-
100+ posts
How do I make a character jump for a platformer game
when green flag clickedHope this helped!
forever
set [Y v] to [0]
if <key [Up Arrow v] pressed?> then
repeat (20)
change [Y v] by (0.3)
change y by (y)
end
end
end
Last edited by RandomPerson1789 (June 7, 2014 00:17:20)
- lalash
-
25 posts
How do I make a character jump for a platformer game
Maybe this?
Or what ever - number you want.
when green flag clicked
forever
if <not <touching color [platform color]?>> then
change y by (-3)
end
end
Or what ever - number you want.
- SeeFourGoBoom
-
46 posts
How do I make a character jump for a platformer game
If i hold up it keeps going up how do i stop this
- rocketclock123
-
100+ posts
How do I make a character jump for a platformer game
when green flag clickedHope this helps!
forever
if <key [up arrow v] pressed?> then
repeat (10)
change y by (1)
end
repeat (10)
change y by (-1)
end
end
end

- ipaddude
-
100+ posts
How do I make a character jump for a platformer game
when green flag clickedHope this helped!
forever
set [Y v] to [0]
if <key [Up Arrow v] pressed?> then
repeat (20)
change [y v] by (0.3)
change y by (y)
end
end
end
This should be more accurate.
when green flag clicked
forever
set [y v] to [0]
if <key [Up Arrow v] pressed?> then
set [y v] to [10 --depending on how high you want to jump.]
end
if <(onGround) = [false]> then
change [y v] by [-2 --depends on gravity]
end
change x by (x)
change y by (y)
end
this is not a real quote.
Last edited by ipaddude (April 8, 2019 20:23:14)
- Kraken_Games
-
100+ posts
How do I make a character jump for a platformer game
dosent go down
when green flag clickedHope this helped!
forever
set [Y v] to [0]
if <key [Up Arrow v] pressed?> then
repeat (20)
change [y v] by (0.3)
change y by (y)
end
end
end
This should be more accurate.when green flag clicked
forever
set [y v] to [0]
if <key [Up Arrow v] pressed?> then
set [y v] to [10 --depending on how high you want to jump.]
end
if <(onGround) = [false]> then
change [y v] by [-2 --depends on gravity]
end
change x by (x)
change y by (y)
endthis is not a real quote.
Don't necropost - This topic is very old!
- panda-wat
-
100+ posts
How do I make a character jump for a platformer game
Please don't post in old topics, it bumps them to the top and moves unanswered posts down.
- Discussion Forums
- » Help with Scripts
-
» How do I make a character jump for a platformer game