Game Development Community

Restart() function?

by Cinder Games · in Torque Game Engine · 04/27/2006 (9:06 pm) · 4 replies

I'd like to have a function called restart i can call via the console or anything else for that matter... that will simply quit torque, and restart it.

Anyone know how to go about creating this function?

#1
05/15/2006 (3:02 pm)
Just wanted to try and bump this. I do alot of testing that requires a quit restart, perhaps someone can give me some advice.
#2
05/15/2006 (3:24 pm)
What are you changing that requires a full restart of the program? Many script changes can be tested by re-exec'ing files at runtime, and most everything can be reloaded by exiting and restarting a mission...
#3
05/15/2006 (3:29 pm)
Mainly it's just scripts. restarting a missing doesn't recompile all the scripts.

Hmmm so to get it to recompile the files, i'd just need to exec it again?
I can probably do that.
#4
05/15/2006 (3:34 pm)
Not restarting the mission, but actually quitting to the menu and then loading it up again. And for things that don't require datablocks or scenarios to be reset, I just have a function like
function qe(){
exec("./scriptimworkingon.cs");
exec("./otherscriptimworkingon.cs");
}
And then I just have to pop up the console and type go "qe" -> enter (it will append the "();" automatically even).