Usage:
ObjectTemplate.AngleMod
number
Argument values:
argument 1: | 1; most commonly 1 |
Description: AngleMod is used to modify the collision damage received by an object. This value is set inside the defending object's Objects.con file, similar to SpeedMod. However, most objects do not have this value set, so have a default of 0; only planes have this value set, and always to 1. The actual expression used is:
CollisionAngleMod = AngleMod + (1 - AngleMod) * sine( cosine( angle ) * 90 degrees )
This looks complex, but because the AngleMod is always either 0 or 1, one part or the other of this expression goes away when evaluated. In theory you could set AngleMod to some other value. The angle is the angle of collision between the two objects. Specifically, it is the direction of the attacker compared to the normal of the surface hit of the defender. 0 degrees is head-on. So, for airplanes the final value is simply 1, i.e. the angle an object collides with the plane does not matter, the plane will take full damage. For other objects, this term falls off with angle, e.g. 0 degrees gives 1.0, 30 degrees gives 0.978, 60 degrees gives 0.707, 80 degrees gives 0.270, 90 degrees gives 0.0. So hitting at anything but a glancing blow does nearly full damage.
See the Damage Tutorial for more information.
Related properties: AddArmorEffect, CriticalDamage, Drag, ExplosionDamage, ExplosionForceMod, ExplosionRadius, HasArmor, HasCollisionPhysics, HasDynamicShadow, HasResponsePhysics, Hitpoints, HpLostWhileCriticalDamage, HpLostWhileDamageFromWater, HpLostWhileUpSideDown, InertiaModifier, Mass, Material, Maxhitpoints
Used in object types (and how often in each type): PlayerControlObject (11%)
Used in a total of 35 .con files: Commonsoldierdata.inc, Objects.con
Parent directories of these .con files: objects/Vehicles, objects/Soldiers, Bf1942/Levels
Example: (from objects/Vehicles/Air/Ilyushin/Objects.con)
rem *** Ilyushin ***
ObjectTemplate.Create PlayerControlObject Ilyushin
ObjectTemplate.SetNetworkableInfo IlyushinBodyInfo
ObjectTemplate.SaveInSeparateFile 1
ObjectTemplate.CullRadiusScale 5
ObjectTemplate.HasMobilePhysics 1
ObjectTemplate.HasDynamicShadow 1
ObjectTemplate.Drag 0.061
ObjectTemplate.Mass 3000
ObjectTemplate.InertiaModifier 0.95/0.943/0.968
ObjectTemplate.HasCollisionPhysics 1
ObjectTemplate.HasResponsePhysics 1
ObjectTemplate.ExplosionRadius 8
ObjectTemplate.ExplosionDamage 5
ObjectTemplate.HasArmor 1
ObjectTemplate.AngleMod 1
ObjectTemplate.SpeedMod 2
ObjectTemplate.Hitpoints 130
ObjectTemplate.Maxhitpoints 130
ObjectTemplate.Material 60
ObjectTemplate.CriticalDamage 20
ObjectTemplate.HpLostWhileCriticalDamage 1.5
ObjectTemplate.ExplosionForceMod 15
ObjectTemplate.HpLostWhileUpSideDown 10
ObjectTemplate.HpLostWhileDamageFromWater 10
ObjectTemplate.AddArmorEffect 65 em_SBD-6Damage 0/-0.084/3.4
ObjectTemplate.AddArmorEffect 65 em_PlaneDamage 0/-0.225/2.71
ObjectTemplate.AddArmorEffect 20 e_SBD-6Fire 0/-0.084/3.4
ObjectTemplate.AddArmorEffect 0 e_ExplGas 0/0/0
ObjectTemplate.AddArmorEffect 0 e_ScrapMetal_Ilyushin 0/0/0
ObjectTemplate.AddArmorEffect -1 WaterWaterExplosion 0/0/0
ObjectTemplate.DamageFromWater 1
ObjectTemplate.AiTemplate Ilyushin
rem -------------------------------------
ObjectTemplate.AddTemplate lodIlyushin
rem -------------------------------------
ObjectTemplate.SetSoldierExitLocation -2.8/0/-2.5 0/0/0
ObjectTemplate.GUIIndex 33
ObjectTemplate.SetVehicleIcon "Vehicle/IconIlyushin.tga"
ObjectTemplate.SetVehicleIconPos 75/100
ObjectTemplate.SetNumberOfWeaponIcons 2
ObjectTemplate.SetPrimaryAmmoIcon "Ammo/Icon_bullet.tga"
ObjectTemplate.SetPrimaryAmmoBar ABAmmoBar
ObjectTemplate.SetSecondaryAmmoIcon "Ammo/Icon_bomb.tga"
ObjectTemplate.SetSecondaryAmmoBar ABAmmoBarReloadBar
ObjectTemplate.SetCrossHairType CHTIcon
ObjectTemplate.SetVehicleCategory VCAir
ObjectTemplate.SetVehicleType VTDiveBomber
ObjectTemplate.SetToolTipType TTDiveBomber
ObjectTemplate.SetMinimapIcon "Minimap/minimap_icon_plane_16x16.tga"
Go to the ObjectTemplate properties list page, ObjectTemplate page, All Properties list, or Main scripting page.