A_RadiusThrust

From ZDoom Wiki
Jump to: navigation, search

A_RadiusThrust (int force, int distance[, bool affectsource[, int fullthrustdistance]])

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.

  • 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) with a velocity of 20 units/tic (the speed of a Rocket) at the very center of the blast.
  • 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.
  • affectsource specifies whether the shooter of the projectile gets affected. If this is false, they are not affected. If it's true, then they are. This is true by default.
  • fullthrustdistance specifies the radius that actors will be subject to the full force of the blast. (development version r3202+ only)

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, 0)
    WIND LMNO 2
    stop
  }
}
Personal tools
Namespaces
Variants
Actions
Navigation
ACS
DECORATE
ZDoom mods
Toolbox