Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Limited Jump
- Soron64
-
Scratcher
2 posts
Limited Jump
Hello,
I am making a platformer. I am trying to achieve limited jumps. Here is my code:
https://scratch.mit.edu/projects/643109540/
Thanks!
I am making a platformer. I am trying to achieve limited jumps. Here is my code:
https://scratch.mit.edu/projects/643109540/
Thanks!
- DepthOfDistruct
-
Scratcher
77 posts
Limited Jump
do something like
make sure to put that in the Col.y inside of the repeat until not touching color gray
if <key [up arrow] pressed?> then
set [spdy] to [10]
end
make sure to put that in the Col.y inside of the repeat until not touching color gray
Last edited by DepthOfDistruct (Feb. 14, 2022 02:43:40)
- Soron64
-
Scratcher
2 posts
Limited Jump
do something likeif <key [up arrow] pressed?> then
set [spdy] to [10]
end
make sure to put that in the Col.y inside of the repeat until not touching color gray
I am trying to make it so that the player can only jump one and not infinetly
- NMario84
-
Scratcher
1000+ posts
Limited Jump
Make a variable to indicate that the jump button was pressed. Make sure the condition only works if this value was not set otherwise.
I did this as an experiment in one of my earlier example projects.
https://scratch.mit.edu/projects/552278714/
I did this as an experiment in one of my earlier example projects.
https://scratch.mit.edu/projects/552278714/
- Discussion Forums
- » Help with Scripts
-
» Limited Jump