This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-05-22 12:08:31

colorfusion
Scratcher
Registered: 2009-10-03
Posts: 500+

Gravity and jumping <Tutorial>

This is my second tutorial on scratch scripts, this one will teach you how too make a simple jump and gravity for your sprites
Before you start you will need to make a fallspeed or gravity variable and a jump variable

Gravity:

http://www.mediafire.com/imgbnc.php/fa211c4fa5dce7cc664b9341cc1394ef4g.jpg

Setting jump to 1 in that script makes sure that it can jump for the first time.

Jumping:

http://www.mediafire.com/imgbnc.php/27c314f8c8aaf7864fe5c010ef5e0d304g.jpg

Q&A:

Q. Why is is the fallspeed minus when it goes down?
A. Minus Y on scratch is down, and since it changes the Y by gravity/fallspeed it needs to be minus

Q. How do I make a variable?
A. In the variable block section click "Make a variable" then name it


Please tell me what my next tutorial should be about!

Last edited by colorfusion (2010-05-22 12:09:03)

Offline

 

#2 2010-05-22 12:11:14

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Gravity and jumping <Tutorial>

Excellent tutorial! This will be really helpful seeing as there have been countless threads about this as of late.

Offline

 

#3 2010-05-22 12:23:46

scmb1
Scratch Team
Registered: 2009-03-19
Posts: 1000+

Re: Gravity and jumping <Tutorial>

Fabulous tutorial! It's very nice of you to post this! I personally think it should be put in FAQ...


http://i48.tinypic.com/2z5pqad.png

Offline

 

#4 2010-06-24 15:39:42

Wolfclaw13
Scratcher
Registered: 2008-07-06
Posts: 8

Re: Gravity and jumping <Tutorial>

Thanks! This was very helpful!  big_smile

Offline

 

#5 2010-08-04 17:20:10

Nathan95673
Scratcher
Registered: 2009-04-30
Posts: 4

Re: Gravity and jumping <Tutorial>

Thanks! I've been trying to find the script to jump FOREVER. I'm gonna edit the script a tiny bit so that the sprite jumps at the edge of a cliff.


I am actually addressed as Nathan89. I shorten it by saying N89. Sounds like the letter "N" was hungry for 9 pizzas.  lol  That shows I'm a bit of a comedian. If you want to chat with me, go to "http://www.roblox.com/".  big_smile  I spend a lot of time on ROBLOX so searching for me there is your best chance of finding me.  cool

Offline

 

Board footer