Hi,
I need to generate scripts dynamically. This is the way I do it:
Game.ClearScriptCache();
Sleep(5);
var script = new File("volumes.script");
var volumes = new File("volumes.txt");
script.OpenAsText(2);
volumes.OpenAsText(1);
var line = volumes.ReadLine();
while(line != null){
script.WriteLine(line);
line = volumes.ReadLine();
}
script.Close();
volumes.Close();
Game.AttachScript("volumes.script");
It works when I run the game from the project manager but it doesn't work in the compiled version (the script is not executed).
Ï need this functionality because I need to let my co-worker change global variables (i.e. the volumes.txt file) at runtime via changing the file.
Is there a way of achieving this?
Thanks a lot for any suggestions!