A_BrainScream
Jump to navigation
Jump to search
Actor A_BrainScream ()
Usage
Used by the Icon of Sin's brain to trigger multiple explosions at specific X offsets and random Z offsets in BrainishExplosion.
Examples
Death:
BBRN A 100 A_BrainScream;
BBRN AA 10;
BBRN A -1 A_BrainDie;
Stop;
Death:
BBRN A 100 A_BrainScream
BBRN AA 10
BBRN A -1 A_BrainDie
Stop
ZScript definition
Note: The ZScript definition below is for reference and may be different in the current version of GZDoom.The most up-to-date version of this code can be found on GZDoom GitHub. |
void A_BrainScream()
{
for (double x = -196; x < +320; x += 8)
{
// (1 / 512.) is actually what the original value of 128 did, even though it probably meant 128 map units.
BrainishExplosion(Vec2OffsetZ(x, -320, (1 / 512.) + random[BrainExplode](0, 255) * 2));
}
A_StartSound("brain/death", CHAN_VOICE, CHANF_DEFAULT, 1., ATTN_NONE);
}