A_HeadAttack

From ZDoom Wiki
Jump to: navigation, search

A_HeadAttack

(no parameters)


The attack of Doom's cacodemon. This either shoots a CacodemonBall or if the target is sufficiently close performs a melee attack with a base damage of 10 multiplied by a random value between 1 and 6.


The behavior of this function can be replicated by the use of A_CustomComboAttack in the following manner:

A_CustomComboAttack("CacodemonBall", 32, 10 * random(1, 6))


Note that the cacodemon doesn't come with a melee sound. Hence, the sound omission from the line above, though it can be added very easily if provided.

Examples

This example is taken straight from Doom's Cacodemon.

 Missile:
   HEAD BC 5 A_FaceTarget
   HEAD D 5 bright A_HeadAttack    // See CacodemonBall
   goto See