Classes:MBFHelperDog

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 will 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.
Dog
Actor type Monster Game MiniZDoomLogoIcon.png (ZDoom)
DoomEd Number 888 Class Name MBFHelperDog


Classes: MBFHelperDog

The Marines' Best Friends, who gave their name to the MBF port, intended as an alternative to coop bots. They have an extremely high amount of hit points (as many as a Hell Knight!) to compensate for their inability to pick up health items such as medikits. This makes them unbalanced if used as enemies; but despite that, they are not allied to the player by default.

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 MBFHelperDog : Actor
{
  default
  {
    Health 500;
    Speed 10;
    PainChance 180;
    Radius 12;
    Height 28;
    Mass 100;
    Monster;
    +JUMPDOWN
    ActiveSound "dog/active";
    AttackSound "dog/attack";
    DeathSound "dog/death";
    PainSound "dog/pain";
    SeeSound "dog/sight";
    Obituary "$OB_DOG";
    Tag "$FN_DOG";
  }
  States
  {
  Spawn:
    DOGS AB 10 A_Look;
    Loop;
  See:
    DOGS AABBCCDD 2 A_Chase;
    Loop;
  Melee:
    DOGS EF 8 A_FaceTarget;
    DOGS G 8 A_SargAttack;
    Goto See;
  Pain:
    DOGS H 2;
    DOGS H 2 A_Pain;
    Goto See;
  Death:
    DOGS I 8;
    DOGS J 8 A_Scream;
    DOGS K 4;
    DOGS L 4 A_Fall;
    DOGS M 4;
    DOGS N -1;
  Raise:
    DOGS NMLKJI 5;
    Goto See;
  }
}

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 MBFHelperDog
{
  Health 500
  Speed 10
  PainChance 180
  Radius 12
  Height 28
  Mass 100
  Monster
  +JUMPDOWN
  ActiveSound "dog/active"
  AttackSound "dog/attack"
  DeathSound "dog/death"
  PainSound "dog/pain"
  SeeSound "dog/sight"
  Obituary "$OB_DOG" // "%o was mauled by a dog."
  States
  {
  Spawn:
    DOGS AB 10 A_Look
    Loop
  See:
    DOGS AABBCCDD 2 A_Chase
    Loop
  Melee:
    DOGS EF 8 A_FaceTarget
    DOGS G 8 A_SargAttack
    Goto See
  Pain:
    DOGS H 2
    DOGS H 2 A_Pain
    Goto See
  Death:
    DOGS I 8
    DOGS J 8 A_Scream
    DOGS K 4
    DOGS L 4 A_Fall
    DOGS M 4
    DOGS N -1
  Raise:
    DOGS NMLKJI 5
    Goto See
  }
}