ObjectTemplate.TimeToLive

From Pilot_51's Wiki
Jump to: navigation, search

MDT description

This property is used in two different ways, depending if the object is player controlled or is an effect. If the object is a vehicle or projectile, this property is a number; if the object has to do with an effect, this property is a CRD.

For a Projectile, this property defines the lifetime of the projectile, i.e. the longest amount of time it will exist.

A vehicle will self-destruct after a certain amount of time if abandoned some distance from its spawn point. This type of damage is important for game play, as it means that abandoned vehicles will eventually disappear and then get replaced. Unlike most other damage factors, these settings are found in the level's battle type ObjectSpawnTemplates.con file. Here is an example:

 ObjectTemplate.TimeToLive 45
 ObjectTemplate.Distance 40
 ObjectTemplate.DamageWhenLost 10

These settings mean that if the vehicle is moved 40 meters or more away from its spawn point, it will have 45 seconds to live unattended. After this period, the vehicle will take 10 Hitpoints of damage each second. See the Damage Tutorial for more information.

For effects, the TimeToLive property defines the length of time the object exists, using a CRD argument.

Source and more details

Additional Description