N10do64 wrote:
IS there a way to make a variable be displayed in text? Such as "You killed [blank] aliens!"
--N
No but you could make a sprite to go over the variable.Example:
Sprite:
You Killed (Leave blank space to insert variable} alien!
Variable:
Put variable into blank sprite spot.
Hope this helps!
Offline
Actually you can.
First, you need to make a list. Once you've done that, make this script:
Say the variable was set to 5. The list would look like this:
I don't know what exactly you want to do with the text, but you could put it in a "say" block. Use this script:
<say[ <{ list }>[/blocks]
That makes this happen in the sprite:
It automatically puts spaces between the list items.
And you're done!
Offline
There is a way, by making a sprite with 10 costumes (0123456789).
Then you just have to make scripts to say each thing.
So, say you wanted to say a 3-digit number.
Just use a script like this:
You just divide the number by whatever the digit is (so if you wanted the thousands digit, you would divide it by 1000) and use the script there. You can also change the "change x by" if you're using different-sized fonts.
Last edited by coolstuff (2009-04-26 14:11:17)
Offline
hmnwilson wrote:
Actually you can.
First, you need to make a list. Once you've done that, make this script:
http://www.freeimagehosting.net/uploads/ab56871ae2.png
Say the variable was set to 5. The list would look like this:
http://www.freeimagehosting.net/uploads/e627bbfb8d.png
I don't know what exactly you want to do with the text, but you could put it in a "say" block. Use this script:
<say[ <{ list }>[/blocks]
That makes this happen in the sprite:
http://www.freeimagehosting.net/uploads/c4112e90d8.png
It automatically puts spaces between the list items.
And you're done!
Nice helping!
Offline