Game Development Community

Play Level and recompiling scripts

by bigbob · in Torque Game Builder · 05/12/2006 (6:47 pm) · 3 replies

Couldn't find this with a search: is there a way to force scripts to reload/recompile when I press the "Play Level" button in the level editor (beta 3)? Or is this a limitation in the way the level editor is run meaning I have to close and reload tgb every time I make a script change? Thanks.

About the author

Recent Threads


#1
05/12/2006 (7:41 pm)
You could exec it in the console, ie:
exec("~/pathtoscript/script.cs");

That works for me in TGE, in any case. It picks up the fact that I edited the script and compiles a new .dso file.
#2
05/13/2006 (9:13 am)
Excellent, thanks!
#3
05/13/2006 (9:29 am)
In a similar fashion to what was already mentioned: If you add in the exec statement into the startGame function (in game.cs), it would force the script to reload with any changes that were made.