DamageType Property

Usage:
   ObjectTemplate.DamageType number

Argument values:

argument 1:    range is 0 to 4; most commonly 1

Description: The property DamageType in the weapon's Weapons.con file specifies the type of explosion. For explosive packs (and almost every other explosive) this entry is:

  ObjectTemplate.damageType 1

which means that the object explodes on impact. Landmines and flak guns are the only weapons with a DamageType of 4, which was introduced with the v1.4 patch. This setting is used to allow the projectile to explode when it is near another object. The property ExplodeNearEnemyDistance sets this explosion distance.

See the Damage Tutorial for more information.

Related properties: ExplodeNearEnemyDistance, Hitpoints, Radius

Used in object types (and how often in each type): ClusterProjectile (100%), Projectile (58%)

Used in a total of 83 .con files: Objects.con, Projectile.con, Weapons.con

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

Example: (from objects/Vehicles/Land/KatyushaRocket/Weapons.con)
   ObjectTemplate.Create Projectile KatyushaRocket
   ObjectTemplate.Geometry r_rocket_m1
   ObjectTemplate.TimeToLive CRD_NONE/20/0/0
   ObjectTemplate.HasCollisionPhysics 1
   ObjectTemplate.SetHasPointPhysics 0
   ObjectTemplate.Drag 1.0
   ObjectTemplate.Mass 20
   ObjectTemplate.StartEffectTemplate e_KatyushaFume
   ObjectTemplate.HasCollisionEffect 1
   ObjectTemplate.HasOnTimeEffect 0
   ObjectTemplate.InvisibleAtEndEffect 0
   ObjectTemplate.DieAfterColl 1
   ObjectTemplate.StopAtEndEffect 0
   ObjectTemplate.Invisible 0
   ObjectTemplate.DamageType 1
   ObjectTemplate.Material 240
   ObjectTemplate.Material2 201
   ObjectTemplate.Radius 15
   ObjectTemplate.ForceOnExplosion 15
   ObjectTemplate.AddTemplate KatyushaRocket_Wing
   ObjectTemplate.SetPosition 0/0/-1.5
   ObjectTemplate.SetRotation 0/0/0
   ObjectTemplate.AddTemplate KatyushaRocket_Engine
   ObjectTemplate.SetPosition 0/0/-2
   ObjectTemplate.SetRotation 0/0/0


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