INI files

This forum is currently in read-only mode.
From the Asset Store
Human/Character Base Pixel Art Sprites in various poses (nearly 100 files)
  • You didn't put your .cap in the zip... you just put in your .persist file. I can't do anything with that

    lmao! now you've got something to shoot at with Towerfiends game

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • noob LOL

    Here is the cap file

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

    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.

  • 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.

  • 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.


    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.

  • 1. Don't really need the always I put it there when I was trying to find what was up. It would be better if you moved the action in the always event to the last action in the "on RestHighScore clicked" event. Otherwise on the start of your layout you would show the best score loaded from your INI then, if you clicked reset it would reset the score in the INI file but not update the score that was shown onscreen.

    2. Not really but what ever is in the event runs every tick. Best example is the one you used in your 2nd Layout.


    +RaceTime - Set text to global('Seconds')

    That way whenever the score is updated so is the text displaying it.

    3. Use "Include Event Sheet" if you ever find yourself having to put the exact same code in each layout. For example you split your layouts into tracks for your racing game, so layout 2 is track 1, layout 3 is track 2, layout 4 is track 3 etc. You're going to need the controls for the car added to each event sheet for each layout/track. So put anything related to car controls in an event sheet, include it in all your track layouts and you don't have to add controls to each and every track/layout you make.

    4. See above.

    5. No problem

    Hope that helps. My explaining is crap to say the least. Maybe someone will translate the above into English .

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