yup. another one. you can put letters in the variable box ex. (set ammo to(hello))
Offline
JD_Wardrop wrote:
yup. another one. you can put letters in the variable box ex. (set ammo to(hello))
That is a feature. It's a string. Now you can set your variable to:
a number
a word
a phrase
a numbered phrase
a list (or just use the lists XD)
etc
Now you can set it to letters and have a sprite say:
<say[ <{ Hello World }> ]for( <{ Hello World }> )secs>
Offline
thats not what i mean. this is what i mean <set{ ammo }to( flat stanley ). you can type in letters in the variable box.
Offline
Offline
That's right. Scratch 1.3 lets you assign strings to variables and list entries.
There are, of course, some contexts where strings don't make any sense (as in the example of letting a sprite say something for 'aString' secs). In such cases the string is handled by Scratch as zero.
Being able to handle strings in Scratch is way cool, though. Now you can assemble words into sentences using a list, you can compare string variables using the "equals" block, and you can even broadcast string variables or switch to a costume / play a sound defined by a string variable!
Offline