Classes:PigPlayer

From ZDoom Wiki
Jump to navigation Jump to search
Note: Wait! Stop! You do not need to copy this actor's code into your project! Here's why:
  1. This actor is already defined in GZDoom, there's no reason to define it again.
  2. In fact, trying to define an actor with the same name will cause an error (because it already exists).
  3. If you want to make your own version of this actor, use inheritance.
  4. Definitions for existing actors are put on the wiki for reference purpose only.
Pig
Actor type Player Game MiniHexenLogoIcon.png (Hexen)
DoomEd Number None Class Name PigPlayer


Classes: PlayerPawn PigPlayer

Players hit by a porkalator shot are temporarily turned into this. Upon morphing back to their original shape, their health is reset to the default for their class (usually 100). Using the chaos device puts an end to the transformation. Not to be confused with the pig class.

DECORATE definition

ACTOR PigPlayer : PlayerPawn native
{
  Health 30
  ReactionTime 0
  PainChance 255
  Radius 16
  Height 24
  Speed 1
  +WINDTHRUST
  +NOSKIN
  -PICKUP
  PainSound "PigPain"
  DeathSound "PigDeath"
  Player.JumpZ 6
  Player.Viewheight 28
  Player.ForwardMove 0.96, 0.98
  Player.SideMove 0.95833333, 0.975
  Player.SpawnClass "Pig"
  Player.SoundClass "Pig"
  Player.DisplayName "Pig"
  Player.MorphWeapon "Snout"
  States
  {
  Spawn:
    PIGY A -1
    Stop
  See:
    PIGY ABCD 3
    Loop
  Pain:
    PIGY D 4 A_PigPain
    Goto Spawn
  Melee:
  Missile:
    PIGY A 12
    Goto Spawn
  Death:
    PIGY E 4 A_Scream
    PIGY F 3 A_NoBlocking
    PIGY G 4
    PIGY H 3
    PIGY IJK 4
    PIGY L -1
    Stop
  Ice:
    PIGY M 5 A_FreezeDeath
    PIGY M 1 A_FreezeDeathChunks
    Wait
  }
}