User Tag List

Results 1 to 3 of 3

Thread: Comparing Global Values for a league table

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    May 2013
    0 Post(s)
    0 Thread(s)

    Comparing Global Values for a league table

    Hi all,
    I am trying to compare global values against 128 object to produce a league table

    Issue as below
    I have 128 "CPU" objects with 2 global values each
    Global value 1 is "Money earned"
    Global value 2 is "League Position"

    I need to order the "League position" by "Money earned" in descending order

    If its anything to do with loops then they confuse me no end so if you could explain like im 5 years old that would be grand

    Is this possible?


  2. #2
    Clickteam Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleInstall Creator Pro
    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)
    BartekB's Avatar
    Join Date
    Aug 2013
    5 Post(s)
    0 Thread(s)
    Hey, my solution uses a fast loop and a for each loop. If they confuse you I should first explain them here so my example makes sense

    A fast loop has two things for it:
    - The Name, it is what you refer to when you make On Loop condition
    - The number of loops, it is how many times every event with On Loop repeats

    Lets take this example:

    This example runs fast loop called "loop", repeating 10 times.
    Therefore, event 2 executes 10 times. Making 10 objects in total.

    They're very useful because fast loops execute instantly, it is like the little checkbox/action running the fast loop contains all events that start with "On loop".

    Now, there are "For Each Loops", they are very similar to fast loops but are Object related. They only have a name, no number of repeats.
    Instead, they repeat the code for every object that can execute the for each loop.

    This is extremely useful! Because all instances are separated from each other. Let's take this example with 10 objects:

    This example runs 10 times (the amount of objects in frame), so, you will see 10 new lines printed with 10 values.

    Now with fast loops and for each loops explained, my example combines both of them to create sorting. It is commented throughout: SortingByValue.mfa

    If this helped, great! If it hasn't and there's still something confusing about it, let me know and maybe I could try something else.
    - BartekB, a.k.a Uppernate
    Join the Click Converse Discord! -
    Dungeon Raiders! - Link soon™

  3. #3
    Clicker Fusion 2.5 (Steam)

    Join Date
    May 2013
    0 Post(s)
    0 Thread(s)
    BartekB - It is people like you in this community that convince me to keep trying to create stuff with Clickteam Fusion. This issue was a potential game breaker and you my friend have saved me a massive headache and about 16000 (literally) lines of code!

Similar Threads

  1. Comparing more than 2 global values
    By gondracorn in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 29th May 2016, 10:54 PM
  2. Is comparing values faster than comparing strings?
    By Erkabubben in forum Fusion 2.5
    Replies: 9
    Last Post: 13th January 2015, 11:36 AM
  3. comparing value of an object to a vale in an array table
    By brawltaunts22 in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 16th April 2012, 10:58 PM
  4. Comparing 2 global values question
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th January 2009, 04:23 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