A_Mushroom

From ZDoom Wiki
Jump to navigation Jump to search

A_Mushroom [(string spawntype [, int amount[, int flags[, float vrange[, float hrange]]]])]

Shoots the specified amount of missiles high into the air with a mushroom cloud effect, performing a radius attack of the calling actor's DamageType as damage type and both damage and radius of 128.

The parameters are:

  • spawntype: type of projectile to throw. Default Mancubus fireballs.
  • amount: the number of thrown projectiles. If 0, then the number is determined by the calling actor's damage property. Default 0.
  • flags: the following flags can be combined by using the | character between the constant names:
    • MSF_Standard — uses the normal ZDoom projectile spawning function, in which the vertical velocity is one component of the projectile's speed. This flag is implied if the flags parameter is undefined or zero.
    • MSF_Classic — uses the old Doom function in which the vertical velocity is added to the projectile's speed. Since A_Mushroom by default aims its projectiles at very steep angles, the difference between the standard and classic is very noticeable; the older mode results in a more chaotic-looking, asymmetrical explosion, that spreads much higher and farther.
    • MSF_DontHurt — the target of the calling actor is considered to be the shooter of the debris projectiles and won't be hurt by the explosion. Use this flag if A_Mushroom is called from a projectile and should not hurt its shooter.
  • vrange: controls how high the projectiles are aimed, the larger the value, the higher they go. Default 4.0.
  • hrange: factor by which the speed of the projectiles is multiplied. Default 0.5.

Example

ACTOR MushRoomBall
{
  Radius 3
  Height 2
  Speed 15
  FastSpeed 22
  Damage 6
  Projectile
  +RANDOMIZE
  RenderStyle Add
  Alpha 0.75
  SeeSound "imp/attack"
  DeathSound "imp/shotx"
  States
  {
  Spawn:
    BAL1 AB 2 Bright
    Loop
  Death:
    BAL1 CDE 2 Bright A_Mushroom("PlasmaBall", 10, MSF_DontHurt, 8, 0.1)
    Stop
  }
}