|
Note: Wait! Stop! You do not need to copy this actor's code into your project! Here's why:
- This actor is already defined in GZDoom, there's no reason to define it again.
- In fact, trying to define an actor with the same name will cause an error (because it already exists).
- If you want to make your own version of this actor, use inheritance.
- Definitions for existing actors are put on the wiki for reference purpose only.
|
Pain Elemental
|
Actor type
|
Monster
|
Game
|
(Doom2)
|
DoomEd Number
|
71
|
Class Name
|
PainElemental
|
Spawn ID
|
115
|
Identifier
|
T_PAINELEMENTAL
|
Classes: PainElemental
Pain elementals are similar in appearance to cacodemons, but are brown and have stubby arms. The pain elemental is unique in that it does not have an attack of its own, instead it spits lost souls to do its bidding for them. Note that when a pain elemental dies, three lost souls spawn burst out of it.
In vanilla Doom, if the total number of lost souls in the level was greater than 20, the pain elemental's attack would fail, putting a limit at 21 lost souls. This did not differentiate between lost souls spawned by pain elementals and "independent" lost souls placed directly in the map. In ZDoom, this is subjected to a compatibility option, accessible through the compat_limitpain console variable or the menu system.
|
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.
|
class PainElemental : Actor
{
Default
{
Health 400;
Radius 31;
Height 56;
Mass 400;
Speed 8;
PainChance 128;
Monster;
+FLOAT
+NOGRAVITY
SeeSound "pain/sight";
PainSound "pain/pain";
DeathSound "pain/death";
ActiveSound "pain/active";
Tag "$FN_PAIN";
}
States
{
Spawn:
PAIN A 10 A_Look;
Loop;
See:
PAIN AABBCC 3 A_Chase;
Loop;
Missile:
PAIN D 5 A_FaceTarget;
PAIN E 5 A_FaceTarget;
PAIN F 5 BRIGHT A_FaceTarget;
PAIN F 0 BRIGHT A_PainAttack;
Goto See;
Pain:
PAIN G 6;
PAIN G 6 A_Pain;
Goto See;
Death:
PAIN H 8 BRIGHT;
PAIN I 8 BRIGHT A_Scream;
PAIN JK 8 BRIGHT;
PAIN L 8 BRIGHT A_PainDie;
PAIN M 8 BRIGHT;
Stop;
Raise:
PAIN MLKJIH 8;
Goto See;
}
}
|
Note: This is legacy code, kept for archival purposes only. DECORATE is deprecated in GZDoom and is completely superseded by ZScript. GZDoom internally uses the ZScript definition above.
|
ACTOR PainElemental
{
Health 400
Radius 31
Height 56
Mass 400
Speed 8
PainChance 128
Monster
+FLOAT
+NOGRAVITY
SeeSound "pain/sight"
PainSound "pain/pain"
DeathSound "pain/death"
ActiveSound "pain/active"
States
{
Spawn:
PAIN A 10 A_Look
Loop
See:
PAIN AABBCC 3 A_Chase
Loop
Missile:
PAIN D 5 A_FaceTarget
PAIN E 5 A_FaceTarget
PAIN F 5 Bright A_FaceTarget
PAIN F 0 Bright A_PainAttack
Goto See
Pain:
PAIN G 6
PAIN G 6 A_Pain
Goto See
Death:
PAIN H 8 Bright
PAIN I 8 Bright A_Scream
PAIN JK 8 Bright
PAIN L 8 Bright A_PainDie
PAIN M 8 Bright
Stop
Raise:
PAIN MLKJIH 8
Goto See
}
}