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

#1 2008-11-14 20:31:28

hellokitty-96
Scratcher
Registered: 2008-10-09
Posts: 15

Receive then Say

How do you make it when a sprite receives another sprite they would say something.
Like if the sprite recieves a sprite (food) they would say yum. Or switch costumes.


Thanks

Jocelyn

Offline

 

#2 2008-11-15 04:17:16

MyRedNeptune
Community Moderator
Registered: 2007-05-07
Posts: 1000+

Re: Receive then Say

You mean if the sprites touch? Use the <touching [Sprite]> block.

<forever if><touching[ Food Sprite
<say[ Yum ]for( ... )secs>
<end>


http://i52.tinypic.com/5es7t0.png I know what you're thinking! "Neptune! Get rid of those filthy advertisements and give us back the Zarathustra siggy, you horrible person!" Well, don't worry about it, the Zara siggy will be back soon, new and improved! ^^ Meanwhile, just do what the sig tells you to. >.>

Offline

 

#3 2008-11-15 04:19:34

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Receive then Say

[blocks]
<when green flag clicked>
<forever if><touching[ Food Sprite
<say[ Yum! ]for( 2 )secs>
<wait until><<  <not> <touching[ Food Sprite >>
<end>
[/blocks]

Hey!  MyRedNeptune beat me to the post!  And we have almost the same answer - lol.  I put a Wait on mine so it would only say Yum once, even if the food was left on the sprite for a long time.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

Board footer