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

#1 2010-05-09 14:55:09

taylor18
Scratcher
Registered: 2010-05-09
Posts: 2

QUESTION!! - Using "forever," "forever if," "repeat until," etc.

I'm working on a game sort of, and I have my character bouncing up and down.  I have this in my scripts (after a broadcasting block - "when i receive..."):

[blocks]<forever>
<glide(0.5)secs to x sad -160) y: (-120)
<glide(2)secs to x sad -160) y: (20)
<end>[/blocks]

I have a start button that broadcasts "start" when it is clicked.  I want my character to stop bouncing and go to the opposite corner when "start" is broadcast.  For some reason, I can't figure out how to get him to stop bouncing!

Any help would be greatly appreciated  smile

Offline

 

#2 2010-05-09 15:00:19

meew0
Scratcher
Registered: 2010-02-22
Posts: 1000+

Re: QUESTION!! - Using "forever," "forever if," "repeat until," etc.

Make a variable "startBroadcasted" and use this script:

http://imgur.com/fkjaq.gif


http://i.imgur.com/mJV3j.pnghttp://i.imgur.com/HwWAX.pnghttp://i.imgur.com/sZ7Ui.pnghttp://i.imgur.com/0y6yh.pnghttp://i.imgur.com/nOC4l.png

Offline

 

#3 2010-05-09 18:08:53

taylor18
Scratcher
Registered: 2010-05-09
Posts: 2

Re: QUESTION!! - Using "forever," "forever if," "repeat until," etc.

Thanks so much! It worked  smile

Offline

 

#4 2010-05-10 14:33:48

DaGamez
Scratcher
Registered: 2010-04-18
Posts: 1000+

Re: QUESTION!! - Using "forever," "forever if," "repeat until," etc.

[blocks]<forever>
<glide(0.5)secs to x sad x position) y: (-120)
<glide(2)secs to x sad x position) y: (20)
<end>[/blocks]


http://scratchhtmlviewer.net23.net/image.php?project=1229757&amp;user=DaGamez

Offline

 

Board footer