A Scream

A_Scream is a code pointer used in the death animation for various monsters.

's main purpose is to play the monster's death sound. However, it includes a few minor tweaks:


 * Monsters using the zombie death sounds (DSPODTH1, DSPODTH2, DSPODTH3) will randomly pick one of the three. This ensures variation as not all zombies sound the same when they die.
 * Imps will randomly play DSBGDTH1 or DSBGDTH2 for the same reason.
 * The Cyberdemon and Spider Mastermind play their death sound effects at full volume when they die.

Uses
The  code pointer appears in the following states in Doom's state table:

Example
The following is an example of how to set the  code pointer in a Dehacked file:

Pointer 21 (Frame 34) Codep Frame = 809

Or using BEX syntax:

[CODEPTR] Frame 1234 = Scream