DamageFromWater Property

Usage:
   ObjectTemplate.DamageFromWater boolean

Argument values:

argument 1:    0, 1; most commonly 1

Description: If an object's Objects.con has these properties defined:

  ObjectTemplate.DamageFromWater 1
  ObjectTemplate.HpLostWhileDamageFromWater 10

then it takes the amount of damage per second specified by HpLostWhileDamageFromWater when touching water. For soldiers, the standard definition, in CommonSoldierData.inc, is:

  ObjectTemplate.HpLostWhileDamageFromWater 1
  ObjectTemplate.WaterDamageDelay 90
  ObjectTemplate.DamageFromWater 1

The additional value WaterDamageDelay delays drowning damage for 90 seconds, then damage takes place at a hitpoint per second.

See the Damage Tutorial for more information.

Related properties: HpLostWhileDamageFromWater, WaterDamageDelay

Used in object types (and how often in each type): Bundle (1%), PlayerControlObject (30%), simpleobject (1%)

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

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

Example: (from Bf1942/Levels/Battle_of_Britain/Objects/Felixstowe_RadarTower/objects.con)
   ObjectTemplate.Create PlayerControlObject Felixstowe_RadarTower
   ObjectTemplate.SetSoldierExitLocation 0.01/-2.898/-6.598 180/0/0
   ObjectTemplate.NetworkableInfo RadarTower_BodyInfo
   ObjectTemplate.HasMobilePhysics 0
   ObjectTemplate.HasCollisionPhysics 1
   ObjectTemplate.HasResponsePhysics 1
   ObjectTemplate.ExplosionRadius 8
   ObjectTemplate.ExplosionDamage 5
   ObjectTemplate.CriticalDamage 20
   ObjectTemplate.HpLostWhileCriticalDamage 2
   ObjectTemplate.Mass 4500
   ObjectTemplate.HasArmor 1
   ObjectTemplate.Hitpoints 600
   ObjectTemplate.Maxhitpoints 600
   ObjectTemplate.Material 45
   ObjectTemplate.TimeToLiveAfterDeath 5
   rem -------------------------------------
   ObjectTemplate.AddTemplate lodRadarTower
   rem -------------------------------------
   ObjectTemplate.AddArmorEffect 400 e_KatyushaDamage -3.699/4.7/-4.498
   ObjectTemplate.AddArmorEffect 200 e_KatyushaDamage -3.699/4.7/-4.498
   ObjectTemplate.AddArmorEffect 200 e_KatyushaDamage 0/9.4/-4.298
   ObjectTemplate.AddArmorEffect 20 e_KatyushaFire -3.599/5.15/-4.398
   ObjectTemplate.AddArmorEffect 0 e_ExplGas 0/-1/0
   ObjectTemplate.AddArmorEffect 0 e_scrapmetal 0/-1/5
   ObjectTemplate.AddArmorEffect 0 e_ScrapMetal_RadarTower 0/8/0
   ObjectTemplate.AddArmorEffect 0 e_ScrapAABase -4.599/0.1/3
   ObjectTemplate.AddArmorEffect -1 WaterWaterExplosion 0/-1/0
   ObjectTemplate.DamageFromWater 1
   rem -------------------------------------
   ObjectTemplate.GUIIndex 79
   ObjectTemplate.SetVehicleIcon "Vehicle/Radar_Icon.tga"
   ObjectTemplate.SetVehicleIconPos 75/80
   ObjectTemplate.SetNumberOfWeaponIcons 1
   ObjectTemplate.SetPrimaryAmmoIcon "Ammo/Icon_cannon.tga"
   ObjectTemplate.SetPrimaryAmmoBar ABIconOnly
   ObjectTemplate.SetCrossHairType CHTNone
   ObjectTemplate.SetVehicleCategory VCLand
   ObjectTemplate.SetVehicleType AAGun
   ObjectTemplate.SetToolTipType TTAAGun
   ObjectTemplate.SetMinimapIcon "Minimap/minimap_icon_Radar_32x32.tga"
   ObjectTemplate.AiTemplate RadarTower
   ObjectTemplate.HasRestrictedExit 1
   rem -------------------------------------
   ObjectTemplate.AddTemplate RadarTower_E_AISpawn
   ObjectTemplate.AddTemplate RadarTower_E_SoldierSpawn
   ObjectTemplate.SetPosition 0/0/-18.598
   ObjectTemplate.AddTemplate RadarTower_E_SoldierSpawn
   ObjectTemplate.SetPosition -4.789/0/-17.198
   ObjectTemplate.AddTemplate RadarTower_E_SoldierSpawn
   ObjectTemplate.SetPosition 4.789/0/-17.198
   ObjectTemplate.AddTemplate RadarTower_E_SoldierSpawn
   ObjectTemplate.SetPosition -9.189/0/-12.898
   ObjectTemplate.AddTemplate RadarTower_E_SoldierSpawn
   ObjectTemplate.SetPosition 9.189/0/-12.898
   rem ObjectTemplate.addTemplate Allies_EastAirfield_Spawn
   rem ObjectTemplate.setPosition 119.85/1.99/-386.26
   rem Spawn Position - RadarTower position
   rem Position calculations 1610.69 - 1740.54/105 - 103.01/1663.61- 1277.35
   rem Then multiply the x and y offsets by -1 because of the 180 rotation
   ObjectTemplate.AddTemplate RadarTowerSonar
   ObjectTemplate.SetPosition 0/9/-4.25
   ObjectTemplate.SonarPos 1


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