Whenever I make a platformer, I have trouble with jumping. My character never is affected by gravity! I tried many different methods, but I eventually had to release...this.
http://scratch.mit.edu/projects/Earthboundjeff/1571090
Last edited by Earthboundjeff (2011-03-28 14:15:37)
Offline
I have always found it helpful to go into "import sprite" and choose the gravity marble. All you need to do is modify the scripts and add controls. You could also try using a platform base. http://scratch.mit.edu/projects/JSO/1105685
Offline
It's really just that when they jump, they can jump as many times as the button is pressed and they don't go down until you let go of the button.
Offline
<when green flag clicked>
<forever if> <key[ Up Arrow ]pressed?>
<change y by( 30 )>
<wait until> <touching[ Ground ]>
<end>
Offline
Well, there's another thing I don't understand about:
In some games, the script contains a variable block named Gravity. How do you make the variable have effect?
Offline
Almost foolproof method:
Offline
I don't get it. The variables don't have any effect on the script. It justs shows the number on the stage.
Offline
Clank23 wrote:
You put a forever change y by (varible)
Whoops, I forgot to add that into my script above. Right now it does nothing
I guess it wasn't foolproof.
Here's my script in it's entirety:
Last edited by Kileymeister (2011-04-03 08:47:06)
Offline