A_CustomComboAttack

From ZDoom Wiki
Jump to navigation Jump to search

A_CustomComboAttack (string missiletype, float spawnheight, int damage, string meleesound, string damagetype, bool bleed)

Usage

A customizable combo attack for monsters. The actor performs either a melee or missile attack depending on the distance to the target. A melee attack will be used if the target is within the actor's specified melee range. Otherwise, a projectile is generated instead.

Parameters

  • missiletype: The class name of the missile to spawn.
  • spawnheight: The height of the spawned missile.
  • damage: The melee damage dealt to the target.
  • meleesound: The sound played when the melee attack is used.
  • damagetype: The type of damage dealt if a melee attack is used. Defaults to "melee".
  • bleed: Controls whether the target bleeds on a successful hit by the melee attack. Defaults to true.

Examples

This example actually replicates the Baron of Hell's attack (A_BruisAttack) using this function:

  Melee:
  Missile:
    BOSS EF 8 A_FaceTarget
    BOSS G 8 A_CustomComboAttack("BaronBall", 32, 10 * random(1, 8), "baron/melee")
    Goto See