From ZDoom Wiki
A_PainAttack [(string spawntype [, float angle [, int flags [, int limit )]]]]
A_DualPainAttack [(string spawntype)]
- spawntype: The type of actor to spawn. By default a LostSoul.
- angle: The angle at which the spawned actor is projected.
- flags: The following flags can be combined by using the | character between the constant names:
- PAF_NOSKULLATTACK — No skull attack: The spawned actor will not immediately call A_SkullAttack as it normally would.
- PAF_AIMFACING — Aim with current facing: The calling actor will not call A_FaceTarget before spawning the monster.
- PAF_NOTARGET — No target: The spawned actor will not adopt the calling actor's target as its own.
- limit: Spawning the given actor will fail if there are already that many on the map. 0 is unlimited. By default, the value is 21 if compat_limitpain is on and unlimited otherwise.
This example is taken straight from Doom's Pain Elemental.
Missile: PAIN DE 5 A_FaceTarget PAIN F 5 bright A_FaceTarget PAIN F 0 bright A_PainAttack // See LostSoul goto See