Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

So the primary issue is that your character has nothing stopping them from jumping in mid air.  You've got some sort of code to detect when you've reached the ground because that's when the ever increasing gravity effect gets reset.  So whatever check you have for that needs to also be in the code for the jumping.   However, I'd guess you are using the Event block for "when Space Key pressed" because of the way that the operating system handles a keyboard key held down.  Instead I would suggest something like the following.

 

Jump_key is a variable created to track the input state.  It can either be local to the object or global depending on whether any other sprites need to know about it.  This code has an advantage that you can use Jump_key over and over again in the code instead of having to have put the key/mouse checks in over and over again.  It also means you could easily add a new button to mean Jump without having to change any spots except the one.

My space game has one of these input blocks for each player action and the code is in the stage.  This makes it so I can respond to movement commands in the Player sprite while allowing the player's bullet sprite to respond to the Fire input.

Thanks, But I have solved the bug, you can check it out

Hii! Please Rate my game in this Jam. Link below

https://itch.io/jam/pure-text-jam/rate/1099645