User Tag List

Results 1 to 4 of 4

Thread: Can global values be passed through counters?

  1. #1
    Clicker Multimedia Fusion 2iOS Export Module

    Join Date
    Apr 2009
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can global values be passed through counters?

    I've been working on my percentage counter recently which takes the total number of stars a played has earned after playing compared to the number of stars they could have earned during the amount of levels they completed.

    Initially I had the expression worked out as such to display in a counter....

    Percentage = Global Value P/(score("Player 1")*3)*100

    Global Value P is the stars that they have earned.
    The players score reflects the level they reached and 3 stars are available per level so the bracketed section is working out the maximum number of theatrical stars the player could have earned.

    The percentage is to work out how much of the total stars the player earned. However this formula fails me every time. I have reason to believe it is the global value that is making it fail. After all, I am now testing and cannot even get a global value to show in a counter. How can I feed these global value in to the formula and get myself a working percentage formula?

    Thanks in advance! Swift response would make me very grateful. I'm in a hurry.

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    It sounds like just the usual issue of MMF2 rounding down floats. Replace the "3" with a "3.0"

  3. #3
    Clicker Multimedia Fusion 2iOS Export Module

    Join Date
    Apr 2009
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by MuddyMole View Post
    It sounds like just the usual issue of MMF2 rounding down floats. Replace the "3" with a "3.0"
    That didn't seem to work. It did make a difference. It gave a percentage into the thousands though.

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    In that case you've gone wrong somewhere else, and are setting either the global value or score to the wrong number - check your code. It has nothing to do with using global values.

    You can use the MMF2 debugger to check the values while the game is running.

Similar Threads

  1. Global values vs Counters -speed
    By Blizna in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 8th August 2014, 01:04 PM
  2. Global Values & Alterable Values with same names
    By Gustav in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 7th November 2012, 06:15 PM
  3. Problem with counters and values
    By StingRay in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 7th May 2012, 12:02 PM
  4. Negative values in a List, and Global Values
    By aidmm in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th January 2007, 06:08 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
  •