User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Updating high scores in an ini+

  1. #1
    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)

    Updating high scores in an ini+

    I was wondering if anyone could offer an example of how to update an ini+ with a new high score. I have a max of 5 scores that are stored, and I need to figure out where the current score places in the existing scores and then how to remove the last score in the item list.

    I know I've done this in the past (with help) but my original file has been lost. T_T

    Any help is appreciated,

    mobichan

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Updating high scores in an ini+

    Add them to a list, add the score to the appropriate spot, delet the last score from the list, then save it again.
    Working as fast as I can on Fusion 3

  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)

    Re: Updating high scores in an ini+

    I am asking how to determine the appropriate spot. I just have no clue how to check against all of the existing scores. Or is there a way to add it to a list, sort the list and then drop off the last entry?

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Updating high scores in an ini+

    Easiest way is to fastloop and compare the fastloop current score to the player score, and just insert the player score above the first score lower than it and stop the loop. Remember to make sure to add it to the end of the list if the lowest score is higher than the player score, so that it will get deleted and not the other score (so it doesn't shrink the list)
    Working as fast as I can on Fusion 3

  5. #5
    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)

    Re: Updating high scores in an ini+

    So basically, copy the ini list one item at a time to a temp string and compare if the current score is larger. If not, then move to the next item in the ini and compare again. When a comparison returns that the current score is lower, then insert the current score one position previous to the current one?

    I understand the basic philosophy at play here, I just am confused as to how to do it in the event editor.

  6. #6
    Clicker Multimedia Fusion 2 Developer
    Jax's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    702
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Updating high scores in an ini+

    If you are using Ini++ you can just find the item with the smallest value and delete that. I would make an example but I don't have Ini++ v1.0 installed for some reason.

    Tell me if you need an example though.

  7. #7
    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)

    Re: Updating high scores in an ini+

    an example would be great. If you can do it in v1.5, that is fine too. I really just want to see the events so I know the approach.

    Edit: So, I found a way to determine the position I need to insert my new score. But I am a bit unsure of how to shift all the lower scores down in the item list and then delete the last item.

  8. #8
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Updating high scores in an ini+

    That was the whole point of using the list object, so that you could simply replace the values in the INI with the ones in the list...
    Working as fast as I can on Fusion 3

  9. #9
    Clicker Multimedia Fusion 2 Developer
    Jax's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    702
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Updating high scores in an ini+

    Here you go, using Ini++ v1.0.

    This *does not* allow multiple scores from somebody with the same name, which is sometimes exactly what you want and sometimes the opposite of what you want. To allow it, you need to use settings to do with 'multiple items with same name', or you can make your own way around it.

    View MFA

  10. #10
    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)

    Re: Updating high scores in an ini+

    Thanks guys. I'll take a look.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. High scores and swf
    By Drcooper in forum SWF/Flash Export Module Version 2.0
    Replies: 14
    Last Post: 15th June 2011, 09:50 PM
  2. High Scores
    By Mantis in forum SWF/Flash Export Module Version 2.0
    Replies: 1
    Last Post: 12th December 2010, 12:41 AM
  3. Problem Updating Scores
    By Jack_Mcphee in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 28th October 2008, 07:20 AM
  4. Help With High Scores
    By IIMikII in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 5th October 2008, 10:13 PM
  5. High Scores
    By Rick in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 27th December 2006, 01:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •