Included Files Directory

Heavybrush

Member
Hi, I'm trying to understand the path of the included files directory
I have to read a txt file included manually in game maker but I have to read it by code

Code:
if(directory_exists(working_directory + "\I need this path of the included files directory\"))
also here I'm not sure about the working directory, because it could be also the program directory, I don't know
I need to take a txt from included files, in the directory of the project and in the future directory of the game
 
Last edited:
Uhm (at least in gm8) when you import files manually, you can choose a function that is called something like: store in temporary directory.
I did this with some sprites and sounds etc.
Then you can call them with:

temp_directory+"\sample.png"

Or similar (I'm on my phone right now and don't know it by memory).
This is how I did it.
Temp directory:
https://www.google.de/url?sa=t&source=web&rct=j&url=https://docs.yoyogames.com/source/dadiospice/002_reference/file%20handling/temp_directory.html&ved=0ahUKEwiFveWlyPPQAhWKWCwKHYmQBCYQFggbMAA&usg=AFQjCNFr3BqE6yb8UHIEL8thkFqxDhM86g

The working directory is the directory your game / working file is included.

Working directory:

https://www.google.de/url?sa=t&source=web&rct=j&url=https://docs.yoyogames.com/source/dadiospice/002_reference/file%20handling/working_directory.html&ved=0ahUKEwiFveWlyPPQAhWKWCwKHYmQBCYQFggqMAI&usg=AFQjCNHasAH7nPzYeeaXzbEPppu3QxZgjg

Also when you simply import files to the included game file, you might call them with the file name only. at least I think so.
 
Top