|
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.
|
Dark servant summoning doll
|
Actor type
|
Explosive
|
Game
|
(Hexen)
|
DoomEd Number
|
None
|
Class Name
|
SummoningDoll
|
Classes: SummoningDoll
The projectile thrown when using a Dark Servant Artifact to summon a dark servant (who is a friendly Maulotaur). If there was not enough space for a Maulotaur to spawn, it just drops the artifact itself.
|
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 SummoningDoll : Actor
{
Default
{
Speed 20;
+NOBLOCKMAP +DROPOFF +MISSILE
+NOTELEPORT
}
States
{
Spawn:
SUMN A 4;
Loop;
Death:
SUMN AA 4;
SUMN A 4 A_Summon;
Stop;
}
//============================================================================
//
// A_Summon
//
//============================================================================
void A_Summon()
{
Actor mo = Spawn("MinotaurFriend", pos, ALLOW_REPLACE);
if (mo)
{
if (mo.TestMobjLocation() == false || !tracer)
{ // Didn't fit - change back to artifact
mo.Destroy();
Actor arti = Spawn("ArtiDarkServant", Pos, ALLOW_REPLACE);
if (arti) arti.bDropped = true;
return;
}
// Careful! The Minotaur might have been replaced
// so only set the time if we got a genuine one.
MinotaurFriend m = MinotaurFriend(mo);
if (m) m.StartTime = level.maptime;
if (tracer.bCorpse)
{ // Master dead
mo.tracer = null; // No master
}
else
{
mo.tracer = tracer; // Pointer to master
Inventory power = Inventory(Spawn("PowerMinotaur"));
power.CallTryPickup(tracer);
mo.SetFriendPlayer(tracer.player);
}
// Make smoke puff
Spawn("MinotaurSmoke", Pos, ALLOW_REPLACE);
A_StartSound(mo.ActiveSound, CHAN_VOICE);
}
}
}
|
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 SummoningDoll
{
Speed 20
+NOBLOCKMAP
+DROPOFF
+MISSILE
+NOTELEPORT
action native A_Summon();
States
{
Spawn:
SUMN A 4
Loop
Death:
SUMN AA 4
SUMN A 4 A_Summon
Stop
}
}