Classes:Arachnotron

From ZDoom Wiki
Jump to navigation Jump to search
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
  1. You do not need to copy that actor, since it is already defined.
  2. In fact, it's not just useless, it's actually harmful as it can cause problems.
  3. If you want to modify it, or use a modified version, using inheritance is the way to go.
  4. The actor definitions here are put on the wiki for reference purpose only. Learn from them, don't copy them.
  5. There is only one exception: if what you want is changing Ammo capacity, you need to create a new type from Ammo.
Arachnotron
Actor type Monster Game MiniDoom2LogoIcon.png (Doom2)
DoomEd Number 68 Class Name Arachnotron
Spawn ID 6 Identifier T_ARACHNOTRON


Classes: Arachnotron
 →StealthArachnotron

Arachnotrons are spider-like enemies that first appear in Doom 2. Their choice of weapon is plasma, which deals the same damage as the player's plasma rifle, although the colors are different and they do not fire as fast.


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 Arachnotron : Actor
{
	Default
	{
		Health 500;
		Radius 64;
		Height 64;
		Mass 600;
		Speed 12;
		PainChance 128;
		Monster;
		+FLOORCLIP
		+BOSSDEATH
		SeeSound "baby/sight";
		PainSound "baby/pain";
		DeathSound "baby/death";
		ActiveSound "baby/active";
		Obituary "$OB_BABY";
		Tag "$FN_ARACH";
	}
	States
	{
	Spawn:
		BSPI AB 10 A_Look;
		Loop;
	See:
		BSPI A 20;
		BSPI A 3 A_BabyMetal;
		BSPI ABBCC 3 A_Chase;
		BSPI D 3 A_BabyMetal;
		BSPI DEEFF 3 A_Chase;
		Goto See+1;
	Missile:
		BSPI A 20 BRIGHT A_FaceTarget;
		BSPI G 4 BRIGHT A_BspiAttack;
		BSPI H 4 BRIGHT;
		BSPI H 1 BRIGHT A_SpidRefire;
		Goto Missile+1;
	Pain:
		BSPI I 3;
		BSPI I 3 A_Pain;
		Goto See+1;
	Death:
		BSPI J 20 A_Scream;
		BSPI K 7 A_NoBlocking;
		BSPI LMNO 7;
		BSPI P -1 A_BossDeath;
		Stop;
	Raise:
		BSPI P 5;
		BSPI ONMLKJ 5;
		Goto See+1;
	}
}

extend class Actor
{
	void A_BspiAttack()
	{
		if (target)
		{
			A_FaceTarget();
			SpawnMissile(target, "ArachnotronPlasma");
		}
	}
	
	void A_BabyMetal()
	{
		A_StartSound("baby/walk", CHAN_BODY, CHANF_DEFAULT, 1, ATTN_IDLE);
		A_Chase();
	}
}

DECORATE definition

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 Arachnotron
{
  Health 500
  Radius 64
  Height 64
  Mass 600
  Speed 12
  PainChance 128
  Monster
  +FLOORCLIP
  +BOSSDEATH
  SeeSound "baby/sight"
  PainSound "baby/pain"
  DeathSound "baby/death"
  ActiveSound "baby/active"
  Obituary "$OB_BABY"
  States
  {
  Spawn:
    BSPI AB 10 A_Look
    Loop
  See:
    BSPI A 20
    BSPI A 3 A_BabyMetal
    BSPI ABBCC 3 A_Chase
    BSPI D 3 A_BabyMetal
    BSPI DEEFF 3 A_Chase
    Goto See+1
  Missile:
    BSPI A 20 Bright A_FaceTarget
    BSPI G 4 Bright A_BspiAttack
    BSPI H 4 Bright
    BSPI H 1 Bright A_SpidRefire
    Goto Missile+1
  Pain:
    BSPI I 3
    BSPI I 3 A_Pain
    Goto See+1
  Death:
    BSPI J 20 A_Scream
    BSPI K 7 A_NoBlocking
    BSPI LMNO 7
    BSPI P -1 A_BossDeath
    Stop
  Raise:
    BSPI P 5
    BSPI ONMLKJ 5
    Goto See+1
  }
}