M
Marasmusine
Guest
Hello, can anyone help me. The documentation on file functions and the "sandbox" don't give me enough detail to figure out how to do this. I'm am using GMS2 on Windows.
I want my program to read some .wav files (they aren't internal assets as I'd like the user to have the option of changing them), and I want them to be in the working directory (i.e. the same location as the executable)
When testing the program with the debugger, I can see the working directory is "C:\ProgramData\GameMakerStudio2\Cache\runtimes\runtime-2.1.3.189\windows"
I've made a folder there, \audio, and placed the audio files within (in subfolders)
I call a script (init_fx), passing the path as an argument to use as a mask for file_find_first. For example:
The debugger shows argument0 is "C:\ProgramData\GameMakerStudio2\Cache\runtimes\runtime-2.1.3.189\windows\AUDIO\percussion\*.*"
However, in init_fx
is a null string.
I don't know if:
I want my program to read some .wav files (they aren't internal assets as I'd like the user to have the option of changing them), and I want them to be in the working directory (i.e. the same location as the executable)
When testing the program with the debugger, I can see the working directory is "C:\ProgramData\GameMakerStudio2\Cache\runtimes\runtime-2.1.3.189\windows"
I've made a folder there, \audio, and placed the audio files within (in subfolders)
I call a script (init_fx), passing the path as an argument to use as a mask for file_find_first. For example:
Code:
init_fx(program_directory+"\\AUDIO\\percussion\\*.*")
However, in init_fx
Code:
file = file_find_first(argument0, 0)
I don't know if:
- The mask isn't correct (am I using wildchars correctly?)
- I'm prevented from finding the file because of the way the sandbox works?