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

#1 2011-01-18 18:22:56

colemagoo
New Scratcher
Registered: 2010-10-15
Posts: 8

Size to Y movement

Hey there,

I'm making a bit of a game (Obviously). One thing I can't figure out is how to make the size of an object become smaller as it moves up a y axis.

Thanks,

- Cole

Offline

 

#2 2011-01-18 18:34:58

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: Size to Y movement

There are plenty of variants for doing this, but this is probably the easiest:
http://i55.tinypic.com/25aj6ew.gif

The +100 is the horizon line (the point your character vanishes from view for being too far away), change that and the <100 in the if/else to adjust your horizon line.  You don't need this if you want the horizon line to be exactly the center.

The /2 is the rate is grows/shrinks when moving up or down.  Make it higher to have a lower rate of change (the sprite usually will be smaller), make it lower (decimals like .5 work) to have a higher rate of change (usually the sprite will be larger).  You don't need this if you want it to be 1.

Last edited by Kileymeister (2011-01-18 18:35:45)


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

Board footer