Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » I need a text generator for a game and I do not know how to do it- please help!!
- sbaker05
-
2 posts
I need a text generator for a game and I do not know how to do it- please help!!
Hi. I am remixing a game, and would like to show how many times you have died at the end of the game using a text generator. (It would be nice to not have to make 500+ sprites for a number!) I could use a variable, but I would prefer to do something that looks better. It would be great if someone could give me instructions on how to do it. I have not shared the game yet, so I have no link, nor do I want to share it yet, but I do not know how to make a text generator, and would really like to know.
In the end, I would like something for my game that says “You died __ times!” or something like that.
Thanks!
sbaker05
In the end, I would like something for my game that says “You died __ times!” or something like that.
Thanks!
sbaker05
- levtey
-
100+ posts
I need a text generator for a game and I do not know how to do it- please help!!
Have an unseen variable that helps you get the visual interpretation.
And each costume is a number.
Last edited by levtey (April 24, 2014 01:20:26)
- GCGCGC
-
100+ posts
I need a text generator for a game and I do not know how to do it- please help!!
I think sbaker meant a death counter, not a game over message.
Anyway, if you want a sprite to say the number of deaths, simply keep track of the deaths using a variable, then at the end trigger a script:
Edit: gah my browser's mangling the scratch blocks
When I receive (end game)
Say/think: Join (You have died) *another join* (death counter) ( times.)
Anyway, if you want a sprite to say the number of deaths, simply keep track of the deaths using a variable, then at the end trigger a script:
Edit: gah my browser's mangling the scratch blocks
When I receive (end game)
Say/think: Join (You have died) *another join* (death counter) ( times.)
Last edited by GCGCGC (April 24, 2014 02:44:22)
- sbaker05
-
2 posts
I need a text generator for a game and I do not know how to do it- please help!!
I made it as a variable from what GCGCGC said. It works great! Actually, I had used that type of method in the past, with another program that I made. Thank you for reminding me about that, but I still would like to know how to make a full text generator without a var, list, text, or thought. Thank you!
- levtey
-
100+ posts
I need a text generator for a game and I do not know how to do it- please help!!
But I think that sbaker doesn't want a variable or speech as it's designed on Scratch, he wants a bunch of numbers he can use, but not a ton of costumes. I think sbaker meant a death counter, not a game over message.
Anyway, if you want a sprite to say the number of deaths, simply keep track of the deaths using a variable, then at the end trigger a script:
Edit: gah my browser's mangling the scratch blocks
When I receive (end game)
Say/think: Join (You have died) *another join* (death counter) ( times.)
- GCGCGC
-
100+ posts
I need a text generator for a game and I do not know how to do it- please help!!
Heh, repeatedly reinterpreting what he said. 
Well, if you don't want costumes or bubbles…there are a few scripts that “draw” out the actual words or numbers, usually in another font.
They basically scan each letter/number and actually draw it with the pen.
Like this: http://scratch.mit.edu/projects/18107436/
Or create your own size/font with this: http://scratch.mit.edu/projects/18965500/
Just copypaste.
Also, if you don't want to make costumes because you expect the deaths to be in the hundreds (are you sadistic?
), you can make a seperate sprite for each digi.
Like:
if (costume number of *units digit* =10)
switch to costume 1
etc.

Well, if you don't want costumes or bubbles…there are a few scripts that “draw” out the actual words or numbers, usually in another font.
They basically scan each letter/number and actually draw it with the pen.
Like this: http://scratch.mit.edu/projects/18107436/
Or create your own size/font with this: http://scratch.mit.edu/projects/18965500/
Just copypaste.
Also, if you don't want to make costumes because you expect the deaths to be in the hundreds (are you sadistic?

Like:
if (costume number of *units digit* =10)
switch to costume 1
etc.
Last edited by GCGCGC (April 24, 2014 14:15:03)
- Arhionvar
-
37 posts
I need a text generator for a game and I do not know how to do it- please help!!
I have some code you can use… Basically, you make however many sprites you want and have 10 costumes for each: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. I used the code in my scoring system for my game I made it as a variable from what GCGCGC said. It works great! Actually, I had used that type of method in the past, with another program that I made. Thank you for reminding me about that, but I still would like to know how to make a full text generator without a var, list, text, or thought. Thank you!Spin! and for my game Simon if you want the code.
- Kenichi10B
-
74 posts
I need a text generator for a game and I do not know how to do it- please help!!
Here's a link (Works with capital letters, numbers, and special symbols): http://scratch.mit.edu/projects/20985716/
- Discussion Forums
- » Help with Scripts
-
» I need a text generator for a game and I do not know how to do it- please help!!