Close event in torquescript
by vdlabs · in Torque Game Builder · 07/10/2012 (1:05 am) · 2 replies
Hello.
Sorry for my bad English. I work with TGB 1.7.6. Is any function(callback) in script that will be called when user close the game window (for example click on cross)? Thank you.
Sorry for my bad English. I work with TGB 1.7.6. Is any function(callback) in script that will be called when user close the game window (for example click on cross)? Thank you.
#2
07/11/2012 (12:16 am)
In TGB 1.7.6 this function called shutdownProject(). It works fine. Thank you very much Tim.
Torque 3D Owner Tim Scheiman
Ghost Ship Studios
The function is called onExit(), and it's in your main.cs file in your game directory.
In my build at least, it is called no matter what (click the red X, alt-f4, etc.). If that isn't the case out of the box, let me know... I'll dig up whatever I did to the source to make it happen. :)
-Tim