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

#1 2013-04-12 19:35:02

emilywhite840
New Scratcher
Registered: 2013-04-12
Posts: 1

Help With my Sprites Saying stuff

I've watched projects where sprites react depending on what the person answers if the sprite is acting a question. They also can say the answer in their speech. I don't know how to do either of those things. Please respond. Thanks.

Offline

 

#2 2013-04-12 20:34:41

7734f
Scratcher
Registered: 2010-12-23
Posts: 500+

Re: Help With my Sprites Saying stuff

emilywhite840 wrote:

I've watched projects where sprites react depending on what the person answers if the sprite is acting a question. They also can say the answer in their speech. I don't know how to do either of those things. Please respond. Thanks.

For a sprite asking and responding:

when gf clicked
ask [Do  you like pie?] and wait
forever
 if <(answer) = [yes]>
  say [So do I!] for (2) secs
 end
 if <(answer) = [no]>
  say [I bet you like some other dessert] for (2) secs
 end
For a sprite using the answer in a statement:

when gf clicked
say (join [Hello,] (answer)) for (2) secs
Hope that helped!

With regards,

~7734f


http://internetometer.com/image/38992.png   http://i37.tinypic.com/2qixx6c.png

Offline

 

#3 2013-04-12 21:53:30

joshuaho
Scratcher
Registered: 2012-08-20
Posts: 100+

Re: Help With my Sprites Saying stuff

emilywhite840 wrote:

I've watched projects where sprites react depending on what the person answers if the sprite is acting a question. They also can say the answer in their speech. I don't know how to do either of those things. Please respond. Thanks.

You can do this:

when gf clicked
if <touching sprite 3>
say[Yay!]


Did you know that you can go to space and see Mars by clicking here?

Offline

 

Board footer