I managed to create a TXT file inside the game folder, now I need a script to add to a conditional branch to make that TXT file read and if the file contains the text within the conditional branch.
Thanks.
TXT file creation code:
Code:
const path = require ('path');
const base = path.dirname (process.mainModule.filename);
const fs = require ('fs');
const fileText = "text";
fs.writeFileSync (base + '/test.txt', fileText);