How do you pause the game?
by Kevin · in General Discussion · 04/11/2003 (8:52 pm) · 11 replies
hi, i have been trying to pause the game.
I tried to make changes in the engine code, inside main.cc
i used the setRunning method like
game->setRunning(false);
but whenever i do that the game just shut down.
is there any other way to set pause for the game?
thanks.
Kevin
I tried to make changes in the engine code, inside main.cc
i used the setRunning method like
game->setRunning(false);
but whenever i do that the game just shut down.
is there any other way to set pause for the game?
thanks.
Kevin
#3
And While would you advise against using that for Network Play?
Thanks,
Nooclles
04/26/2003 (11:45 am)
What Would u Recommend for Network Play?And While would you advise against using that for Network Play?
Thanks,
Nooclles
#4
04/26/2003 (12:19 pm)
As simple as the question and solution are, this is some very helpful info, something I would have never thought to ask (or maybe not have had the sense to ask).
#5
04/26/2003 (12:54 pm)
How many multiplayer network games do you know of that let you pause? It can cause problems with sync' and lost packets could leave a client still moving on their side.
#6
mostly all the rts games.
im sure it's not 100% realtime ..
but its close enuff.
Edit:
as well i'll mention Rage of Mages 3
which was a little character building game.
3/4 view multi player
and when it was paused (by the host)
you could sometimes see the other characters in your party do a slow slow move ..
so indeed thier solution was not perfect.
but it didnt bother me in the least whilst I played it..
heh what bothered me more was the ability to pause :)
04/26/2003 (1:13 pm)
lots ..mostly all the rts games.
im sure it's not 100% realtime ..
but its close enuff.
Edit:
as well i'll mention Rage of Mages 3
which was a little character building game.
3/4 view multi player
and when it was paused (by the host)
you could sometimes see the other characters in your party do a slow slow move ..
so indeed thier solution was not perfect.
but it didnt bother me in the least whilst I played it..
heh what bothered me more was the ability to pause :)
#7
after I enter
$timescale=0;
the engine doesnt seem to accept any more commands besides popping up the "quit" gui... so I can't set the timescale back to "1" again...
any ideas?
04/27/2003 (1:24 am)
Err,after I enter
$timescale=0;
the engine doesnt seem to accept any more commands besides popping up the "quit" gui... so I can't set the timescale back to "1" again...
any ideas?
#8
If I get it working, I'll post it.
EDIT: Spelling error.
04/15/2007 (2:41 pm)
You might have to go into script. Locate the exit function, and have it so that when you press escape, set $timescale=0. Then, press escape again to set it to 1. Try it out.If I get it working, I'll post it.
EDIT: Spelling error.
#9
04/15/2007 (2:52 pm)
The exit game function is in the default.bind.cs script. I had the same problem. I can't get the $timescale back to 1.
#10
function escapeFromGame()
{
if ( $Server::ServerType $= "SinglePlayer" )
{
MessageBoxYesNo( "Quit Mission", "Exit from this Mission?", "disconnect();", "keepPlaying();");
$timescale = 0;
}
else
MessageBoxYesNo( "Disconnect", "Disconnect from the server?", "disconnect();", "");
}
function keepPlaying()
{
$timescale = 1;
}
04/15/2007 (3:28 pm)
Replace the function escapeFromGame() in default.bind.cs with:function escapeFromGame()
{
if ( $Server::ServerType $= "SinglePlayer" )
{
MessageBoxYesNo( "Quit Mission", "Exit from this Mission?", "disconnect();", "keepPlaying();");
$timescale = 0;
}
else
MessageBoxYesNo( "Disconnect", "Disconnect from the server?", "disconnect();", "");
}
function keepPlaying()
{
$timescale = 1;
}
#11
04/16/2007 (12:28 am)
Just do ''ESC'' and leave it alone
Torque Owner Harold "LabRat" Brown
to pause and
$timescale=1;
to resume normal play
Not recommended for network play.