DamageWhenLost Property

Usage:
   ObjectTemplate.DamageWhenLost number

Argument values:

argument 1:    range is 0 to 20; most commonly 10

Description: 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.

Related properties: Distance, TimeToLive

Used in object types (and how often in each type): ObjectSpawner (58%)

Used in a total of 125 .con files: Objects.con, Objectspawntemplates.con

Parent directories of these .con files: objects/Vehicles, Bf1942/Levels

Example: (from Bf1942/Levels/GuadalCanal/TDM/ObjectSpawnTemplates.con)
   ObjectTemplate.Create ObjectSpawner lcvpSpawner
   ObjectTemplate.SetObjectTemplate 2 lcvp
   ObjectTemplate.SetObjectTemplate 1 daihatsu
   ObjectTemplate.SpawnDelay 20
   ObjectTemplate.SpawnDelayAtStart 0
   ObjectTemplate.TimeToLive 45
   ObjectTemplate.Distance 40
   ObjectTemplate.DamageWhenLost 10


Go to the ObjectTemplate properties list page, ObjectTemplate page, All Properties list, or Main scripting page.