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

#1 2013-03-22 14:59:50

PPJB
New Scratcher
Registered: 2012-04-09
Posts: 24

Names in a Say/Think block…

Hi.

How can make that a previously inputed name or text appear later in a text/think bubble? (As in the M.A.S.H. project)

Offline

 

#2 2013-03-22 15:54:04

Oli_Dron
New Scratcher
Registered: 2012-12-13
Posts: 14

Re: Names in a Say/Think block…

when gf clicked
<If (answer) = [..........]>
say [............] for (30) seconds
end

Offline

 

#3 2013-03-22 16:01:07

Oli_Dron
New Scratcher
Registered: 2012-12-13
Posts: 14

Re: Names in a Say/Think block…

whoops

[scratchblocks]
when gf clicked
if <(answer) = [......]>
  say [...............]
end
[/scratchblock

Offline

 

#4 2013-03-22 16:05:15

Oli_Dron
New Scratcher
Registered: 2012-12-13
Posts: 14

Re: Names in a Say/Think block…

come on


[scratchblocks]
when gf clicked
if <(answer) = [......]>
  say [...............]
end
[/scratchblock]

Offline

 

#5 2013-03-22 16:07:05

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Names in a Say/Think block…

Alternatively

when gf clicked
ask [ name? ] and wait
set [name v] to (answer)
other code if applicable
say (name)

Offline

 

#6 2013-03-22 16:08:52

Oli_Dron
New Scratcher
Registered: 2012-12-13
Posts: 14

Re: Names in a Say/Think block…

screw this

when gf clicked
if <(answer) = [......]>
  say [...............]
end

Offline

 

#7 2013-03-22 19:32:31

NoxSpooth
Scratcher
Registered: 2013-03-19
Posts: 500+

Re: Names in a Say/Think block…

Oil_Dron, watch your language.

As for the script...

when gf clicked
ask [What's your name?] and wait
say (join [Hello, ] (join (answer) [.]))


http://i1244.photobucket.com/albums/gg572/BLU_Spy/Best-Cry-Ever_zps3b2b857a.gif Goodbye, 1.4... We'll miss you...

Offline

 

#8 2013-03-22 19:38:32

NoxSpooth
Scratcher
Registered: 2013-03-19
Posts: 500+

Re: Names in a Say/Think block…

Or you can also use variables.

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


http://i1244.photobucket.com/albums/gg572/BLU_Spy/Best-Cry-Ever_zps3b2b857a.gif Goodbye, 1.4... We'll miss you...

Offline

 

#9 2013-04-08 22:06:41

PPJB
New Scratcher
Registered: 2012-04-09
Posts: 24

Re: Names in a Say/Think block…

Thanks, I'm going to try all of these scripts.

But, they will work with numbers (scores)? Or I'm going to use another scripts with them?

Offline

 

#10 2013-04-09 15:52:34

NoxSpooth
Scratcher
Registered: 2013-03-19
Posts: 500+

Re: Names in a Say/Think block…

PPJB wrote:

Thanks, I'm going to try all of these scripts.

But, they will work with numbers (scores)? Or I'm going to use another scripts with them?

Sure they work! Just change the variable to a numerical value.


http://i1244.photobucket.com/albums/gg572/BLU_Spy/Best-Cry-Ever_zps3b2b857a.gif Goodbye, 1.4... We'll miss you...

Offline

 

#11 2013-04-09 16:03:45

topazdragonlord
Scratcher
Registered: 2013-02-22
Posts: 500+

Re: Names in a Say/Think block…

This is like the method I'm using for my unreleased game  big_smile


http://i45.tinypic.com/idumbk.png

Offline

 

#12 2013-04-11 16:30:55

mathfreak231
Scratcher
Registered: 2012-10-24
Posts: 80

Re: Names in a Say/Think block…

Oli_Dron wrote:

screw this

when gf clicked
if <(answer) = [......]>
  say [...............]
end

You can use the "edit" button, you know.


~This sig is false~
I'm on teh wiki!

Offline

 

Board footer