Sending a network event from the client to the server
Over the course of a networked game, it is often necessary to send an event from the client to the server. This event may also contain data for the server to process. In this recipe, we will learn how to send a network event from the client to the server, and how to have the server process this custom event.
Getting ready
We will be using a project based on the Torque 3D's Full
template, using the Empty Terrain
level. If you haven't already, use the Torque Project Manager (Project Manager.exe
) to create a new project from the Full
template; it will be found under the My Projects
directory.
How to do it...
In the following steps, we will send a command from the client to the server to kill the player:
Start our
Full
template.Once the main menu is displayed, click on the Play button. This will open the Choose Level window.
Choose the
Empty Terrain
level and click on the Go! button.When the game has loaded, press Tab to go into third-person...