deducting game score
![app-etite](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
Hi,
I followed tshirtbooths cookbook tutorial on how to use your own fonts for game scores etc and it all works fine.
But I have 4 zeros displayed when the game starts and have a rule saying when actor hits an object then take away minus 10 points but the the score is then displaying 9950, obviously looping back around, I know it works easily if you just use display text. Any way to have it display -50 or -0050 or something with my custom font??
Thanks
I followed tshirtbooths cookbook tutorial on how to use your own fonts for game scores etc and it all works fine.
But I have 4 zeros displayed when the game starts and have a rule saying when actor hits an object then take away minus 10 points but the the score is then displaying 9950, obviously looping back around, I know it works easily if you just use display text. Any way to have it display -50 or -0050 or something with my custom font??
Thanks
Comments
Anybody ever done this?
If so, maybe something like this would work. Create a graphic of the dash/minus sign using the font you used for the numbers. Create an actor with this graphic, change the opacity to 0, and place it next to the numbers of your score. Use the absolute expression to convert your score from a negative number to a positive number (or you could change your subtraction to addition when hit so that your score goes up instead of down). Create a rule in the actor you just created that checks if the score is equal to 0. If it's equal to 0, change the opacity attribute to 0, otherwise, change the opacity attribute to 1. Basically, it should show the starting score (0000) but when the player gets hits, the score will go up but the dash/minus sign will appear before the number so it will appear as a negative score.
I don't think this method would work if your score could be either positive or negative though.
1) Create a graphic of the dash/minus sign using the font you used for the numbers.
2) Create an actor with this graphic and place it to the left of your score.
3) Create a rule in the actor you just created that checks if the score is less than 0. If it's less than 0, change the opacity attribute to 1, otherwise, change the opacity attribute to 0.
The minus sign should only appear when the score is less than 0 (a negative number). If it's equal to or greater than 0, it will be invisible.
Thanks
-appetitegames