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

#1 2012-08-21 14:23:51

HabaDB
Scratcher
Registered: 2012-08-17
Posts: 14

Help?

Let's say your name is X. A sprite asks you "What's your name?". When you type in your name, how do you get the sprites to keep referring to you as X after you type it in? I need to know! Thanks!  smile   smile   smile

Offline

 

#2 2012-08-21 14:39:28

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: Help?

You use the "answer" reporter. If you are going to ask another question, set a variable to "answer". Then, you can use the "join" reporter in the "say" block.  smile


http://i50.tinypic.com/312u714.jpg

Offline

 

#3 2012-08-21 14:39:59

GlennWright
Scratcher
Registered: 2012-08-15
Posts: 100+

Re: Help?

What do you mean? If you want the characters to say your name, do this!

when green flag clicked
        say "What is your name?" for 2 secs
        ask "What's your name?" and wait
        set "Name" to (answer)
        say (join "Hello " (Name)) for 2 secs
    end


Hello everyone!
http://img5.imageshack.us/img5/465/dot.png

Offline

 

#4 2012-08-21 15:21:11

GlennWright
Scratcher
Registered: 2012-08-15
Posts: 100+

Re: Help?

BirdByte wrote:

You use the "answer" reporter. If you are going to ask another question, set a variable to "answer". Then, you can use the "join" reporter in the "say" block.  smile

Beat me to it by seconds!  big_smile


Hello everyone!
http://img5.imageshack.us/img5/465/dot.png

Offline

 

#5 2012-08-21 15:26:19

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: Help?

GlennWright wrote:

when gf clicked
        ask [What's your name?] and wait
        set [Name v] to (answer)
        say (join [Hello ] (Name)) for (2) secs

i turned it into scratchblocks


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

#6 2012-08-21 15:27:47

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Help?

GlennWright wrote:

What do you mean? If you want the characters to say your name, do this!

when green flag clicked
say [What is your name?] for (2) secs
ask [What's your name?] and wait
set [Name v] to (answer)
say (join (join [Hello ] (Name)) [!]) for (2) secs

I put it in scratch blocks for you. I also did a thing or two.  wink

Last edited by ErnieParke (2012-08-21 15:29:59)


http://i46.tinypic.com/35ismmc.png

Offline

 

#7 2012-08-21 15:37:40

HabaDB
Scratcher
Registered: 2012-08-17
Posts: 14

Re: Help?

Wes64 wrote:

GlennWright wrote:

when gf clicked
        ask [What's your name?] and wait
        set [Name v] to (answer)
        say (join [Hello ] (Name)) for (2) secs

i turned it into scratchblocks

Thanks!

Offline

 

#8 2012-08-22 12:31:03

GlennWright
Scratcher
Registered: 2012-08-15
Posts: 100+

Re: Help?

Wes64 wrote:

GlennWright wrote:

when gf clicked
        ask [What's your name?] and wait
        set [Name v] to (answer)
        say (join [Hello ] (Name)) for (2) secs

i turned it into scratchblocks

Thanks! I payed a visit to your review forum thread and submitted my game!


Hello everyone!
http://img5.imageshack.us/img5/465/dot.png

Offline

 

Board footer