How to Control the Player Respawn Rate

 

PREREQUISITES

- Basic level construction and entity knowledge
- WorldCraft 2.1 knowledge

INTRODUCTION

**NOTE** This tutorial was written using version 1.0L of the TFC Game Data file

This small tutorial explains how to control the player respawn rate. Setting this will make the player wait X seconds after they die before they can respawn. This is done by changing a value in the info_tfdetect entity. The info_tfdetect entity is maybe THE most important TFC entity, in that it's the entity that makes the map a TFC map. The default for respawning is NO delay. If you don't want to force a respawn delay on players, there is no need to read this tutorial. :)

Each of the info_tfdetect mini tutorials will be covering only one aspect of the info_tfdetect entity. You can combine all the different options into one single info_tfdetect to get the desired result. Remember to use only ONE info_tfdetect in your TFC map.

CONTROLLING THE RESPAWN DELAY

- The first step is to place an info_tfdetect in your map. The placement of this entity is not important, but please remember to NOT place it in the void! :)

- After you've placed your info_tfdetect in the map, select the entity and hit ALT+ENTER. This will bring up the properties for the entity.

The Attribute we are going to focus on is 'Game Settings (toggleflags)', or 'impulse' if you've got SmartEdit turned off.

The 'Game Settings (toggleflags)' controls a number of things besides just player respawn rates. For that reason, this Attribute can get a little confusing. The 'Game Settings (toggleflags)' works with a number that determines the state of a variety of different options...that's an important thing to remember. When this tutorial is over, you will have a numeric value which represents the kind of respawn delay you want to enforce in your map. All you have to do is take that number, add it to any other numbers you have come up with for the 'Game Setting (toggleflags)' attribute, and enter that total as the value for the 'Game Settings (toggleflags) attribute. Other numbers for the 'Game Settings (toggleflags)' attribute will be provided in other tutorials. If you don't end up running across this situation again, you will simply enter your value for the respawn delay. It's really not as hard as it sounds. :)

There are four choices you have for player respawn delays:

- No delay
- 5 second delay
- 10 second delay
- 20 second delay

As stated previously, if you are not going to enforce a respawn delay, there is no need for you to worry about any of this.

Each delay option has a certain numerical value. These are as follows:

- No delay = 0 (zero)
- 5 second delay = 16
- 10 second delay = 32
- 20 second delay = 48

Once you know how long of a delay you want to enforce, write down it's corresponding value. This is the value you will use to determine the total value for the 'Game Settings (toggleflag)' attribute.

If you have not come across any other setting you want to change which use the 'Game Settings (toggleflags)' attribute, simply enter your respawn delay value for that attribute and you are done!

If there are other settings you want to change which use the 'Game Settings (toggleflags)' attribute, add your respawn delay value to the values of the other settings, then enter that total number as the value for 'Game Setting (toggleflags)' attribute.

Depending on the respawn delay you have chosen, the player will now have to wait the duration of that delay period (after being killed) before they can respawn and continue fraggin!

 

- evilchild