Call of Duty 4: Scripting Reference - Entity::EntityRadiusDamage

From COD Modding & Mapping Wiki
Share/Save/Bookmark
Revision as of 23:55, 31 July 2009 by CoDEmanX (talk | contribs) (New page: {{Function |Version=4 |Name=EntityRadiusDamage( <origin>, <range>, <max damage>, <min damage>, [attacker] ) |Module=Entity |Available |Summary=Does damage to all da...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


EntityRadiusDamage( <origin>, <range>, <max damage>, <min damage>, [attacker] )

Module: Entity

Summary:

Does damage to all damageable objects within a given radius. The amount of damage is linear according to how close the object is to the radius. See also Damage/radiusdamage if you don't wish to specify an entity the damage is coming from.


Call this on: <entity> The damaging entity; this will be ignored during the damage traces.

Example:

self EntityRadiusDamage( level.player.origin, 500, max, min, attacker );

Required arguments:

  1. <origin> The centre of the damage.
  2. <range> The radius of the damage done.
  3. <max damage> The maximum damage done. This will be done to objects close to the origin
  4. <min damage> The minimum damage done. This will be done to objects at the edge of the damage sphere.


Optional arguments:

  1. [attacker] The attacker. Defaults to world. Can be different from the entity this is called on.


Notes:

none