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

#1 2012-09-29 16:40:19

DragonLoverGirl
Scratcher
Registered: 2012-05-12
Posts: 7

Gravity Help PLEASE!

I've been needing a way to make gravity! PLease help!
I need a really simple way if that's possible because i'm sort of new to scratch.

Offline

 

#2 2012-09-29 17:00:31

dankill51
Scratcher
Registered: 2012-01-22
Posts: 85

Re: Gravity Help PLEASE!

Try this
[scratchblocks]
when gf clicked
set [y velocity] to (0)
forever
if <(key [up arrow] pressed) and (touching color [])>
set [y velocity] to (10)
end
change y by (y velocity)
if <(touching color [])>
set (y velocity) to (1)
else
change (y velocity) by (-0.5)
end
end

Offline

 

#3 2012-09-29 17:01:14

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Gravity Help PLEASE!

dankill51 wrote:

Try this

when gf clicked
set [y velocit v] to (0)
forever
if <(key [up arrow v] pressed?) and (touching color [floor]?)>
set [y velocity v] to (10)
end
change y by (y velocity)
if (touching color [floor]?)
set [y velocity v] to (0)
else
change [y velocity v] by (-0.5)
end

Fixed and edited.

Last edited by ErnieParke (2012-09-29 17:19:33)


http://i46.tinypic.com/35ismmc.png

Offline

 

#4 2012-09-29 17:06:03

dankill51
Scratcher
Registered: 2012-01-22
Posts: 85

Re: Gravity Help PLEASE!

Oh thanks for fixing that lol

Offline

 

#5 2012-09-29 17:20:41

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Gravity Help PLEASE!

dankill51 wrote:

Oh thanks for fixing that lol

Your welcome. We all make mistakes once in awhile.


http://i46.tinypic.com/35ismmc.png

Offline

 

Board footer