Legacy:Monster - Unreal Wiki

# Legacy:Monster

### From Unreal Wiki, The Unreal Engine Documentation Site

UT2003 :: Actor >> Pawn >> UnrealPawn >> xPawn >> Monster (Package: SkaarjPack)

This is the parent class for all NPC Monsters in UT200x. These monsters are used in the Invasion gametype.

## Properties

All properties are hidden.

bool bMeleeFighter
bool bShotAnim
bool bCanDodge
bool bVictoryNext
bool bTryToWalk
bool bBoss
bool bAlwaysStrafe
float DodgeSkillAdjust
sound HitSound[4]
sound DeathSound[4]
sound ChallengeSound[4]
sound FireSound
class<Ammunition> AmmunitionClass
Ammunition MyAmmo
int ScoringValue
FireProperties SavedFireProperties

## Functions

### Combat Interface

RangedAttack( Actor A )
  EMPTY
bool CanAttack( Actor A )
  EMPTY
StopFiring()
  EMPTY
bool SplashDamage()
  EMPTY
float GetDamageRadius()
  EMPTY
bool RecommendSplashDamage()
  EMPTY

### Other

TurnOff() (simulated)
  If Health is more than zero, set bVictoryNext to true (endgame?)
bool ForceDefaultCharacter() (simulated)
  Returns false to prevent replacing monsters with default character.
bool IsHeadShot( vector loc, vector ray, float AdditionalScale )
  If `Super.IsHeadShot()` returns true, this returns true if headshot.
Fire( optional float F )
  After finding the actor BestTarget through `Controller.PickTarget()`, calls `RangedAttack(BestTarget)`.
bool PreferMelee()
  Returns value of `bMeleeFighter`.
bool HasRangedAttack()
  EMPTY
float RangedAttackTime()
  EMPTY
vector GetFireStart( vector X, vector Y, vector Z )
  Returns the Location of the weapon fire start.
FireProjectile()
  Fills SavedFireProperties properties using MyAmmo as a base, then spawns the weapons fire and calls `PlaySound(FireSound,SLOT_Interact)`.
SpawnGiblet( class<Gib> GibClass, vector Location, rotator Rotation, float GibPerterbation ) (simulated)
  If GibClass exists and `GameInfo.UseLowGore()` returns false, spawns GibClass gibs, sets the gib scale and velocity.
LandThump()
  If Physics is PHYS_None, calls `PlaySound(sound'Thump')`.
bool SameSpeciesAs( Pawn P )
  Returns true if P and this Monster are of the same class (or subclass).
AssignInitialPose() (simualted)
  Calls `TweenAnim(MovementAnims[0],0.0)`.
PlayChallengeSound()
  Calls `PlaySound(ChallengeSound[Rand(4)],SLOT_Talk)`.
Destroyed()
  Destroys MyAmmo (if any) before calling `Super.Destroyed()`.
PlayVictory()
  EMPTY
AnimEnd( int Channel ) (simulated)
  Calls `PlayVictory()` if bVictoryNext is true and Physics is not PHYS_Falling, otherwise sets bShotAnim and Controller.bPreparingMove to false. Calls `Super.AnimEnd(Channel)`.
SetMovementPhysics()
  Calls `SetPhysics(PHYS_Falling)`.
bool IsPlayerPawn()
  Returns true so it can use Movers.
PlayTakeHit( vector HitLocation, int Damage, class<DamageType> DamageType )
  If not sooner than MinTimeBetweenPainSounds, sets LastPainSound and calls `PlaySound(HitSound[Rand(4)], SLOT_Pain,2*TransientSoundVolume,,400)`.
PlayDying( class<DamageType> DamageType, vector HitLoc ) (simulated)
  Sets bCanTeleport and bReplicateMovement to false, sets bTearOff and bPlayedDeath to true. Sets Lifespan to RagdollLifeSpan and switches state to "Dying". Adds TearOffMomentum to Velocity, sets default BaseEyeHeight, calls `SetInvisibility(0.0)`, `PlayDirectionalDeath(HitLoc)` and `SetPhysics(PHYS_Falling)`.
