Changeable INI's?

This forum is currently in read-only mode.
  • Hi there people!

    So I am planning on making a level Editor and I actually have some ideas and ways to do so. While using the Editor the programm would simply save all data to an INI file.

    Now my Problem is, I don't know how I would be able to make it so that the Player can select one .INI from a list. I guess that the ListBox Object would be kind of handy for this, But I have actually no clue at all how I can make it so that once a User double clicks on one of the files that is shown in the ListBox, that the Game will then use the Info out of that particular .INI

    The Layout the player would go to would actually always be empty at first, but depending on what INI he choosed in the list, the Programm would take the data out of the INI and then build the level.

    Any Ideas how I can make .INI's selectable from a list? Any Help would be greatly appreciated (as always XD).

    Thanks people. This is doing my head in.

    Regards,

    Mr. Snooley

  • you could use the Common Dialog behavior.

  • Hey thanks I did this and was able to open a INI, but now it seems like I don't know how to make the Programm Set a new .INI File.

    <img src="http://i.imgur.com/iO5T3.png">

    I made it so that once someone selected a file, it's file Path will be copied to an Text.Object.

    Once the Text Object has the Path of the CommonDialog, set the .INI to: The Path of the File that has been chosen in the Common Dialog.

    I can't seem to figure out whats wrong, the Programm never adds Score Points to the .INI

    Regards,

    Mr. Snooley

  • Here's an example don't know if it's quite what you want though.

    http://dl.dropbox.com/u/1646976/Changable%20INI.zip

    Hope it helps

  • Hey thanks alot, I think I got it now!

    Only thing I don't understand in your .cap is: Global Value "File". What is it for and what does it do in the .cap?

    Thanks alot for the help!

    Regards,

    Mr. Snooley

  • Hey thanks alot, I think I got it now!

    Only thing I don't understand in your .cap is: Global Value "File". What is it for and what does it do in the .cap?

    Thanks alot for the help!

    Regards,

    Mr. Snooley

    Glad it helped.

    The global variable was simply for checking that I was getting the correct file path and that it changed accordingly. Sort of a debug thing. If it didn't change to the correct file path or didn't change at all I'd know there was an error somewhere in the events.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Okay, got it!

    Thanks people, one step closer to completion.

    Mr. Snooley

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)