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

#1 2010-02-15 21:14:59

svyamana
Scratcher
Registered: 2009-01-11
Posts: 19

Going up? Or down?

I think that there should be a block that tells if a sprite is moving up or down.

If sprite1= moving up
switch to costume jump

Offline

 

#2 2010-02-15 21:30:13

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: Going up? Or down?

Well, you can do that with scripts:
Make a variable (n), and set it to the y position.
Then, wait a specified amount of time, and test for (yPos-n).
If this is positive, then the sprite has moved up. If it is negative, then it has moved down.
In fact, the value tells how much it has moved up or down!


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

#3 2010-02-16 15:52:50

svyamana
Scratcher
Registered: 2009-01-11
Posts: 19

Re: Going up? Or down?

<when green flag clicked>
<say[ Thank you ]for( 3 )secs>
<turn cw( 360 )degrees>
<play sound[ yipee]

Offline

 

Board footer