Material Property

Usage:
   ObjectTemplate.Material number

Argument values:

argument 1:    range is 40 to 259; most commonly 45

Description: The material of an object determines how it affects and is affected by other objects. For terrain and objects, it affects the physics engine and how much collision damage other objects take. For weapon projectiles, mines, etc., the material is the type of attack that the weapon does.

The terrain types are stored as 4-bit numbers in the level's terrain map, and are as follows:

0 - Default
1 - Water
2 - Dry grass
3 - Juicy grass
4 - Dry dirt
5 - Wet dirt
6 - Mud
7 - Outside map
8 - Gravel
9 - Frozen ground
10 - Dry sand (El Alamein)
11 - Wet sand
12 - Rock (Omaha Beach)
13 - Sand road
14 - Dirt road
15 - Paved road

Note that material 7 is special. After nine seconds a soldier on this type of terrain will take damage for leaving the battlefield. By default, the soldier takes 5 hitpoints per second. The property Game.DamageForBeingOutsideWorld (which is never set in any BF .con file) can be used to set this rate to another number of hitpoints per second.

See the Damage Tutorial for more information.

Used in object types (and how often in each type): Bundle (1%), EffectBundle (1%), FireArms (2%), HandFireArms (6%), PlayerControlObject (48%), Projectile (96%)

Used in a total of 256 .con files: Commonsoldierdata.inc, Effects.con, Objects.con, Projectile.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/Air/AichiVal/Weapons.con)
   rem *** AichiValProjectile ***
   ObjectTemplate.Create Projectile AichiValProjectile
   ObjectTemplate.CreateNotInGrid 1
   rem ObjectTemplate.geometry tracklight_m1
   ObjectTemplate.HasMobilePhysics 1
   ObjectTemplate.HasResponsePhysics 1
   ObjectTemplate.TimeToLive CRD_NONE/1.5/0/0
   ObjectTemplate.GravityModifier 0
   ObjectTemplate.Material 213
   ObjectTemplate.Material2 -1
   ObjectTemplate.StopAtEndEffect 1
   ObjectTemplate.DieAfterColl 1


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