Stopping a server from restarting when the last player leaves
When the last player on a Torque 3D dedicated server disconnects, the server automatically restarts itself—this includes reloading the current level. However, we may want the server to remain in its current state, especially if it represents a persistent world.
In this recipe, we will learn how to stop a dedicated server from restarting when the last of its players leave.
Getting ready
We will be making TorqueScript changes in 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. Give this project a name of MyGame
; it will be found under the My Projects
directory. After that, start your favorite script editor, such as Torsion, and let's get going!
How to do it...
In the following steps, we will prevent a game server from restarting itself when the last client disconnects from it.
Open...