Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to create gravity in my Scratch Platformer?
- Jins2011
-
Scratcher
38 posts
How to create gravity in my Scratch Platformer?
I've been dealing with gravity issues in my platformers. How do you make a gravity script for when the player jumps and collides with the level?
Going through the same amount of problems, my Player is glitching. When it got glitched, the sprite got stuck inside the level and got crazy as if it was set to a random position. Have any collision or gravity scripts you can share with me to solve this problem? If so, please post a comment down below, that will might help me?
FEW THINGS:
- If you have a Scratcher who has a backpackable sprite for the platformer, make sure that this sprite doesn't use animation. (in my scenario, I am not using
any player animation!).
This log is going to be updated as soon as I receive some feedback from some Scratchers!
Going through the same amount of problems, my Player is glitching. When it got glitched, the sprite got stuck inside the level and got crazy as if it was set to a random position. Have any collision or gravity scripts you can share with me to solve this problem? If so, please post a comment down below, that will might help me?
FEW THINGS:
- If you have a Scratcher who has a backpackable sprite for the platformer, make sure that this sprite doesn't use animation. (in my scenario, I am not using
any player animation!).
This log is going to be updated as soon as I receive some feedback from some Scratchers!
Last edited by Jins2011 (June 26, 2022 03:19:10)
- cIoudyness
-
Scratcher
500+ posts
How to create gravity in my Scratch Platformer?
griffpatch has a nice platformer engine that both explains the code behind and gives you a backpackable sprite that you can customize to what you need
- Jins2011
-
Scratcher
38 posts
How to create gravity in my Scratch Platformer?
griffpatch has a nice platformer engine that both explains the code behind and gives you a backpackable sprite that you can customize to what you need
Hmm… Okay.
when green flag clicked
try
- Jins2011
-
Scratcher
38 posts
How to create gravity in my Scratch Platformer?
@cloudyness
I guess it contains animation. My character is actually non-animated, for this scenario.
well I will put that in my forum text to let everyone know!
I guess it contains animation. My character is actually non-animated, for this scenario.
well I will put that in my forum text to let everyone know!
- cIoudyness
-
Scratcher
500+ posts
How to create gravity in my Scratch Platformer?
it’s (again) customizable. you can just take out what you don’t need and change what you want
there’s also a lot of other platformer engines that you can browse through on scratch
there’s also a lot of other platformer engines that you can browse through on scratch
- Jins2011
-
Scratcher
38 posts
How to create gravity in my Scratch Platformer?
it’s (again) customizable. you can just take out what you don’t need and change what you want
there’s also a lot of other platformer engines that you can browse through on scratch
Okay. But ahem… AGAIN! Problem. It contains no script, so I guess this takes a while. Do you have any gravity scripts I can use, please?
- cIoudyness
-
Scratcher
500+ posts
How to create gravity in my Scratch Platformer?
are we looking at the same project?
https://scratch.mit.edu/projects/67727504/
the first sprite is literally just a good gravity script and if you didn’t want to code the rest of the platformer you could just backpack an “improved” sprite
https://scratch.mit.edu/projects/67727504/
the first sprite is literally just a good gravity script and if you didn’t want to code the rest of the platformer you could just backpack an “improved” sprite
- Jins2011
-
Scratcher
38 posts
How to create gravity in my Scratch Platformer?
are we looking at the same project?
https://scratch.mit.edu/projects/67727504/
the first sprite is literally just a good gravity script and if you didn’t want to code the rest of the platformer you could just backpack an “improved” sprite
Nope. I'm using Scratch 3.0 Projects. So there was a 2.0 one?
(After previous edit)
Okay, I changed my mind. Scratch 2.0 Tutorials are actually outdated.
Why am I leaving an outdated script behind?
It started to glitch when I took out the improved backpackable sprite with my glitchy gravity sprite. Now the sprite is completely bugging all over the level.
This is becoming such a big issue.
(After so much stress)
Oh… The touching <_> blocks!
My level sprite is actually named level. But what is the touching <platform>? block for?
nice. This Scratch problem is officially… SOLVED
Last edited by Jins2011 (June 26, 2022 05:33:48)
- Discussion Forums
- » Help with Scripts
-
» How to create gravity in my Scratch Platformer?