Call of Duty 5: Damage types and MeansOfDeath

From COD Modding & Mapping Wiki
Revision as of 04:24, 24 September 2009 by CoDEmanX (talk | contribs) (Created page with '{{Note|This is a list of available damage types and MeansOfDeath (MOD) in CoD5}} {| border="1" |- | '''Name''' | '''Description''' |- | MOD_BAYONET | Injured or killed by Bayone…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This is a list of available damage types and MeansOfDeath (MOD) in CoD5
Name Description
MOD_BAYONET Injured or killed by Bayonet
MOD_BURNED Burned with flamethrower or molotov
MOD_CRUSH Run over by a tank
MOD_EXPLOSIVE Damage received by explosive type weapon
MOD_FALLING Fall damage
MOD_GRENADE Grenade injury or death
MOD_GRENADE_SPLASH Direct grenade impact
MOD_HEAD_SHOT Headshot death
MOD_IMPACT Impact damage (collision?)
MOD_MELEE Melee attack
MOD_PISTOL_BULLET Pistol round
MOD_PROJECTILE Projectile type weapon
MOD_PROJECTILE_SPLASH Direct projectile impact
MOD_RIFLE_BULLET Rifle bullet
MOD_SUICIDE Self murder (e.g. carried out by an anti-camping script)
MOD_TELEFRAG Telefragged (entity spawned into another kills the first entity)
MOD_TRIGGER_HURT Injured by a trigger_hurt
MOD_UNKNOWN Misc. type (undefined MOD)


Code examples

Damage

self waittill( "damage", damage, attacker, direction_vec, point, type, modelName, tagName, partName, idFlags );

[[level.callbackPlayerDamage]](eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, timeOffset);
eInflictor The entity that causes the damage (e.g. a turret)
eAttacker The entity that is attacking
iDamage Integer specifying the amount of damage done
iDFlags Integer specifying flags that are to be applied to the damage
sMeansOfDeath Integer specifying the method of death
sWeapon The weapon number of the weapon used to inflict the damage
vPoint The point the damage is from?
vDir The direction of the damage
sHitLoc The location of the hit
psOffsetTime The time offset for the damage


iDFlags:

level.iDFLAGS_RADIUS			= 1;
level.iDFLAGS_NO_ARMOR			= 2;
level.iDFLAGS_NO_KNOCKBACK		= 4;
level.iDFLAGS_PENETRATION		= 8;
level.iDFLAGS_NO_TEAM_PROTECTION 	= 16;
level.iDFLAGS_NO_PROTECTION		= 32;
level.iDFLAGS_PASSTHRU			= 64;


Death

level.player waittill( "death", attacker, cause, weaponName );

[[level.callbackPlayerKilled]](eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration);
deathAnimDuration Length of the death animation

(see above for the rest)