PlayDyingSound()
  If bGibbed, calls `PlaySound(GibGroupClass.static.GibSound(), SLOT_Pain,2.5*TransientSoundVolume,true,500)`. Calls `PlaySound(DeathSound[Rand(4)], SLOT_Pain,2.5*TransientSoundVolume, true,500)`.
bool MeleeDamageTarget( int hitdamage, vector pushdir )
  Uses a Trace function to determine if Controller.Target is within melee range and returns true if it is.
PlayVictoryAnimation()
  Sets bVictoryNext to true.
CreateGib( name boneName, class<DamageType> DamageType, rotator r )
  If `GameInfo.UseLowGore()` returns false, fills HitFX[] properties with an additional array member.
ProcessHitFX() (simulated)
  If `Level.NetMode` is not a DedicatedServer and `GameInfo.UseLowGore()` returns false, spawns gibs for each valid part of the Monster.
StartDeRes() (simulated)
  If `Level.NetMode` is not a DedicatedServer, sets full AmbientGlow, zero MaxLights, Skins to DeResMat0 and DeResMat1, Collision to none, removes and disallows projectors, deactivates the player shadow, calls `RemoveFlamingEffects()`, removes any material overlays and sets bDeRes to true.

## Events

PostBeginPlay()
  After `Super.PostBeginPlay()`, spawns Controller from ControllerClass, calls `Controller.Possess(self)`, spawns MyAmmo from AmmunitionClass.
SetAnimAction( name NewAction ) (simulated)
  If bWaitForAnim is false and Level.NetMode is NM_Client, set AnimAction to NewAction and then if `PlayAnim(AnimAction,,0.1)` returns true and `(Physics != PHYS_None)`, then set bWaitForAnim to true.

## States

### Dying

  Ignores the following: AnimEnd, Trigger, Bump, HitWall, HeadVolumeChange, PhysicsVolumeChange, Falling and BreathTimer.

#### Functions

Landed()
  Calls `SetPhysics(PHYS_None)` and if `IsAnimating(0)` returns false, calls LandThump() before calling `Super.Landed(HitNormal)`.
Timer()
  Checks to see if `PlayerCanSeeMe()` returns false to call `Destroy()`, otherwise if `(LifeSpan <= DeResTime)` and bDeRes is false, it calls `StartDeRes()`, otherwise is calls `SetTimer(1.0, false)`.

## Known Subclasses

Note: In UT, all Monsters are a subclass of ScriptedPawn.

    Monster
        +- Brute
        |    +- LesserBrute (UT only)
        |    +- Behemoth
        +- Gasbag
        +- Krall
        |    +- EliteKrall
        +- Manta
        +- Fly (aka Razorfly)
        +- Skaarj
        |    +- FireSkaarj (UT2004 only)
        |    +- IceSkaarj (UT2004 only)
        |    +- SkaarjTrooper (UT only)
        |    |   +- SkaarjGunner
        |    |   +- SkaarjInfantry
        |    |   +- SkaarjOfficer
        |    |   +- SkaarjSniper
        |    +- SkaarjWarrior (UT only)
        |        +- IceSkaarj
        |        +- SkaarjAssassin
        |        +- SkaarjBeserker
        |        +- SkaarjLord
        |        +- SkaarjScout
        +- Pupae (aka SkaarjPupae)
        +- Warlord

## Related Topics

- MonsterController
- Invasion – The GameInfo class that handles Monsters in UT200x
- Artificial Intelligence – Super topic for all AI (bots, NPCs, etc)
  - Monster Support – Hub for monster support
  - NPC Support – Design and creation of custom NPCs

## Discussion

SuperApe: Created.

Categories: Legacy Class (UT2003) | Legacy Class (UT2004) | Legacy Class Tree

##### Views

- Legacy
- Discussion
- Current revision

##### Search