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

#1 2008-11-22 10:49:33

Pacatafox
Scratcher
Registered: 2008-11-21
Posts: 25

Gravity and Rocks

Hey everyone im a newb at scratch so how do you make rocks fall from the sky and if you get hit you die. Also, how do u make gravity. One last thing, how do you make a floor. Ty in advance

Last edited by Pacatafox (2008-11-22 10:52:39)

Offline

 

#2 2008-11-22 15:35:36

Hunter82798
Scratcher
Registered: 2008-08-24
Posts: 8

Re: Gravity and Rocks

Okay well,I'm not that great myself,but it really depends on how you want the gravity and what objects you want to be affected,how they are moving if they will regenerate at the top of the screen,etc.Here's one of my favorite ways to do it[blocks]<when green flag clicked><forever if><<  <not>  >><touching color[ color of ground]<change{upward momentum  }by( -1)[/blocks]

[blocks]<when green flag clicked><forever><change y by( <{upward momentum  }>[/blocks]

to jump or something i would do this:[blocks]<when[ up ]key pressed><set{upward momentum  }to( blank)[/blocks] hope that helps:)

Offline

 

#3 2008-11-22 18:18:28

Pacatafox
Scratcher
Registered: 2008-11-21
Posts: 25

Re: Gravity and Rocks

ty

Offline

 

#4 2008-11-22 18:25:14

Pacatafox
Scratcher
Registered: 2008-11-21
Posts: 25

Re: Gravity and Rocks

[blocks]<when[  ]key pressed><forever if><<  <not>  >><touching color[ [/blocks] but I dont get the by part

Offline

 

#5 2008-11-22 20:58:28

Hunter82798
Scratcher
Registered: 2008-08-24
Posts: 8

Re: Gravity and Rocks

Do you know what a variable is?

Offline

 

#6 2008-11-23 05:01:27

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Gravity and Rocks

Hi Pacatafox -

One of the best ways to learn Scratch is to look at other projects that do what you want to do and download them and learn from the scripts.  So here is a project that has a few of the things you are looking for (falling items, solid floors) - maybe you will find it useful.

http://scratch.mit.edu/projects/jay/132


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#7 2008-11-23 09:05:07

Pacatafox
Scratcher
Registered: 2008-11-21
Posts: 25

Re: Gravity and Rocks

k thanks

Offline

 

#8 2008-11-23 10:24:51

Pacatafox
Scratcher
Registered: 2008-11-21
Posts: 25

Re: Gravity and Rocks

hm i tryed editing the sprites of the block game and as soon as I did that it got all screwed up

EDIT: nevermind just had to change the script a little

Last edited by Pacatafox (2008-11-23 10:27:17)

Offline

 

Board footer