Classes:ScriptedMarine

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.
Marine
Actor type Monster Game MiniDoomLogoIcon.png
DoomEd Number 9100 Class Name ScriptedMarine
Spawn ID 151 Identifier T_SCRIPTEDMARINE


Classes: ScriptedMarine
 →MarineBFG
 →MarineBerserk
 →MarineChaingun
 →MarineChainsaw
 →MarineFist
 →MarinePistol
 →MarinePlasma
 →MarineRailgun
 →MarineRocket
 →MarineSSG
 →MarineShotgun

The Scripted Marine is a duplication of the Doom player which can be controlled via scripting during cutscenes or gameplay, to simulate the player or other marines wearing the same armor. Though the actor has several attacks coded, he does not actually ever use any by default. These attack states are used, however, by its children classes.

As with all marines, you can use the special ACS functions SetMarineSprite and SetMarineWeapon to change this actor's appearance and weapon.

DECORATE definition

ACTOR ScriptedMarine native
{
  Health 100
  Radius 16
  Height 56
  Mass 100
  Speed 8
  PainChance 160
  Monster
  -COUNTKILL
  Translation 0
  Damage 100
  DeathSound "*death"
  PainSound "*pain50"

  action native A_M_Refire(bool ignoremissile=false);
  action native A_M_CheckAttack();
  action native A_MarineChase();
  action native A_MarineLook();
  action native A_MarineNoise();
  action native A_M_Punch(int force);
  action native A_M_SawRefire();
  action native A_M_FirePistol(bool accurate);
  action native A_M_FireShotgun();
  action native A_M_FireShotgun2();
  action native A_M_FireCGun(bool accurate);
  action native A_M_FireMissile();
  action native A_M_FirePlasma();
  action native A_M_FireRailgun();
  action native A_M_BFGSound();
  action native A_M_FireBFG();

  States
  {
  Spawn:
    PLAY A 4 A_MarineLook
    PLAY A 4 A_MarineNoise
    Loop
  Idle:
    PLAY A 4 A_MarineLook
    PLAY A 4 A_MarineNoise
    PLAY A 4 A_MarineLook
    PLAY B 4 A_MarineNoise
    PLAY B 4 A_MarineLook
    PLAY B 4 A_MarineNoise
    Loop
  See:
    PLAY ABCD 4 A_MarineChase
    Loop

  Melee.Fist:
    PLAY E 4 A_FaceTarget
    PLAY E 4 A_M_Punch(1)
    PLAY A 9
    PLAY A 0 A_M_Refire(1)
    Loop
    PLAY A 5 A_FaceTarget
    Goto See
  Melee.Berserk:
    PLAY E 4 A_FaceTarget
    PLAY E 4 A_M_Punch(10)
    PLAY A 9
    PLAY A 0 A_M_Refire(1)
    Loop
    PLAY A 5 A_FaceTarget
    Goto See
  Melee.Chainsaw:
    PLAY E 4 A_MarineNoise
    PLAY E 4 A_M_Saw
    PLAY E 0 A_M_SawRefire
    Goto Melee.Chainsaw+1
    PLAY A 0
    Goto See

  Missile:
  Missile.None:
    PLAY E 12 A_FaceTarget
    Goto Idle
    PLAY F 6 Bright
    Loop
  Missile.Pistol:
    PLAY E 4 A_FaceTarget
    PLAY F 6 Bright A_M_FirePistol(1)
    PLAY A 4 A_FaceTarget
    PLAY A 0 A_M_Refire
    PLAY A 5
    Goto See
  Fireloop.Pistol:
    PLAY F 6 Bright A_M_FirePistol(0)
    PLAY A 4 A_FaceTarget
    PLAY A 0 A_M_Refire
    Goto Fireloop.Pistol
    PLAY A 5
    Goto See
  Missile.Shotgun:
    PLAY E 3 A_M_CheckAttack
    PLAY F 7 Bright A_M_FireShotgun
    Goto See
  Missile.SSG:
    PLAY E 3 A_M_CheckAttack
    PLAY F 7 Bright A_M_FireShotgun2
    Goto See
  Missile.Chaingun:
    PLAY E 4 A_FaceTarget
    PLAY FF 4 Bright A_M_FireCGun(1)
    PLAY FF 4 Bright A_M_FireCGun(0)
    PLAY A 0 A_M_Refire
    Goto Missile.Chaingun+3
    PLAY A 0
    Goto See
  Missile.Rocket:
    PLAY E 8
    PLAY F 6 Bright A_M_FireMissile
    PLAY E 6
    PLAY A 0 A_M_Refire
    Loop
    PLAY A 0
    Goto See
  Missile.Plasma:
    PLAY E 2 A_FaceTarget
    PLAY E 0 A_FaceTarget
    PLAY F 3 Bright A_M_FirePlasma
    PLAY A 0 A_M_Refire
    Goto Missile.Plasma+1
    PLAY A 0
    Goto See
  Missile.Railgun:
    PLAY E 4 A_M_CheckAttack
    PLAY F 6 Bright A_M_FireRailgun
    Goto See
  Missile.BFG:
    PLAY E 5 A_M_BFGSound
    PLAY EEEEE 5 A_FaceTarget
    PLAY F 6 Bright A_M_FireBFG
    PLAY A 4 A_FaceTarget
    PLAY A 0 A_M_Refire
    Loop
    PLAY A 0
    Goto See

  SkipAttack:
    PLAY A 1
    Goto See
  Pain:
    PLAY G 4
    PLAY G 4 A_Pain
    Goto Idle
  Death:
    PLAY H 10
    PLAY I 10 A_Scream
    PLAY J 10 A_NoBlocking
    PLAY KLM 10
    PLAY N -1
    Stop
  XDeath:
    PLAY O 5
    PLAY P 5 A_XScream
    PLAY Q 5 A_NoBlocking
    PLAY RSTUV 5
    PLAY W -1
    Stop
  Raise:
    PLAY MLKJIH 5
    Goto See
  }
}