A_LightningZap

From ZDoom Wiki
Jump to: navigation, search

A_LightningZap
(no parameters)

Decreases the calling actor's health by 8 points, and sets it in its Death state if it becomes null or negative.

Otherwise, spawns an actor of the calling actor's missile type (by default, LightningZap) ten map units above a FLOORHUGGER calling actor or below one that doesn't have that flag set, and horizontally within half the calling actor's radius from its center.

The spawned projectile is given the same horizontal speed as the calling actor, the same target as well, and uses the calling actor as its lastenemy field. It is given a vertical velocity of 20 units, upwards (positive) if the calling actor has the FLOORHUGGER flag, downwards otherwise.

If the calling actor has the FLOORHUGGER flag, it has a 62.5% chance of playing its active sound on the BODY channel.

This codepointer is restricted to LightningCeiling and derived classes.