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

#1 2011-08-27 22:16:00

19580
New Scratcher
Registered: 2011-07-17
Posts: 1

How to use the answer to a question in speech

Okay,
Using the blue 'ask _____ and wait'. If I ask what's your name and they reply with say Sarah. How can I later use that name when the sprite is speaking? I want them to say Hello, Sarah or whatever name...

Any ideas thanks

Offline

 

#2 2011-08-28 13:42:49

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: How to use the answer to a question in speech

[say[(join[hello, ][(answer)])]]

(use the join block under the operators tab and the blue answer block under the sensing tab.

This isn't an advanced question though, in future please post things like this in the "all about Scratch" section!  smile


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#3 2011-08-28 13:48:04

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: How to use the answer to a question in speech

Also, if you want to store it for later use, just use

set variable to (answer).

Offline

 

#4 2011-08-28 14:16:54

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: How to use the answer to a question in speech

LS97 wrote:

Also, if you want to store it for later use, just use

set variable to (answer).

+1

<set{ username   }to( <answer> )>

Last edited by MoreGamesNow (2011-08-28 14:17:07)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

Board footer