Game Development Community

Pause Game while window not active?

by amaranthia · in Torque Game Builder · 05/16/2008 (2:47 pm) · 2 replies

Another little question about TGB 1.7... Is there a command that will pause the game while the game window is not at the top of the z order?

#1
05/16/2008 (3:28 pm)
I think there is a window lost focus callback where you can call your own pause function from.

function onWindowFocusChange(%isFocused)
{
    if (!%isFocused)
        pauseGame();
    else
        unpauseGame();
}
#2
05/21/2008 (8:59 am)
Thank you!!! :D