Classes:Merchant

From ZDoom Wiki
Jump to: navigation, 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.
Merchant
Actor type Monster Game MiniStrifeLogoIcon.png
DoomEd Number None Class Name Merchant


Classes: ActorMerchant
 →Armorer
 →BarKeep
 →Medic
 →WeaponSmith

The base class used by Weapons Merchants. He can't be talked to. Like all Merchants, though, shooting him is futile — he's invulnerable, and it will cause all hell to break loose. Just like in real life.

DECORATE definition

ACTOR Merchant
{
  Health 10000000
  PainChance 256 // a merchant should always enter the pain state when getting hurt
  Radius 20
  Height 56
  Mass 5000
  CrushPainSound "misc/pcrush"
  +SOLID
  +SHOOTABLE
  +NOTDMATCH
  +NOSPLASHALERT
  +NODAMAGE
  States
  {
  Spawn:
    MRST A 10 A_Look2
    Loop
    MRLK A 30 A_ActiveSound
    Loop
    MRLK B 30
    Loop
    MRBD ABCDEDCB 4
    MRBD A 5
    MRBD F 6
    Loop
  See:
  Pain:
    MRPN A 1
    MRPN A 2 A_AlertMonsters
    MRPN B 3 A_Pain
    MRPN C 3
    MRPN D 9 Door_CloseWaitOpen(999, 64, 960)
    MRPN C 4
    MRPN B 3
    MRPN A 3 A_ClearSoundTarget
    Goto Spawn
  Yes:
    MRYS A 20
    // Fall through
  Greetings:
    MRGT ABCDEFGHI 5
    Goto Spawn
  No:
    MRNO AB 6
    MRNO C 10
    MRNO BA 6
    Goto Greetings
  }
}