Classes:MinotaurFriend
Note: Wait! Stop! You do not need to copy this actor's code into your project! Here's why:
|
Dark Servant | |||
---|---|---|---|
Actor type | Monster | Game | (Hexen) |
DoomEd Number | None | Class Name | MinotaurFriend |
Classes: Minotaur→MinotaurFriend
Dark servants are maulotaurs summoned through the dark servant artifact who attack the foes of his invoker. Excepted for this change of allegiance, they behave identically to Heretic's maulotaurs, but vanish in a puff of smoke when vanquished, and leave neither corpse nor items behind.
For this reason, Hexen does not have all the frames corresponding to the Maulotaur's death, and as a consequence the other sprites are labeled differently. However, ZDoom renames the Hexen attack sprites to prevent conflicts and it is thus possible to use maulotaurs in Hexen and dark servants in Heretic with all their correct animations, as long as the needed sprites are provided.
Minotaur friends use the following actor fields for specific purposes:
- StartTime
- moment it was summoned — this field is absent from other actors
- tracer
- player that summoned it
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. |
class MinotaurFriend : Minotaur
{
int StartTime;
Default
{
Health 2500;
-DROPOFF
-BOSS
-DONTMORPH
+FRIENDLY
+NOTARGETSWITCH
+STAYMORPHED
+TELESTOMP
+SUMMONEDMONSTER
RenderStyle "Translucent";
Alpha 0.3333;
DropItem "None";
}
States
{
Spawn:
MNTR A 15;
MNTR A 15 A_SetTranslucent(0.66, 0);
MNTR A 3 A_SetTranslucent(1, 0);
Goto Super::Spawn;
Idle:
Goto Super::Spawn;
Death:
Goto FadeOut;
}
//----------------------------------------------------------------------------
//
//
//
//----------------------------------------------------------------------------
override void BeginPlay ()
{
Super.BeginPlay ();
StartTime = -1;
}
override void Die (Actor source, Actor inflictor, int dmgflags, Name MeansOfDeath)
{
Super.Die (source, inflictor, dmgflags, MeansOfDeath);
if (tracer && tracer.health > 0 && tracer.player)
{
// Search thinker list for minotaur
ThinkerIterator it = ThinkerIterator.Create("MinotaurFriend");
MinotaurFriend mo;
while ((mo = MinotaurFriend(it.Next())) != null)
{
if (mo.health <= 0) continue;
// [RH] Minotaurs can't be morphed, so this isn't needed
//if (!(mo.flags&MF_COUNTKILL)) continue; // for morphed minotaurs
if (mo.bCorpse) continue;
if (mo.StartTime >= 0 && (level.maptime - StartTime) >= MAULATORTICS) continue;
if (mo.tracer != null && mo.tracer.player == tracer.player) break;
}
if (mo == null)
{
Inventory power = tracer.FindInventory("PowerMinotaur");
if (power != null)
{
power.Destroy ();
}
}
}
}
}
DECORATE definition
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 MinotaurFriend : Minotaur native { Health 2500 -DROPOFF -BOSS -DONTMORPH +FRIENDLY +NOTARGETSWITCH +STAYMORPHED +TELESTOMP +SUMMONEDMONSTER RenderStyle Translucent Alpha 0.3333 DropItem "None" States { Spawn: MNTR A 15 MNTR A 15 A_SetTranslucent(0.66, 0) MNTR A 3 A_SetTranslucent(1, 0) Goto Super::Spawn Idle: Goto Super::Spawn Death: Goto FadeOut } }