Changeable INI's?

For questions about using Classic.

Post » Tue Jul 27, 2010 3:38 am

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
B
3
G
2
Posts: 67
Reputation: 809

Post » Tue Jul 27, 2010 6:07 am

you could use the Common Dialog behavior. :)
B
3
S
2
G
2
Posts: 136
Reputation: 1,347

Post » Tue Jul 27, 2010 2:38 pm

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.



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
B
3
G
2
Posts: 67
Reputation: 809

Post » Tue Jul 27, 2010 3:08 pm

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
B
46
S
23
G
7
Posts: 459
Reputation: 6,763

Post » Tue Jul 27, 2010 10:12 pm

Hey thanks alot, I think I got it now! :D

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
B
3
G
2
Posts: 67
Reputation: 809

Post » Tue Jul 27, 2010 10:23 pm

[quote="Mr. Snooley":2arlbhlb]Hey thanks alot, I think I got it now! :D

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[/quote:2arlbhlb]

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.
B
46
S
23
G
7
Posts: 459
Reputation: 6,763

Post » Tue Jul 27, 2010 10:25 pm

Okay, got it!

Thanks people, one step closer to completion. :D

Mr. Snooley
B
3
G
2
Posts: 67
Reputation: 809


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests