User Tag List

Results 1 to 3 of 3

Thread: Percentages

  1. #1
    No Products Registered

    Join Date
    Jul 2006
    Location
    Versailles, MO, USA
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Percentages

    I'm wanting to calculate the percentage of two values and put them into a counter, but the formula I use only displays the end result counter as 0. The formula I'm using is as follows:

    Objects: Value 1 Counter, Value 2 Counter, End Result Counter

    Counter(Value 1) = Counter(Value 2) >>>>> Set Counter(End Result) to 100
    Counter(Value 1) < Counter(Value 2) >>>>> Set Counter(End Result) to Counter(Value 1) / Counter(Value 2) * 100

    Am I doing something wrong? Or can counters not display decimals?

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Percentages

    That is fine the way it is. Add an action like this: Start of Frame, set counter 1 and 2 to 0.00 (so it is a floating point number).

    The reason why it is 0 is because MMF2 rounds it after it divides, but before it multiplies by 100.

  3. #3
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Percentages

    You can also multiply before dividing to get the result correctly rounded to an integer.

Similar Threads

  1. Win/Loss Bars, Percentages Problems
    By Verbage in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 20th March 2012, 03:36 PM
  2. Place objects by percentages
    By wizlore in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 16th December 2011, 04:34 PM
  3. Percentages %
    By Hordolur in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 14th April 2009, 07:54 AM
  4. How do I do percentages?
    By Cossin in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 13th September 2008, 11:09 PM
  5. Percentages?
    By Joeyotrevor in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 7th June 2008, 08:18 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
  •