Broadcasting a message to all clients and having it displayed in the center of the screen
During the course of a game, it may be necessary to inform all the clients about an event or share an important piece of information. Torque 3D allows the server to send out a message to all clients that will be displayed in the center of the screen for a specified length of time.
In this recipe, we will learn about the commands used to display a message in the center of the screen on all the connected clients.
How to do it...
From the server's console, enter the following command:
% centerPrintAll ("The server will be coming down in 5 minutes. Please log out.", 30, 1);
All connected clients will see the given message in the center of their screen for 30 seconds, as shown in the following screenshot:.
How it works...
The centerPrintAll()
function is used on the server to send a message, will be displayed in the center of their screen, to all clients. This function is as follows:
centerPrintAll( message,...