Negative custom font numbers in scorekeeping

squirrel42squirrel42 Member, PRO Posts: 195
edited November -1 in Working with GS (Mac)
Hi
I have followed Tshirtbooth's scorekeeping with custom font numbers and have got I working fine. My problem is that my game requires that it displays both positive and negative as a running total. Is this possible using this technique?

Thanks in advance

Chris

Comments

  • JeffreyShimaneJeffreyShimane Member Posts: 372
    You can have a rule in the minus sign actor like this:

    If score < 0, change attribute self.color.alpha to 1
    Otherwise, change attribute self.color.alpha to 0

    That way, the minus sign would only show up when the score went below 0. This is assuming Tshirtbooth's scorekeeping with custom font numbers tutorial works on negative numbers like it does on positive numbers. I've never had to use negative scores in any of my games so I'm not sure if it does or not.

    - Jeff
  • squirrel42squirrel42 Member, PRO Posts: 195
    Thanks for the quick response.

    That sounds like a good idea to get a negative symbol to pop up. Unfortunately the problem is that if I have three digits ie 002 as a score, then if 3 is subtracted the score will goes to 999, so in this instance a negative symbol alone wouldn't work

    Chris
  • old_kipperold_kipper Member Posts: 1,420
    Use an offset in the numbers that is different to the displayed numbers then you can go negative in the display. Just start the hidden score with the positive offset and perhaps set the negative To display red or make actor for neg appear when under the value
    Edit.... I am wrong ..... You will have to add a negative set of rule for display that invert the counting system I think... It's been long day....
    Hope that sorts it. Kipper
  • squirrel42squirrel42 Member, PRO Posts: 195
    I am sure you are right, can you/someone expand on this as I am a newbie.
    Thanks
    Chris
  • devjohnsondevjohnson Member Posts: 94
    You could also just make the custom font a red color if it goes negative or something
  • micksolomicksolo Member Posts: 264
    if you had 3 numbers and your score was 002 (2) wouldn't the score go to -1 when 3 was subtracted? Why is it going to 999?

    The simplest solution was posted above, just have a "-" image which is turned on when score < 0
Sign In or Register to comment.