Hitpoints Property

Usage:
   ObjectTemplate.Hitpoints number

Argument values:

argument 1:    range is 0 to 10000; most commonly 100

Description: This property specifies how much damage a class of object can take when it first spawns. When an object's number of hitpoints reaches 0, it is destroyed. It is possible (though never done in BF 1942) to set an object type's Maxhitpoints value, which is the maximum number of hitpoints an object can have, to be larger than the starting number of hitpoints (i.e., the object is spawned partially damaged).

See the Damage Tutorial for more information.

Related properties: Maxhitpoints

Used in object types (and how often in each type): Bundle (2%), ClusterProjectile (100%), FireArms (2%), HandFireArms (12%), PlayerControlObject (48%), Projectile (12%), simpleobject (1%)

Used in a total of 177 .con files: Commonsoldierdata.inc, Objects.con, Weapons.con

Parent directories of these .con files: objects/Vehicles, objects/Stationary_Weapons, objects/Soldiers, objects/Objectives, objects/MOVE_FILES, objects/HandWeapons, Bf1942/Levels

Example: (from objects/Vehicles/Land/SturmTiger/Objects.con)
   rem *** SturmTiger ***
   ObjectTemplate.Create PlayerControlObject SturmTiger
   ObjectTemplate.SetNetworkableInfo SturmTigerBodyInfo
   ObjectTemplate.SaveInSeparateFile 1
   ObjectTemplate.CullRadiusScale 4
   ObjectTemplate.HasMobilePhysics 1
   ObjectTemplate.HasDynamicShadow 1
   ObjectTemplate.ExplosionRadius 8
   ObjectTemplate.ExplosionDamage 5
   ObjectTemplate.Drag 2
   ObjectTemplate.Mass 30000
   ObjectTemplate.HasCollisionPhysics 1
   ObjectTemplate.HasResponsePhysics 1
   ObjectTemplate.HasArmor 1
   ObjectTemplate.SpeedMod 0.75
   ObjectTemplate.ExitTimer 1
   ObjectTemplate.Hitpoints 100
   ObjectTemplate.Maxhitpoints 100
   ObjectTemplate.Material 50
   ObjectTemplate.CriticalDamage 15
   ObjectTemplate.HpLostWhileCriticalDamage 1.5
   ObjectTemplate.ExplosionForceMod 6
   ObjectTemplate.HpLostWhileUpSideDown 10
   ObjectTemplate.HpLostWhileDamageFromWater 10
   ObjectTemplate.AddArmorEffect 30 e_PanzDamage 0/1/-1.6
   ObjectTemplate.AddArmorEffect 15 e_PanzFire 0/1.0/-1.6
   ObjectTemplate.AddArmorEffect 0 e_ExplGas 0/0/0
   ObjectTemplate.AddArmorEffect 0 e_scrapmetal 0/0/0
   ObjectTemplate.AddArmorEffect -1 WaterWaterExplosion 0/0/0
   ObjectTemplate.DamageFromWater 1
   ObjectTemplate.AiTemplate SturmTiger
   rem -------------------------------------
   ObjectTemplate.AddTemplate lodSturmTiger
   rem -------------------------------------
   ObjectTemplate.SetSoldierExitLocation -2.3/0.5/0 0/0/0
   ObjectTemplate.GUIIndex 75
   ObjectTemplate.SetVehicleIcon "Vehicle/Icon_sturm.tga"
   ObjectTemplate.SetVehicleIconPos 80/78
   ObjectTemplate.SetNumberOfWeaponIcons 1
   ObjectTemplate.SetPrimaryAmmoIcon "Ammo/Icon_cannon.tga"
   ObjectTemplate.SetPrimaryAmmoBar ABAmmoBarReloadBar
   ObjectTemplate.SetCrossHairType CHTCrossHair
   ObjectTemplate.SetVehicleCategory VCLand
   ObjectTemplate.SetVehicleType VTArtillery
   ObjectTemplate.SetToolTipType TTSturmTiger
   ObjectTemplate.HasRestrictedExit 1
   rem *** To add artillery effect to the main gun ***
   ObjectTemplate.ArtPos 1
   ObjectTemplate.DirBarXScale 50
   ObjectTemplate.DirBarYScaleAbove 37.5
   ObjectTemplate.DirBarYScaleBelow 0
   ObjectTemplate.DirBarYScaleMin -98
   ObjectTemplate.DirBarYScaleMax -70
   ObjectTemplate.SetMinimapIcon "Minimap/minimap_icon_tank_16x16.tga"


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