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

#1 2009-09-05 16:43:48

jvera701
Scratcher
Registered: 2009-09-05
Posts: 1

How do you put gravity in a game?

I need to put gravity in a game, but I dont know how to do it.

Offline

 

#2 2009-09-05 21:03:10

celloguy123
Scratcher
Registered: 2009-01-15
Posts: 100+

Re: How do you put gravity in a game?

<when green flag clicked>
<if> <not> <touching[ edge >>
<point in direction( down )>
<move( 10 )steps>
<end>

Last edited by celloguy123 (2009-09-05 21:06:10)


http://internetometer.com/image/33068.png

Offline

 

#3 2009-09-05 21:12:13

pinochio
Scratcher
Registered: 2009-03-19
Posts: 1000+

Re: How do you put gravity in a game?

celloguy123 wrote:

<when green flag clicked>
<if> <not> <touching[ edge >>
<point in direction( down )>
<move( 10 )steps>
<end>

hmm not necissarily


Flat Out G

Offline

 

#4 2009-09-06 06:38:28

floatingmagictree
Scratcher
Registered: 2008-10-21
Posts: 1000+

Re: How do you put gravity in a game?

Yeah, that's not how to do it celloguy.

Demosthenes put up a really good tutorial, if you want to see it, then click here!

Last edited by floatingmagictree (2009-09-06 06:38:42)

Offline

 

#5 2009-09-07 10:09:10

Mike16112
Scratcher
Registered: 2007-06-09
Posts: 100+

Re: How do you put gravity in a game?

Try this

<when green flag clicked>
<forever if><  <not><touching[ Edge  >>
<change{ gravity }by( -0.1
<end>

<when green flag clicked>
<forever if><touching[ edge
<set{ gravity }to( 0
<end>

<when green flag clicked>
<forever>
<change y by( <{ gravity }>
<end>

http://img802.mytextgraphics.com/flamewordmaker/2009/09/07/987b6297cfa7e48782e620ed11185fb1.gif
http://img80.imageshack.us/img80/198/mybanner4aa508f1f12ac.png

Last edited by Mike16112 (2009-09-07 10:16:50)


The programmer has a nap. HOLD OUT! PROGRAMMER!

Offline

 

#6 2009-09-07 10:14:31

Mike16112
Scratcher
Registered: 2007-06-09
Posts: 100+

Re: How do you put gravity in a game?

celloguy123 wrote:

<when green flag clicked>
<if> <not> <touching[ edge >>
<point in direction( down )>
<move( 10 )steps>
<end>

I don't think that would work well. I know because I've been on scratch for over 3 years

http://img802.mytextgraphics.com/flamewordmaker/2009/09/07/987b6297cfa7e48782e620ed11185fb1.gif
http://img80.imageshack.us/img80/198/mybanner4aa508f1f12ac.png


The programmer has a nap. HOLD OUT! PROGRAMMER!

Offline

 

#7 2009-09-09 15:07:16

nevit
Scratcher
Registered: 2009-08-04
Posts: 34

Re: How do you put gravity in a game?

This is the gravity way I know. http://scratch.mit.edu/projects/nevit/676476

Offline

 

Board footer