From ZDoom Wiki
Jump to: navigation, search

A_RadiusGive (str item, fixed distance, int flags, [int amount])


Gives an item to all eligible actors within range.

Note that for very large distances, attempting to give to specific things map-wide may fail. A good range for the entirety of the map would be 26000, but should this fail, simply try reducing the radius by 1000. Experimentation may be required.


  • item is the item to give.
  • distance is the radius of range. 0 does not imply infinite range.
  • flags determines which actors are eligible of getting the item:
    • RGF_GIVESELF: The calling actor is eligible.
    • RGF_PLAYERS: Any player actor is eligible.
    • RGF_MONSTERS: Any monster, be it friend or foe, is eligible.
    • RGF_OBJECTS: Any shootable or vulnerable object is eligible.
    • RGF_VOODOO: Any voodoo doll is eligible.
    • RGF_CORPSES: Any corpse is eligible.
  • RGF_MISSILES: Missile actors are eligible. However, in order for missiles to properly activate CustomInventory actors, the NOBLOCKMAP flag must be removed from the missile. (development version 165d288 only)
Note: At least one of the above flags must be specified for the giving to have any effect.
  • RGF_NOTARGET: The calling actor's target may not get the item.
  • RGF_NOTRACER: The calling actor's tracer may not get the item.
  • RGF_NOMASTER: The calling actor's master may not get the item.
  • RGF_CUBE: Use a cube for the range check rather than a circle.
  • RGF_NOSIGHT: The actor is given the item regardless of whether it is in the line of sight of the caller or not. (development version 165d288 only)
  • amount is how much of this item will be given to actors. If item is a health item, the amount of health to be given is the health item's amount multiplied by this parameter. Default is 0 (which is interpreted as 1).


The following example shows a projectile that gives health to any ally players that come near to it. Could be useful in cooperative.

ACTOR HealingPlasma : PlasmaBall
  Damage (0)
  Translation "192:207=168:176", "240:247=177:184" // blue -> red
    PLSS AABB 3 Bright A_RadiusGive("Health", 96, RGF_PLAYERS, 5)