A_RadiusThrust

From ZDoom Wiki
Jump to: navigation, search

A_RadiusThrust (int force, int distance[, int flags[, int fullthrustdistance]])

Usage

A_RadiusThrust makes an object "blow" enemies nearby away from them. This is similar A_Explode without the damage. Things will take damage, however, if they collide with a wall or each other, akin to A_Blast.

Parameters

  • force is how powerful the blast is - The velocity of the blast is determined as strength / (2 * mass), so a strength of 40,000 will push away a thing of 1,000 mass (the mass of a Baron of Hell) with a velocity of 20 units/tic (the speed of a rocket) at the very center of the blast. (Negative values will push objects towards the center of the source. (New from 2.7.1))
  • distance is how far the blast extends. At the center, objects take the full force of the blast. At the outer edge, this many units away, objects are not pushed at all.
  • flags: The following flags can be combined by using the | character between the constant names:
    • RTF_AFFECTSOURCE — Affect source: if this flag is set, the shooter of the projectile is affected.
    • RTF_NOIMPACTDAMAGE — No impact damage: if this flag is set, monsters thrust away do not cause melee damage on impact.
    • RTF_NOTMISSILE — Not a missile: if set, the calling actor is considered to be the source. By default, the calling actor is assumed to be a projectile, and the source is therefore considered to be the calling actor's target. (New from 2.7.1)
  • fullthrustdistance specifies the radius that actors will be subject to the full force of the blast.

Examples

The following example shows a projectile that blows objects away with a power of 500 within a 64 unit radius without affecting the shooter:

ACTOR WindyProjectile
{
  Height 4
  Radius 2
  Projectile
  States
  {
  Spawn:
    WIND ABCDEFGHIJK 2 A_RadiusThrust(500, 64, RTF_AFFECTSOURCE)
    WIND LMNO 2
    Stop
  }
}