INI files

For questions about using Classic.

Post » Thu Jan 21, 2010 4:53 am

Did you include your layout 1 sheet in your layout 2 sheet? Are you missing any objects in layout 2 that you need to run the events?
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Jan 21, 2010 4:57 am

How do you include sheet 1 into sheet 2 please.
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Thu Jan 21, 2010 5:05 am

Right-click in layout 2's event sheet, select "Include event sheet"

Then click on the include bar and pick the sheet for layout 1.

If you are going to be reusing your ini code over and over again, then you might want to make it in it's own event sheet. You can add "loose" event sheets in the project bar by right-clicking and selecting "Add new" on the event sheets icon. Then you can double-click them to edit them, and add them to any layout by including them, etc.

Oh, and to rename your event sheets you can click on the name twice, slowly. Same with anything else in the project tree.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Jan 21, 2010 3:41 pm

OK tried the include and it still does not work. I just am missing 1 little piece. Can anyone correct my mistake? The fist page can write the ini fine the second (race) page does not automatically write the 5000 score at the end.

(file below)

Note: start sounds removed for file size so there is a pause ay the beginning.

Thank you all for being so patience on this.
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Thu Jan 21, 2010 9:09 pm

You didn't put your .cap in the zip... you just put in your .persist file. I can't do anything with that :P
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Jan 21, 2010 9:12 pm

[quote="deadeye":2368zqpi]You didn't put your .cap in the zip... you just put in your .persist file. I can't do anything with that :P[/quote:2368zqpi]

lmao! now you've got something to shoot at with Towerfiends game :P
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Thu Jan 21, 2010 9:57 pm

noob LOL



Here is the cap file
http://www.box.net/shared/jajt30bpkr
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Thu Jan 21, 2010 10:55 pm

Here's an edit. Think it's what you want.

http://dl.dropbox.com/u/1646976/Test%20Track-edit.zip

You need to make the INI global first so then it could be used in all the Layouts. You were trying to read from "Groups" & "Items" that didn't exsist in the INI too - so even after making the INI global you'd still return 0 for some of your text.

Open your posted cap and the edited one side by side to see the changes you needed.

Hope that helps.
B
46
S
23
G
7
Posts: 459
Reputation: 6,763

Post » Fri Jan 22, 2010 1:09 am

Woot! Minor! Now going to look at exactly where I went wrong.

As a thank you please use my spiffy car graphic in your games (wiht credit).

Note to Minor and deadeye: if you ever need graphics just ask.
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Fri Jan 22, 2010 6:07 pm

After reviewing the changes I see that you added:

Always (every tick) INI.ItemValue("TimeTrial", "Time") & " by " & INI.ItemString("TimeTrial", "Name")

to my first layout page. So that is what I was missing?

I am confused why you need an always here. I can see Always point my gun at the mouse but why for data?

It was suggested that I have an Include Event Sheet: Layout 1 events on my layout 2, it now seem that I can remove that with no problem at all. Your fix still works.

So:
1. Why do I need the Always on layout 1
2. Is there a good write up some where about Always
3. When do you use "Include Event Sheet" this example doe not seem to need it
4. Is there a good tutorial on "Include Event Sheet" how and when to use them
5. Thanks to every for for helping me with this confusing issue.
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

PreviousNext

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests