Someone please help I don’t understand why Starpup wont Jump when A buttons pressed someone pls fix this
You just Forgot to add gravity (AY ACCELERATION)
(I also made a jump the MANUAL way. instead of using Jump _ Pixels)
here’s better code for you: https://arcade.makecode.com/S53924-72555-02327-24526
the short answer is, “you made it to a positive number, making it go down.” but if you want more information about the blocks, read this.
your problem was the fact that you put 100, which makes it go downwards. to make it go up, you have to put a negative number.
if youre wondering why i put this,
it’s because there is the “set acceleration” block that i put on the start which adds gravity to the game. so when you make it go up, it falls back down. if you want to slow it down, for, lets say, a space level, you can lower the velocity by adding a “set x” block and changing the “x” into the “ay (acceleration y)” and lowering down to something like 200.
it’s positive, positive means down or right, put the number in negative.
i think that all, gl
I’m not sure to be honest, on the surface level it should work fine! The extension may be broken. Don’t worry, there’s an easy way to replicate the physics without the extension.
Just add a “set [sprite] [dropdown - default is x] to [value - default is zero]” and add it to the the “on start” block. Then, set the sprite to the one you want and change the dropdown menu to “acceleration y” and the value to something like 200 (it must be in the positives in order for the sprite to fall downwards) and in the “On A button pressed” block, add the same block as a I said earlier and change the dropdown to vy (velocity y). Set the velocity in this one to something negative (this will make the sprite go up before dropping back down, thanks to the downwards acceleration). You may play around with the values until you find something that suits you!
Here’s one I made earlier:
(I also added in a bit of code to prevent the sprite jumping in mid-air.)
Thank you so much