Usage:
ObjectTemplate.Distance
number
Argument values:
argument 1: | range is 0 to 2000; most commonly 40 |
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: DamageWhenLost, TimeToLive
Used in object types (and how often in each type): ObjectSpawner (98%)
Used in a total of 151 .con files: Objectivespawnertemplates.con, Objects.con, Objectspawntemplates.con, Smallwar.con
Parent directories of these .con files: objects/Vehicles, Bf1942/Levels, ai
Example: (from Bf1942/Levels/Kbely_Airfield/TDM/ObjectSpawnTemplates.con)
ObjectTemplate.Create ObjectSpawner JetPackSpawner
ObjectTemplate.SetObjectTemplate 2 GermanElite_JetPack
ObjectTemplate.SetObjectTemplate 1 GermanElite_JetPack
ObjectTemplate.SpawnDelay 60
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 120
ObjectTemplate.Distance 200
Go to the ObjectTemplate properties list page, ObjectTemplate page, All Properties list, or Main scripting page.