A_RadiusGive

From ZDoom Wiki
Jump to: navigation, search

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

A_RadiusGive gives an item to all eligible actors within range.

  • 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.

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.
  • 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.

Examples

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
{
  +RIPPER
  Damage (0)
  Translation "192:207=168:176", "240:247=177:184" // blue -> red
  States
  {
  Spawn:
    PLSS AABB 3 bright A_RadiusGive ("Health", 96, RGF_PLAYERS, 5)
    loop
  }
}
Personal tools
Namespaces

Variants
Actions
Navigation
ACS
DECORATE
ZDoom mods
Toolbox