Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Make sprite say something by typing "say (VARIABLE)"
- TheKilledCreeper
-
Scratcher
3 posts
Make sprite say something by typing "say (VARIABLE)"
The title pretty much says it… If I type: “say hello” the parent sprite will say “hello”, and if I enter anything that doesn't start with “say ” nothing will happen. Can anyone help me out please?
- deck26
-
Scratcher
1000+ posts
Make sprite say something by typing "say (VARIABLE)"
Share what you have please so we can help more effectively.
- TheKilledCreeper
-
Scratcher
3 posts
Make sprite say something by typing "say (VARIABLE)"
I don't know what you mean.. 

- deck26
-
Scratcher
1000+ posts
Make sprite say something by typing "say (VARIABLE)"
I don't know what you mean..You haven't identified the project. Is it the one you have shared? If so where is the script that you want help with.
Basically if you want help it's easier if we can see what you currently have, especially if the description is unclear.
By the way, you can't stop people remixing. If you share a project people can remix it; that's how Scratch is.
- TheKilledCreeper
-
Scratcher
3 posts
Make sprite say something by typing "say (VARIABLE)"
Oh, well the project is shared and is also the only one I have.
The script that I need help with is inside Sprite 11.
In Sprite 11 you'll see an ask command followed up by multiple if commands.
I hope this is enough information, if not, I can tell you more…
The script that I need help with is inside Sprite 11.
In Sprite 11 you'll see an ask command followed up by multiple if commands.
I hope this is enough information, if not, I can tell you more…
Last edited by TheKilledCreeper (Sept. 29, 2016 10:40:57)
- deck26
-
Scratcher
1000+ posts
Make sprite say something by typing "say (VARIABLE)"
Oh, well the project is shared and is also the only one I have.I can't see how that fits with your original post. If I hit the z key and type either of the two bits of text you're checking for it does what you've told it to do. What does that have to do with ‘say’?
The script that I need help with is inside Sprite 11.
In Sprite 11 you'll see an ask command followed up by multiple if commands.
I hope this is enough information, if not, I can tell you more…
- deck26
-
Scratcher
1000+ posts
Make sprite say something by typing "say (VARIABLE)"
Ah, I think I understand now.
You want the player to be able to type ‘say level’ and the project will use the ‘say’ block to tell the player the value of the ‘level’ variable. So you want that added as an extra option in sprite 11.
It's not immediately obvious how you'd do that - it may be possible with some work around but I'll need to think about it.
You want the player to be able to type ‘say level’ and the project will use the ‘say’ block to tell the player the value of the ‘level’ variable. So you want that added as an extra option in sprite 11.
It's not immediately obvious how you'd do that - it may be possible with some work around but I'll need to think about it.
- mil6464
-
Scratcher
11 posts
Make sprite say something by typing "say (VARIABLE)"
Hi I have a question, I'm making a game with a money variable and I want my sprite to say something or do something when you try to purchase something but you don't have enough money. I have tried doing “If COINS = -20 then say…..” but it has not worked. Do you know how to do it?
- qrcool
-
Scratcher
1000+ posts
Make sprite say something by typing "say (VARIABLE)"
Hi I have a question, I'm making a game with a money variable and I want my sprite to say something or do something when you try to purchase something but you don't have enough money. I have tried doing “If COINS = -20 then say…..” but it has not worked. Do you know how to do it?This is an old topic. Please don't necropost.
- -Qlec-
-
Scratcher
100+ posts
Make sprite say something by typing "say (VARIABLE)"
This isn't that hard to fix. Just copy and paste what's in the quotation marks: “”. Yes, it takes up no space so you can't select it. See, it's impossible, yet possible.
- mil6464
-
Scratcher
11 posts
Make sprite say something by typing "say (VARIABLE)"
What does necropost mean? I'm only 9 years old i really don't know the answer to this question please someone help me!
- mil6464
-
Scratcher
11 posts
Make sprite say something by typing "say (VARIABLE)"
I looked up what necropost means. What you said wasn't very nice.
- CatGuyAnimates
-
Scratcher
100+ posts
Make sprite say something by typing "say (VARIABLE)"
What does necropost mean? I'm only 9 years old i really don't know the answer to this question please someone help me!Necroposting is when you post on an old, irrelevant, or solved topic. When posting on topics, if you have checked that no one else has already posted what your asking, it is better to create a new topic than an old topic. To answer your question, use the following code:
...
if <(money) < [put the price here]> then
say [You don't have enough!]
else
code for buying:: events
end
...
- mil6464
-
Scratcher
11 posts
Make sprite say something by typing "say (VARIABLE)"
Thank you so much!!! I won't necropost anymore.


- mil6464
-
Scratcher
11 posts
Make sprite say something by typing "say (VARIABLE)"
What is code for buying?
- deck26
-
Scratcher
1000+ posts
Make sprite say something by typing "say (VARIABLE)"
It doesn't work?So create your own new topic please and explain the problem there.
- briosa30
-
Scratcher
68 posts
Make sprite say something by typing "say (VARIABLE)"
say (join [hello ] [(variable)])
it obviously dosen't work with variables, but it does with lists
say (join [hello ] (item (1) of [list v] :: list)
Last edited by briosa30 (May 13, 2020 11:15:05)
- deck26
-
Scratcher
1000+ posts
Make sprite say something by typing "say (VARIABLE)"
Yes it does work with variables.say (join [hello ] [(variable)])
it obviously dosen't work with variables, but it does with listssay (join [hello ] (item (1) of [list v] :: list)
say (join [hello ](variable))
- Discussion Forums
- » Help with Scripts
-
» Make sprite say something by typing "say (VARIABLE)"






