User Tag List

Results 1 to 3 of 3

Thread: Is this a bug with counters?

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Gradius's Avatar
    Join Date
    Jul 2015
    Posts
    117
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Is this a bug with counters?

    Hi guys, I'm not sure if this is a bug or something I'm doing wrong so I'm posting here before bothering Clickteam with something that's possibly my own fault. OK, so the issue is that I want my counter to always have a fixed number of digits, five to be precise, so I've ticked the box in the counter properties "Fixed number of digits" and set it to 5. Up to a point everything seems to work just fine, I can link the counter to a global value, I can add or subtract from the global value and the counter acts in the expected way, displaying the global value (while still keeping 5 digits, with 0's on the left when applicable).

    However, the problem seems to arise when I use any sort of more complex calculations, for example, I want to subtract 10% from the global value, and yes, the counter displays this action BUT it reduces the number of digits also. So, let's say the global value is originally set at 200, the counter will display 00200, If I subtract 100, the counter will show 00100, this works fine, BUT if I then subtract 10% the counter would show 90, when it should show 00090.

    Please let me know if it's something I've got wrong, I'm still learning so I didn't want to report a bug unless I'm sure it is one, cheers guys

    mfa is attached.
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    I think you have to preserve integer format,
    (floor() preserves floating format, while int() converts in integer)
    seems to work:

    CounterBug02.mfa

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Gradius's Avatar
    Join Date
    Jul 2015
    Posts
    117
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Haha! Thank you Schrodinger, you're a genius! That seems to fix the issue, cheers mate!

Similar Threads

  1. HP counters
    By Aikikame in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 8th October 2009, 12:30 PM
  2. Counters
    By BigBaboo in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 27th September 2007, 11:35 PM
  3. Counters
    By Guitaristinmakin in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 29th August 2007, 04:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •