Including Files

S

Spooticus

Guest
I'm trying to have my game access files which i have included with the executable. For the life of me i cannot figure out how to find the directory that the executable is in (program_directory doesn't return what i'm looking for). Not sure if im just being silly or if this is another gamemaker thing. Any help?
 
C

CedSharp

Guest
Based on the file system section of the manual, you should be using "working_directory", not "program_directory".
Working Directory will search through the saved files (the sandbox) and if the file is not there, it will search throught the bundle files (this is where included files are located).
So the variable you want is "working_directory" :)


NOTE:
The note at the bottom of the above screenshot clearly says you don't even need to use that variable. If the included file is called "test.txt" then you can simply use "test.txt" for the path and gamemaker will automatically use working_directory.

So, just directly use the file's name, don't try to find the directory :D
 
S

Spooticus

Guest
Based on the file system section of the manual, you should be using "working_directory", not "program_directory".
Working Directory will search through the saved files (the sandbox) and if the file is not there, it will search throught the bundle files (this is where included files are located).
So the variable you want is "working_directory" :)


NOTE:
The note at the bottom of the above screenshot clearly says you don't even need to use that variable. If the included file is called "test.txt" then you can simply use "test.txt" for the path and gamemaker will automatically use working_directory.

So, just directly use the file's name, don't try to find the directory :D
Oops! I happen to have been reading the file as an INI but it wasn't actually formatted correctly. I'm a doof sorry lol. Thank you for you help anyways!
 
Top