HasCollisionEffect Property

Usage:
   ObjectTemplate.HasCollisionEffect boolean

Argument values:

argument 1:    0, 1; most commonly 1

Description: This property says that the effect set for an object/object collision should be used.

For example, when a projectile hits a surface, you can set if it emits an effect in the MaterialManager. HasCollisionEffect allows you to turn this effect on or off per instance. Each attack material (bullet, bomb, etc.) has settings for each material it could contact, which is defined in the weapon's corresponding Game/damage_system/ file. For example, for the Sg44 assault gun, the sg44.con includes the entry:

 rem * *** Solid Metal ***
 MaterialManager.attGroup 223
 MaterialManager.defGroup 84
 MaterialManager.damageMod 0.0
 MaterialManager.setEffectTemplate RichoMetalDecal

So when an Sg44 bullet hits material 84, metal, the richochet metal decal effect is used. This effect is defined elsewhere as an EffectBundle in objects/Effects/Common/effects.con, which in turn pulls in named effects from other effects files.

See the Damage Tutorial for more information on the material manager.

Related properties: HasCollisionPhysics, HasStartEffect

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

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

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

Example: (from objects/Stationary_Weapons/Common/Objects.con)
   ObjectTemplate.Create Projectile Tracer_Projectile
   ObjectTemplate.Geometry TLight_m1
   ObjectTemplate.TimeToLive CRD_NONE/3/0/0
   ObjectTemplate.HasCollisionPhysics 1
   ObjectTemplate.GravityModifier 0.0
   ObjectTemplate.HasStartEffect 0
   ObjectTemplate.HasCollisionEffect 1
   ObjectTemplate.HasOnTimeEffect 0
   ObjectTemplate.InvisibleAtEndEffect 1
   ObjectTemplate.DieAfterColl 1
   ObjectTemplate.StopAtEndEffect 1
   ObjectTemplate.Invisible 1
   ObjectTemplate.Material 225
   ObjectTemplate.TracerScaler 50.0
   ObjectTemplate.Invisible 0


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