Problem with Custom Score Font
So I have a custom font system for my score (using the TShirtbooth method, but the digits are spawned dynamically instead of all being laid out at the beginning). It works perfectly except that the 1 image should be less wide than the other numbers for it to look right. To fix this, I set up a rule in the score digit actor that says
"when self.image = 1, change self.size.width to 16. Otherwise, change self.size.width to 20"
This causes strange behavior, however. When the score is 1, the 1 changes its width to 16 as it should. When it gets to 10, the 1 changes as it should and the 0 remains at 20, as it should. But as soon as the score reaches 11, the SECOND 1 in the 11 changes width to 16, but the FIRST also changes to 20 for some reason!! The first 1 then remains at width 20 all the way through score 19, but the second 1 changes its width to 16 (as it should) when the score reaches 21, 31, 41, etc.
The same thing happens when score reaches 100. The 1 in 100 correctly changes to 16, but when it reaches 101, the SECOND 1 changes to 16 but the FIRST changes back to 20.
Is this just a bug? Anybody have a better rule for changing the width that is consistent?
Comments
Best thing to do is to make all your font sprites the same size 32x32 for eg.
Darren.