|
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
- You do not need to copy that actor, since it is already defined.
- In fact, it's not just useless, it's actually harmful as it can cause problems.
- If you want to modify it, or use a modified version, using inheritance is the way to go.
- The actor definitions here are put on the wiki for reference purpose only. Learn from them, don't copy them.
- There is only one exception: if what you want is changing Ammo capacity, you need to create a new type from Ammo.
|
Hell Knight
|
Actor type
|
Monster
|
Game
|
(Doom2)
|
DoomEd Number
|
69
|
Class Name
|
HellKnight
|
Spawn ID
|
113
|
Identifier
|
T_HELLKNIGHT
|
Classes: BaronOfHell→HellKnight
→StealthHellKnight
Hell Knights are a satyr-like monster similar to the Baron of Hell. Like the Baron, their primary attack is a green fireball. However, they only have half as much health as their big brothers.
|
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 HellKnight : BaronOfHell
{
Default
{
Health 500;
-BOSSDEATH;
SeeSound "knight/sight";
ActiveSound "knight/active";
PainSound "knight/pain";
DeathSound "knight/death";
HitObituary "$OB_KNIGHTHIT";
Obituary "$OB_KNIGHT";
Tag "$FN_HELL";
}
States
{
Spawn:
BOS2 AB 10 A_Look;
Loop;
See:
BOS2 AABBCCDD 3 A_Chase;
Loop;
Melee:
Missile:
BOS2 EF 8 A_FaceTarget;
BOS2 G 8 A_BruisAttack;
Goto See;
Pain:
BOS2 H 2;
BOS2 H 2 A_Pain;
Goto See;
Death:
BOS2 I 8;
BOS2 J 8 A_Scream;
BOS2 K 8;
BOS2 L 8 A_NoBlocking;
BOS2 MN 8;
BOS2 O -1;
Stop;
Raise:
BOS2 O 8;
BOS2 NMLKJI 8;
Goto See;
}
}
A_BruisAttack is defined only once in GZDoom (since both Baron of Hell and Hell Knight are in the same file), this is repeated here for illustration purposes.
extend class Actor
{
void A_BruisAttack()
{
let targ = target;
if (targ)
{
if (CheckMeleeRange())
{
int damage = random[pr_bruisattack](1, 8) * 10;
A_StartSound ("baron/melee", CHAN_WEAPON);
int newdam = target.DamageMobj (self, self, damage, "Melee");
targ.TraceBleed (newdam > 0 ? newdam : damage, self);
}
else
{
// launch a missile
SpawnMissile (target, "BaronBall");
}
}
}
}
|
Note: This is legacy code, kept here for reference only. DECORATE is still supported but no longer used by GZDoom. GZDoom internally uses the ZScript definition above.
|
ACTOR HellKnight : BaronOfHell
{
Health 500
-BOSSDEATH
SeeSound "knight/sight"
ActiveSound "knight/active"
PainSound "knight/pain"
DeathSound "knight/death"
HitObituary "$OB_KNIGHTHIT"
Obituary "$OB_KNIGHT"
States
{
Spawn:
BOS2 AB 10 A_Look
Loop
See:
BOS2 AABBCCDD 3 A_Chase
Loop
Melee:
Missile:
BOS2 EF 8 A_FaceTarget
BOS2 G 8 A_BruisAttack
Goto See
Pain:
BOS2 H 2
BOS2 H 2 A_Pain
Goto See
Death:
BOS2 I 8
BOS2 J 8 A_Scream
BOS2 K 8
BOS2 L 8 A_NoBlocking
BOS2 MN 8
BOS2 O -1
Stop
Raise:
BOS2 O 8
BOS2 NMLKJI 8
Goto See
}
}