Discuss Scratch

coolkidmario54321
Scratcher
4 posts

Need help with a jump bug in my game

I have a game called super duper sonic (more like an engine) and there’s a glitch that you can jump in the air, witch basically makes you fly. I made a variable called “can jump”, and when you jump it sets it to no, then when you touch the ground, it sets it to yes. I removed it since it didn’t work. Can someone help me? Link to project: https://scratch.mit.edu/projects/416460157/editor

Last edited by coolkidmario54321 (Aug. 20, 2020 19:11:26)

AIC2018
Scratcher
9 posts

Need help with a jump bug in my game

Ok i checked out the game, and basically what you need is a script that goes something like this:

whenspacekeypressedchangeybyhoweverhighyouwantwaitputthistohowevermanysecondsyouwantsonictostayintheairsecschangeybythesamenumberbutwithaminusbehindit.

You could backpack the script from my game called combat system. It's in the player sprite.

Then if you want it to be more smooth, just put a “change y by 1” and duplicate it until you like it. Example, if you want to change y by 60, then you
just put down 10 “change y by 1” blocks and then duplicate it six times.

Hope this helped!

Also, do you want something where you can hold the space bar to go higher when you jump, Just not too high?
If so, I think I have a fix for that as well.
coolkidmario54321
Scratcher
4 posts

Need help with a jump bug in my game

@ AIC2018 Yes please!
AIC2018
Scratcher
9 posts

Need help with a jump bug in my game

Okay, I've made a project and posted it that could help you. The system i put together is a little laggy but should do the job.

Hope i was able to help!

Here's the project link: https://scratch.mit.edu/projects/419215118
SuperJet888
Scratcher
39 posts

Need help with a jump bug in my game

realsonicthehedge
Scratcher
10 posts

Need help with a jump bug in my game

whenclickedsayhelp me.

Powered by DjangoBB