User Tag List

Results 1 to 8 of 8

Thread: Changing counter decimals during play

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    hcem's Avatar
    Join Date
    Nov 2012
    Posts
    146
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Changing counter decimals during play

    A question:

    Is it possible to define how many decimals a counter should display during runtime? Like you can display the floating number without decimals only in certain circumstances, but the value always remains a float.

    This would be useful for incremental games like the one I'm working on.

  2. #2
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,591
    Mentioned
    218 Post(s)
    Tagged
    3 Thread(s)
    The properties of the counter object contain options for this.

    You can't change them at runtime though.

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    hcem's Avatar
    Join Date
    Nov 2012
    Posts
    146
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    ok I should think a workaround then

    thanks anyway for the quick reply!

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    hcem's Avatar
    Join Date
    Nov 2012
    Posts
    146
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Hi All,

    Only solution I could find was using two counters for every occassion (integer and floating in properties). It's not ideal.

    I attached an mfa explaining the problem. Anybody have any ideas?

    int double.mfa

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2010
    Posts
    188
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    This uses one counter and a value. The counter is floating point, at the moment it counts upwards and adds a random floating point value.
    Under 1000 I use the expression editor to convert the float into an integer as it's transferred to the counter.
    Over 1000 it's transferred to the counter as a float with 2 decimal points.
    int doubleFix.mfa

  6. #6
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    hcem's Avatar
    Join Date
    Nov 2012
    Posts
    146
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Hi JohnArtbox thanks a lot for the solution.

    The issue I have is if the counter goes over 1000 and then decreases back to under 1000 (like a game currency), it will still have two digits of decimals which I don't want.

    However I need the fixed decimals over 1000 as units like K, M, B etc. are used, as the project is an incremental game.

  7. #7
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2010
    Posts
    188
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hcem View Post
    Hi JohnArtbox thanks a lot for the solution.

    The issue I have is if the counter goes over 1000 and then decreases back to under 1000 (like a game currency), it will still have two digits of decimals which I don't want.

    However I need the fixed decimals over 1000 as units like K, M, B etc. are used, as the project is an incremental game.
    Easy fix, uncheck the floating point options on the counter properties and it works.int doubleFixNew.mfa

  8. #8
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    hcem's Avatar
    Join Date
    Nov 2012
    Posts
    146
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Hello thanks I will try to improve on it !

Similar Threads

  1. BUG (Beta 257.17) Counter unable to display decimals
    By mobichan in forum Android Export Module Version 2.0
    Replies: 1
    Last Post: 2nd May 2013, 09:33 AM
  2. [bug] COUNTER (number of decimals)
    By StingRay in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 9th April 2013, 12:27 PM
  3. decimals usable in "Counter" extension?
    By Oreo in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 4th August 2010, 07:18 PM
  4. Changing a Counter Color
    By Shmoo in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 17th January 2007, 03:21 PM
  5. help with counter and decimals
    By mikec in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 12th December 2006, 08:49 AM

Posting Permissions

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