Pausing and Displaying Text
by Nick Kossintsev · in Torque Game Engine · 04/22/2003 (2:05 pm) · 2 replies
I've a simple question for those of you who are a bit more familiar with the Torque script organization...
I want to create a 'training' area in my game. This will include having invisible objects (triggers) that cause the game to be paused and a message to be displayed on the screen (say, the center) until user presses a key to dismiss the message. So, the order of events is thus:
1. Player somehow initiates a trigger in the world/mission
2. The game is paused
3. A text comes up on the screen and remains until a key is pressed
4. The game resumes
Any suggestions on how I would go about accomplishing one or more of the above steps?
I want to create a 'training' area in my game. This will include having invisible objects (triggers) that cause the game to be paused and a message to be displayed on the screen (say, the center) until user presses a key to dismiss the message. So, the order of events is thus:
1. Player somehow initiates a trigger in the world/mission
2. The game is paused
3. A text comes up on the screen and remains until a key is pressed
4. The game resumes
Any suggestions on how I would go about accomplishing one or more of the above steps?
About the author
#2
04/22/2003 (2:26 pm)
Something like this should do the trick. You MIGHT have to play with the callback portion of the MessageBox call, I do MessageBoxes a little different than stock torque.function pauseAndShowMessage( %message )
{
$timeScale = 0;
MessageBoxOK( "Message for you sir!", %message, "unpauseGame();" );
}
function unpauseGame()
{
$timeScale = 1;
}
Torque Owner Mike Stoddart