If you want a better script, you'll have to be more specific.
when gf clicked set [y velocity v] to (0) forever change [y velocity v] by ((-1)*(strength of gravity)) change y by (y velocity)
Offline
This project explains it fairly easily:
http://scratch.mit.edu/projects/archmage/72848
or, if you don't like that one, try this one:
http://scratch.mit.edu/projects/Paddle2SeeFixIt/681997
Offline
http://scratch.mit.edu/forums/viewtopic … 8#p1117338 is for a more complicated version of gravity. There are some other scripts in the thread as well.
Offline
To let an object fall, just loop "change y by" -n statement.
when gf clicked forever change y by [3] end
Offline
naiad_diana wrote:
To let an object fall, just loop "change y by" -n statement.
when gf clicked forever change y by [3] end
It doesn't work as gravity script.
This script works to show a sprite going down at constant velocity.
When you want to add gravity the velocity have to be increased by an acceleration.
I mean, the y position wouldn't change by the same rate.
Bye
Offline