User Tag List

Results 1 to 7 of 7

Thread: Saving and Loading: There must be a faster way...

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    redpandagames's Avatar
    Join Date
    Dec 2011
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Saving and Loading: There must be a faster way...

    So, I went through the tutorials on building the INI file. Do I really have to add one value at a time to the ini file?

    There must be a way to save all variables. Please tell me there is...

    Basically, I have 200 variables that I need to save.

    One more thing... What if the player doesn't have a C drive? Is it necessary to designate a path for the INI folder, or will it default based on the source code. Since Flash is cross platform, I don't see how a path could be designated outside of the root folder.

    Thanks in advance!

  2. #2
    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)
    Yes, if you give the INI a filename but no path (no need to set it in the event editor), then it will be saved wherever Flash puts its files.

    What values are you trying to save (alterable values of objects, values in a list...?) It's likely you'll be able to run a loop to save them without having to do all of them individually.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    oruga's Avatar
    Join Date
    Feb 2012
    Posts
    366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You don't need to specify a path, just leave the INI object default settings (just assign a name with no path).

    INI data has to be saved one by one but you can use loops to make this automatized and you can be able to save hundreds of entries with just a couple of events.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    redpandagames's Avatar
    Join Date
    Dec 2011
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, you guys are fast! I have a lot of global variables. How would I use a loop to automize that?

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    oruga's Avatar
    Join Date
    Feb 2012
    Posts
    366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use their order number as reference. Global Value(1) is global value A so in your loop you can use Global Value(LoopIndex("myLoop"))

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    redpandagames's Avatar
    Join Date
    Dec 2011
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by oruga View Post
    Use their order number as reference. Global Value(1) is global value A so in your loop you can use Global Value(LoopIndex("myLoop"))
    I'm sorry, are there steps on how to do this? I just don't seem to be able to get it quite right. I saw that Francoise posted something about this along time ago, but when I tried, I got a bunch of syntax errors.

    Mostly, I don't really understand how to use loops.

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    I would do

    + When you want to save your values
    - Start loop "Save" 26 times (if you have 26 variables)

    + On loop "Save"
    - INI Set value Global Value(LoopIndex("Save)) to item "val"+str$(LoopIndex("Save")) in group "MyValues" (the Set value - group - item action)

    To load the values back, start a loop the same way.

    + On loop "Load"
    -Set global value(LoopIndex("Load")) to GroupItemValue(INI, "MyValues", "val"+str$(LoopIndex("Load")))

    This should work...

Similar Threads

  1. iOS Saving and Loading
    By Coopman86 in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 22nd February 2012, 08:39 AM
  2. Saving and Loading on iOS
    By Bruto in forum iOS Export Module Version 2.0
    Replies: 15
    Last Post: 17th May 2011, 09:38 AM
  3. Saving and loading
    By FlyingDeath in forum The Games Factory 2 - Technical Support
    Replies: 0
    Last Post: 4th August 2008, 04:16 AM
  4. Saving/Loading
    By ToffeeandPebbles in forum The Games Factory 2 - Technical Support
    Replies: 10
    Last Post: 24th July 2007, 05:41 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
  •