User Tag List

Results 1 to 7 of 7

Thread: Stumped with INI

  1. #1
    No Products Registered

    Join Date
    Jun 2007
    Posts
    323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Stumped with INI

    I've been trying to figure out array/INI/save game extenstions, and w/e else to save game data for about a month now, and I'm getting absolutely nowhere. If anybody can pleeease take just a little time and guide me through this, I would appreciate it more than you can beleive, and put your requested name in special thanks in credits. Saving data is crucial in this game and I need to figure it out to complete the engine. I know for some of you this is probably extremely simple so sorry for making a big deal but you know.. All I really need is for someone to write down the events I would need to use to save the values of items collected, save current alterable values for certain objects, and then How to load them. I also found an expression for giving the savefile.INI its own directory, will I need to use that?

  2. #2
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,825
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Re: Stumped with INI

    There is a whole tutorial on this on the tutorials page

    http://www.clickteam.com/eng/resources/engine_save&load.zip
    One warning is this is pretty indepth.

    There is also a brillant INI tutorial on the tutorial page also
    You can check out all the tutorials be visiting the link in the side bar ------------------------------------->

  3. #3
    No Products Registered

    Join Date
    Jul 2006
    Posts
    2,289
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Stumped with INI

    Using a special directory to save a file is optional and really about organization.

    The INI is much simpler than it might appear. You set a filename, (best to do at start of frame) and then indicate a group and item name. Have you seen the structure of an INI file?

    myfile.ini

    [mygroupname]
    alval1=30
    altval2=499
    altstring1=Dangerous Creature


    We should have some ini examples somewhere in the forum already. Have you tried a search? I am pretty sure there is one that comes with the MMF2 examples.

    Also, even though it may look a bit advanced, the INI++ can save and load all the values/strings of an object which could be easier and faster in the long run.

    We can create an example for you if the search or the MMF2 CD don't make it clear.

  4. #4
    No Products Registered

    Join Date
    Jun 2007
    Posts
    323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Stumped with INI

    sigh. I have seen all of those tutorials, I just read and tried them again, and still have nothing. I think it's because im trying to do more or less than what they are showing me I can't figure it out haha. Im getting closer, but still not enough. Man, if you say you could make an example for me that would be unbeleivable. This is exactly what im trying to do, just for reference. I have a player, a Missle Item, a missle Icon (just goes on the menu to show that you collected it) and a counter to tell how many missles player has.

    Player collides with Item : Destroy item and place it's Icon on the menu / Add 5 to missle counter

    (summed up) When player is overlapping save point and presses enter : Save position of player, missle Icon, and Value of misslecounter.

    Then you restart the game, goto the Loadgame menu, choose which file, and load it.

    It seems so simple I dont see why I cant get it right lol.

  5. #5
    No Products Registered

    Join Date
    Jun 2007
    Posts
    323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Stumped with INI

    I've almost got it figured out now. Only 1 problem so far. How do you retreive an INI value from a specific item? I use

    when player selects file to load : Set missile counter to INI(item) (so i set current amount of missiles to what they where saved as)

    and then this pops up: ItemValue( "Ini", >Item name<)

    When I goto type the item name i get syntax error, and the text is black. I have messed around with it a little bit but I keep getting the same thing.

    So basically All i can load is the value from the INI itself. Since I added a new item to save and its value is 1 when acquired, I only get 1 missile when I load the game. What am I supposed to do to just get the missile value?

  6. #6
    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: Stumped with INI

    I think that you're on the correct track - you need to enclose the item name in double quotes, as in ItemValue("Ini", "Missiles"). This will give you whatever's on the right hand side of the = sign under the "Missiles" item.

  7. #7
    No Products Registered

    Join Date
    Jun 2007
    Posts
    323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Stumped with INI

    Awesome, I think I finally got the hang of it. Thats definately a load off lol. Thanks for help everyone you guys extremely supportive. Good forum :P

Similar Threads

  1. I'm stumped with a custom movement...
    By KLiK-iT in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 26th June 2013, 09:49 PM
  2. Stumped...
    By Earl in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 18th July 2012, 06:08 AM
  3. Insight into wrong individual problem? STUMPED!
    By alxmrg in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 19th September 2010, 07:24 PM
  4. Help! I'm stumped!
    By musteval in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 8th September 2008, 01:39 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
  •