AddArmorEffect Property

Usage:
   ObjectTemplate.AddArmorEffect number string x/y/z

Argument values:

argument 1:    range is -1 to 750; most commonly 0
argument 2:    Em_ExplGranade, Em_ExplGranade_cloud, Em_ExplGranade_flash, Em_ExplGranade_smoke, WaterExplosionSub, WaterWaterExplosion, e_AA-GunDamage, e_AichiValFire, e_AichivalFire, e_B17Fire, e_BF110Fire, e_Bf109Fire, ...
argument 3:    -0.109/0.9/-8.729, -0.209/2.7/-11.429, -0.5/-0.502/-3.01, -0.5/0.5/0, -0.5/1.5/-1, -0.942/0.433/0.4, -0.942/0.44/0.4, -0.942/0.44/0.437, -1.46/0.118/-6.136, -1.499/15.1/5, -10.099/15.1/5, -10/2/-115, ...

Description: The AddArmorEffect property allows you to choose an effect when the objects drops below a certain number of hitpoints. The effect will stay on until it reaches the next armor effect.

For example, the Corsair shows that when the Hitpoints of the vehicle reaches 65, it will start the effect em_corsairDamage at a position of 0/0.103/2.11 relative to the center of the plane. The effect em_PlaneDamage will also begin. These effects will stay active until 20 hitpoints are reached, them the e_corsairFire effect will start and the previous effects will disappear. -1 hitpoints has a special meaning that the object is in water.

 ObjectTemplate.addArmorEffect 65 em_CorsairDamage 0/0.103/2.11
 ObjectTemplate.addArmorEffect 65 em_PlaneDamage 0/0.103/2.61
 ObjectTemplate.addArmorEffect 20 e_CorsairFire 0/1/3
 ObjectTemplate.addArmorEffect 0 e_ExplGas 0/0/0
 ObjectTemplate.addArmorEffect 0 e_ScrapMetal_Corsair 0/0/0
 ObjectTemplate.addArmorEffect -1 WaterWaterExplosion 0/0/0

Related properties: AddTemplate, CriticalDamage, GUIIndex, Hitpoints, HpLostWhileCriticalDamage, Material

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

Used in a total of 138 .con files: Objects.con

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

Example: (from objects/Objectives/Telemark_Turbines/Objects.con)
   rem *** Telemark_Turbines ***
   ObjectTemplate.Create PlayerControlObject Telemark_Turbines
   ObjectTemplate.SetNetworkableInfo Telemark_TurbinesBodyInfo
   ObjectTemplate.SaveInSeparateFile 1
   ObjectTemplate.HasCollisionPhysics 1
   ObjectTemplate.HasResponsePhysics 1
   ObjectTemplate.HasArmor 1
   ObjectTemplate.Hitpoints 675
   ObjectTemplate.Maxhitpoints 675
   ObjectTemplate.Material 76
   ObjectTemplate.CriticalDamage 12
   ObjectTemplate.HpLostWhileCriticalDamage 1
   ObjectTemplate.AddArmorEffect 30 e_DefGunDamage 0/6/0
   ObjectTemplate.AddArmorEffect 0 e_scrapmetal 0/20/0
   ObjectTemplate.AddArmorEffect 0 e_ExplGas 0/10/0
   ObjectTemplate.TimeToLiveAfterDeath 9999
   ObjectTemplate.FadeAtTimeToLiveAfterDeath 0
   rem -------------------------------------
   ObjectTemplate.AddTemplate lodTelemark_Turbines
   ObjectTemplate.GUIIndex 67
   ObjectTemplate.SetMinimapIcon "Minimap/minimap_icon_blank_16x16.dds"


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