Having troubles with 'Set INI file' action.

This forum is currently in read-only mode.
From the Asset Store
Convert multiple Excel files into JSON files and import them into construct3.
  • So I began using Construct several days ago after a long absence from it and I've come to the completion of my minigame which has a very simple High score system. I'm using INI to store the high score (can't it be encrypted to disallow editing?) and so far everything runs smoothly, except for a couple of things.

    Problem One:

    When I extract the game to EXE, the game is still trying to read the INI file from the previous location.

    It might be hard to explain so I'll just give an example:

    Action -

      > Start of layout INI: Set INI file to "Data\HS.ini"

    This, from what I know, reads the INI file from that location.

    .Cap is in: C:\Cap\game.cap

    INI is in: C:\Cap\Data\HS.ini

    .EXE is in: C:\game\game.exe

    Copied INI is in: C:\Game\Data\HS.ini

    When I run the EXE, it's still reading from "C:\Cap\Data\HS.ini" despite only putting "Data\HS.ini" in the action. To make sure I changed the values of Copied HS.ini and deleted the original. This lead to the values coming up as 0.

    Is the INI action capable of reading from the folder the .EXE file is in instead of an absolute path?

    Problem Two:

    Not really a problem, but when exporting to .EXE and creating an install, is it possible to allow it to install more than the executable? Or would I have to use an external install creator?

    Any help appreciated!

  • Try using the system expression appath.

  • Try using the system expression appath.

    After half an hour trying to comprehend what your post meant, it finally worked! Searching for appath brought up nothing, but appPath did

    Seems like my minigame is 95% complete. Now I just need to clean up a few sprites before I post it

    Thank you for your help. Greatly appreciated.

  • Oops, sorry bout that, guess we know why I'm not a programmer.

  • It comes up straight away as a system expression with description if you search the wiki

  • Oops, sorry bout that, guess we know why I'm not a programmer.

    No need to be sorry, because of you I resolved me issue. Thanks again.

    It comes up straight away as a system expression with description if you search the wiki

    I did search for it after finding out it was called 'appPath', not 'appath', but then I had to find out what a system expression was! A quick search of the forums helped me with that.

    I think I'll stick with INI for the high score, even though it can be easily edited with a text editor.

    Now since the first problem is resolved, are there any answers for the second? I'm thinking there isn't since Construct is in beta stage afterall. Seems to be a feature better suited for later.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, I think you'll have to use an external install creator program. I'm not sure how customisable the built in one is.

  • Yeah, I think you'll have to use an external install creator program. I'm not sure how customisable the built in one is.

    Ah well, a zipped file is really all I need. Thanks.

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