I am making a pong game and I want to make a digital numbered score board. Could someone please explain to me how to do this?! Thanks
Offline
Hello, and welcome to the forums!
This is achieved using stamping -- I trust that you've heard of it before? Anyway, you'll need a costume for each number (0-9 in that order) with the same width, and this script:
set [counter v] to (1) repeat (length of (yournumbervariable)) switch to costume ((item (counter) of (yournumbervariable)) + (1)) stamp change x by (width) //The width of the costume. change [counter v] by (1) endHope this helps!
Last edited by Paddle2See (2012-08-01 09:10:04)
Offline
BirdByte wrote:
Hello, and welcome to the forums!
This is achieved using stamping -- I trust that you've heard of it before? Anyway, you'll need a costume for each number (0-9 in that order) with the same width, and this script:set [counter v] to (1) repeat (length of [yournumbervariable v]) switch to costume ((item (counter) of (yournumbervariable)) + (1)) stamp change x by (width) //The width of the costume. change [counter v] by (1) endHope this helps!
Two things:
1). Instead of having the costumes 0-9 in order, you could have 1-9 and then 0 as the last costume. This would eliminate the need for the
(( ) + (1))2. Changing x by the width of the costume would make the numbers crammed together. I recommend adding 2 to the width of the costume and changing x by that.
Last edited by ErnieParke (2012-08-01 09:06:58)
Offline