User Tag List

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

Thread: Ini file help

  1. #1
    No Products Registered

    Join Date
    Mar 2011
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ini file help

    Im sorry for bringing this up again but ini files are probably the most confusing thing I've ever delt with in this software.

    Currently I already know how to set the file path group value,and the other things,but after that I can't do what I want.All I want to do is have a simple level selection screen,and the levels unlock as the player progresses through the levels.

    Ive tried countless times and read/watched a variety of tutorials,but none of them seem to work for me.Im trying for an event that says once the player starts the frame add 1 to a value and when they click on the icon in the lvl selection frame it loads the frame,but i have no idea how to set it up.

    Any help would be appreciated.


  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Paul_Boland's Avatar
    Join Date
    Jun 2006
    Location
    Waterford, Ireland.
    Posts
    2,739
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ini file help

    Every time the player completes a level, add 1 to the levels value in the INI file. So, for example, the player completes level 2 which gives you access to level 3 so set the path to the INI file, set the group, set the item to levels and set its value to 3.

    Always
    > Set current file to AppDrive$ + AppDir$ + "Game.ini"
    > Set Group to "Data"
    > Set Item to "Level"
    > Set value to 3

    Now, on your level select screen, let's say you have 10 levels. At the start of the level read in the Levels value from the INI file into a counter, Levels Counter.


    Always
    > Set current file to AppDrive$ + AppDir$ + "Game.ini"
    > Set Group to "Data"
    > Set Item to "Level"
    > Set Levels Counter to value of INI file

    Now the counter = 3. Now it's just a matter of setting up your level select based on the number in the counter.
    KnightTrek Productions
    http://www.knighttrek.com

  3. #3
    No Products Registered

    Join Date
    Mar 2011
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ini file help

    Thanks i think i get it now.All i needed was a step by step explanation like your post.

  4. #4
    No Products Registered

    Join Date
    Mar 2011
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ini file help



    Now, on your level select screen, let's say you have 10 levels. At the start of the level read in the Levels value from the INI file into a counter, Levels Counter.
    :mad: Alright i now understand everything except this part.

    Also when i put in the file name do i include the pluses or not?




  5. #5
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ini file help

    You basically click retrieve data from object, then pick the INI object and then pick "Get value (group, item)" and then you should be presented with something like this that you fill in.

    GroupItemValue( "Ini", >Group name<, >Item name<)

    You include the pluses only if you are adding on to the string... like AppDrive$ + AppDir$ + Globalstringletssaytheloadedgamepath + "\" + "Game.ini"

    Additionally you can just do this as an example... "Gamefolder\Game.ini"

  6. #6
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Paul_Boland's Avatar
    Join Date
    Jun 2006
    Location
    Waterford, Ireland.
    Posts
    2,739
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ini file help

    The pluses are needed if you want your INI file to be within your program folder. AppDrive$ + AppDir$ + "Game.ini" refers to an INI file within the programs own folder, called Game.ini.

    As for the other part, once you have read in the number from the INI file and have it stored in Levels Counter, then on your level select screen you just allow the user to pick levels based on the value in the counter.

    So for example, as above, Levels Counter = 3.

    PlayLevel1 clicked
    + Levels Counter >= 1
    >Jump to Frame [Level1]

    PlayLevel2 clicked
    + Levels Counter >= 2
    >Jump to Frame [Level2]

    PlayLevel3 clicked
    + Levels Counter >= 3
    >Jump to Frame [Level3]

    PlayLevel4 clicked
    + Levels Counter >= 4
    >Jump to Frame [Level4]

    ...

    This code will allow the player to play levels 1, 2 and 3 but not level 4 because the Levels Counter = 3.
    KnightTrek Productions
    http://www.knighttrek.com

  7. #7
    No Products Registered

    Join Date
    Mar 2011
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ini file help


    Always
    > Set current file to AppDrive$ + AppDir$ + "Game.ini"
    > Set Group to "Data"
    > Set Item to "Level"
    > Set value to 3

    Now for this event do i put it in each individual level or somewhere else?

  8. #8
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ini file help

    You set it to the current level for each level.

  9. #9
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Paul_Boland's Avatar
    Join Date
    Jun 2006
    Location
    Waterford, Ireland.
    Posts
    2,739
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ini file help

    Like Corlen said, you can set this code at the start of every level, or put it at the end of a previous level. This will update the value of the levels completed.
    KnightTrek Productions
    http://www.knighttrek.com

  10. #10
    No Products Registered

    Join Date
    Mar 2011
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ini file help

    As for the other part, once you have read in the number from the INI file and have it stored in Levels Counter, then on your level select screen you just allow the user to pick levels based on the value in the counter.

    Im sorry but can you explain this part better,i dont really understand.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. LOAD/SAVE clone file in ARRAY FILE
    By daniele in forum Multimedia Fusion 2 - Technical Support
    Replies: 20
    Last Post: 24th July 2015, 01:47 AM
  2. Create folder with File object on Program File
    By Vantales in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 13th April 2013, 11:13 AM
  3. Delete external file AND check if file exists
    By Renatos in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 16th August 2011, 03:39 PM
  4. Cannot open include file: 'windows.h': Nosuch file
    By JasonDarby in forum Extension Development
    Replies: 12
    Last Post: 11th February 2007, 11:12 PM
  5. File object - file selector saving issues
    By Gary_Molton in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 13th November 2006, 08:25 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
  •