ObjectTemplate.Material

From Pilot_51's Wiki
Jump to navigation Jump to search

MDT 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.

Source and more details

Additional Description