User Tag List

Results 1 to 6 of 6

Thread: Picking Winner by Comparing Scores

  1. #1
    Clicker Multimedia Fusion 2
    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)
    ZycroNeXuS's Avatar
    Join Date
    Dec 2013
    Location
    Everywhere
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Picking Winner by Comparing Scores

    My game has 4 players. The goal of the game is to collect as many "Pellets" as you can before the time is up. Whoever has the most pellets wins.

    I've got almost everything working, but I do have one roadblock, a pretty massive one too. I can't figure out how to compare the 4 counter values so that whoever gets the most can actually be acknowledged as the winner. Does anyone have any ideas as to how I can compare them all to see which one is the highest?

    Thanks in advance,
    Ethan

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid 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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    There's quite a few ways to do that.

    Here's a few I can think of:
    - Compare every counter with each other
    - Give the counters a qualifier and loop through them to find the one with the highest value
    - Compare each score to Max(Score1, Score2, Score3, Score4)
    - Add each counter's value to a sorted list object

    The last option is probably the easiest. Just remember to wrap the value in str$() to convert it to string before adding to the list. The bottom line will be he highest one. If there is a possibility for two or more equal scores this method should make it easy to deal with that as well.

  3. #3
    Clicker Multimedia Fusion 2
    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)
    ZycroNeXuS's Avatar
    Join Date
    Dec 2013
    Location
    Everywhere
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you give me a clearer idea of what to do for the sorted list option? I've made the object and made it sorted, but I've never used it before and don't really know what I'm doing with it.

    Thanks in advance,
    Ethan

  4. #4
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    944
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yeah definitely do the list object option it will for sure work.

    All you do is have a list object somewhere outside the frame's field of view and then-

    Add line (lstObject) Str$(score1)
    Add line (lstObject) Str$(score2)
    Add line (lstObject) Str$(score3)
    Add line (lstObject) Str$(score4)

    And the beauty is that these objects automatically sort / alphabetize their contents so you just pull the high score from there

  5. #5
    Clicker Multimedia Fusion 2
    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)
    ZycroNeXuS's Avatar
    Join Date
    Dec 2013
    Location
    Everywhere
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can't find the right condition to use your suggestion, Del_Duio, though I have figured out the event itself. The list doesn't seem to sort itself either, just contain the score. Any ideas?

  6. #6
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    944
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    It might be something you have to set up on the List Object during the design phase, though it's been a while it for sure works (I used this method to get the 5 high scores for my Outlaw, Drunk & the Whore game). I really thought it auto-sorted by default though.

    Did you try adding the scores to the list object as if they were strings? Ex. Str$(score1) and etc?

Similar Threads

  1. Is comparing values faster than comparing strings?
    By Erkabubben in forum Fusion 2.5
    Replies: 9
    Last Post: 13th January 2015, 11:36 AM
  2. Winner Team Logic
    By Blood_Wist in forum File Archive
    Replies: 0
    Last Post: 9th September 2010, 12:36 PM
  3. need help with picking an object
    By method72 in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 11th September 2009, 01:31 AM
  4. Need some help with groups and picking...
    By Hristos in forum File Archive
    Replies: 3
    Last Post: 5th April 2008, 10:11 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
  •