Usage:
ObjectTemplate.SetHealth
number number boolean
Argument values:
argument 1: | range is -1 to 0; most commonly 0 |
argument 2: | range is 0 to 4.0; most commonly 0 |
argument 3: | 0; most commonly 0 |
Description: Set for medical lockers and supply boxes. The first argument is the amount of medical supplies this supply point has to give out; "-1" means "infinite", and setting it to a number limits the amount it can heal. The second number determines how much health (Hitpoints) a soldier within Radius of the object gains each second. The third argument is how fast the supply point itself gets resupplied, if the first argument is not set to "-1" (this last argument is not used in any BF1942 battles, and so, according to the coders, may not actually work).
In BF 1942 the heal value is generally set to 4.0, and a soldier has 30 hitpoints, so a gravely wounded soldier fully heals in 7.5 seconds.
In contrast, medics use the HealFactor property for their healing rate.
Used in object types (and how often in each type): SupplyDepot (83%)
Used in a total of 26 .con files: Objects.con, Weapons.con
Parent directories of these .con files: objects/Vehicles, objects/MOVE_FILES, objects/Buildings, Bf1942/Levels
Example: (from objects/Buildings/Common/AlliedAirplaneAmmo/Objects.con)
ObjectTemplate.Create SupplyDepot AlliedAirplaneSupplyDepot
ObjectTemplate.Radius 20
ObjectTemplate.Team 2
ObjectTemplate.SetHealth 0 0 0
ObjectTemplate.AddAmmoType 10 -1 100 0
ObjectTemplate.AddAmmoType 9 -1 4 0
ObjectTemplate.AddAmmoType 8 -1 100 0
ObjectTemplate.AddAmmoType 7 -1 4 0
ObjectTemplate.WorkOnVehicles 1
ObjectTemplate.WorkOnSoldiers 0
ObjectTemplate.LoadSoundScript ../../../Common/Sounds/SupplyDepot.ssc
Go to the ObjectTemplate properties list page, ObjectTemplate page, All Properties list, or Main scripting page.