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

#1 2010-11-14 14:50:37

smartears
Scratcher
Registered: 2010-01-25
Posts: 8

Sprite recognizing a mouse click

I am trying to set up a listening game where an animal asks for some food ( apple, banana, etc). I then want the child listening to pick the correct fruit. The requests are recorded sentences and are played randomly from a list. ( e.g. I want an apple, I want a banana etc.)

How do I get each sprite to recognize when a child has clicked it? I only see the control block of "when sprite is clicked" but I don't know how to connect it to the correct request being played.

Can anyone help me?

Thanks!!!

Offline

 

#2 2010-11-14 15:05:49

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: Sprite recognizing a mouse click

I think you need:
when "apple" is clicked
broadcast "apple"

and you can have your stage:
when i receive "apple"
if "fruit"="apple"
|broadcast "correct"
-else-----------
|broadcast "wrong"

and do that for all your fruits.

Offline

 

#3 2010-11-16 07:30:46

smartears
Scratcher
Registered: 2010-01-25
Posts: 8

Re: Sprite recognizing a mouse click

Thanks Kaybee -- I'll try that!

Offline

 

Board footer