O'Reilly logo

Torque 3D Game Development Cookbook by David Wyand

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required