User Tag List

Results 1 to 3 of 3

Thread: Break apart numbers by places

  1. #1
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Oct 2006
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Break apart numbers by places

    So here's the deal. I have a game that has a font that I love, however, due to the aesthetic, (A soccer scoreboard) I need to break my score into hundreds, tens, and ones all with separate counters (The font I'm using isn't fixed width).

    What's my best option here? Converting to a string then breaking it apart? (With Len? I think) or is there an easy math based way to accomplish this without the number to string back to number conversion?

    Thank you for your help!

  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,558
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)
    The string method is the best method I ever found (though that certainly doesn't mean there isn't a better method out there!).

    If it helps, here's how I did it:


  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    Assuming your score is a max of 3 digits, you have 3 counters ( one for each digit ) and a variable set to your score called varScore, simply do this:

    +Always
    - set counter0 to (varScore mod 10)
    - set counter10 to (varScore / 10)
    - set counter100 to (varScore / 100)

Similar Threads

  1. Random Numbers and expiring the result numbers.
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 26th April 2013, 04:11 PM
  2. Decimal places?
    By ChrisBurrows in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 23rd October 2011, 08:07 PM
  3. Where has the extension DL places gone?
    By Tiny in forum Extension Development
    Replies: 4
    Last Post: 29th June 2011, 05:10 PM
  4. Too many Edit places in MMF2
    By OldGuy in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 5th October 2008, 03:10 PM
  5. Decimal Places
    By SharpS in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 18th December 2007, 01:06 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
  •