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

#1 2012-03-09 06:43:59

hokkaidoandme
New Scratcher
Registered: 2012-03-09
Posts: 7

How do you use GRAVITY?

If I want to jump using the space bar and not fall through the landing area, how do I do that? Can you screenshot an example for me?
Thanks

Offline

 

#2 2012-03-09 07:21:21

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: How do you use GRAVITY?

Hello, hokkaidoandme!
What you want is also a sensor to stop it from going through.  smile
But, it sounds like this is a school project (correct me if I'm wrong), so I won't give you the exact scripts; just some pointers.  smile
The classic way is to simply check if it's touching the base color. If it is, you move up one step. If not, you move down half a step.
See if that helps.  smile

Offline

 

#3 2012-03-09 07:23:52

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: How do you use GRAVITY?

Yeah I would agree with what sci said  smile
It you don't understand I've made a game engine that you can have a look at  smile


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#4 2012-03-13 15:02:34

hokkaidoandme
New Scratcher
Registered: 2012-03-09
Posts: 7

Re: How do you use GRAVITY?

Thanks guys, it's great!
@scimonster- cough, cough, you're correct.... it's a school project...

Offline

 

#5 2012-03-13 15:06:09

joletoletest
Scratcher
Registered: 2012-02-16
Posts: 6

Re: How do you use GRAVITY?

This! Oh and I am not new, this is just my test account.

Offline

 

Board footer