This entity class represents non-player characters.
QUAKED NSMonster (0 0.8 0.8) (-16 -16 0) (16 16 72) WAITTILLSEEN GAG MONSTERCLIP x PRISONER x IGNOREPLAYER WAITFORSCRIPT PREDISASTER FADECORPSE MULTIPLAYER FALLING HORDE
OVERVIEW
This entity class represents non-player characters. They have the ability to move around (or stand still) but are all capable of fighting if prompted to.
KEYS
- "targetname" : Name
- "netname" : Name used for obituaries and debug info.
- "maxs" : Bounding box mins.
- "mins" : Bounding box maxs.
KEYS - TRIGGERS
- "TriggerCondition" : See triggerCondition_t for which numerical values to pick.
- "TriggerTarget" : Will trigger this entity when TriggerCondition (triggerCondition_t) is met.
KEYS - BEHAVIOUR
- "health" : Starting health.
- "dead" : Whether to start the monster in a dead state (0 or 1).
- "team" : Alliance. See allianceState_t for which numerical values to pick.
- "speed_walk" : Walk speed in units per second.
- "speed_run" : Run speed in units per second.
- "eye_height" : Height in units at which to place the eyes from the origin. Use the cvar r_showViewCone to debug it.
- "snd_sight" : SoundDef to play upon 'alert'.
- "snd_idle" : SoundDef to play when the monster is idle.
- "idle_min" : Min idle delay in seconds.
- "idle_max" : Max idle delay in seconds.
- "snd_footstep" : Which soundDef to play when a footstep should occur.
- "snd_chatter" : An idle type soundDef to play.
- "snd_chatter_combat" : An idle type soundDef, only during combat.
- "snd_pain" : SoundDef to play when in pain.
- "snd_death" : SoundDef to play when death settles in.
- "snd_thud" : SoundDef to play when the monster falls to the ground.
KEYS - ATTACK (MELEE)
- "def_attack_melee" : Which entityDef to look into for a melee attack. [CONTINUED]
- "attack_melee_range" : Range under which melee attacks occur.
- "snd_melee_attack" : SoundDef to play when melee attacking.
- "snd_melee_attack_hit" : SoundDef to play when a successful melee attack occurs.
- "snd_melee_attack_miss" : SoundDef to play when a melee attack misses.
KEYS - ATTACK (RANGED)
- "def_attack_ranged_1" : EntityDef that contains primary ranged attack info.
- "attack_ranged1_range" : Range for the primary ranged attack.
- "def_attack_ranged_2" : EntityDef that contains secondary ranged attack info.
- "attack_ranged2_range" : Range for the secondary ranged attack.
- "snd_ranged_attack" : SoundDef to play upon ranged attack.
- "reload_count" : how many ranged attacks until reload. Only affects primary ranged attacks.
- "reload_delay" : Time between reloads in seconds. Requires
reload_count
to be set > 0.
- "snd_reload" : SoundDef to play when reloading.
- "reserve_ammo" : The amount of reserve ammo. -1 is infinite (default)
- "attack_cone" : Cone in which to attack.
- "attack_accuracy" : Accuracy (or rather, lack of) multiplier.
KEYS - ATTACK (SPECIAL)
- "def_attack_special_1" : EntityDef that contains primary special attack info. Intended for projectiles.
- "attack_special1_range" : Range for the primary special attack.
- "num_projectiles" : The number of primary special projectiles to shoot.
- "projectile_spread" : Spread of the projectiles. 0 is none. 1 is the max.
- "projectile_delay" : Delay in seconds until a special attack projectile is thrown.
- "weapon_drawn" : Whether or not the weapon is drawn by default. Either 0 or 1.
- "body_on_draw" : Which bodygroup to switch to when the monster has drawn its weapon.
- "leap_damage" : Amount of damage appled when the enemy leaps towards you and hits.
SPAWNFLAGS
- WAITTILLSEEN (1) - Play scripted sequence only once the monster gets seen by a player.
- GAG (2) - Won't speak.
- MONSTERCLIP (4) - Interacts with monsterclips?
- PRISONER (16) - Never used.
- IGNOREPLAYER (64) - Ignores the player. Like 'notarget'.
- WAITFORSCRIPT (128) - Does nothing, until a scripted sequence runs on the monster. Then becomes alive.
- PREDISASTER (256) - Special flag used in Half-Life.
- FADECORPSE (512) - Corpse will disappear on its own.
- MULTIPLAYER (1024) - Available in multiplayer.
- FALLING (2048) - Will not drop to the floor upon level spawn - but fall when in-game.
- HORDE (4096) - Never used.
|
void | NSMonster (void) |
|
virtual void | Save (float) |
| Handles saving a copy of this entity to a given filehandle. More...
|
|
virtual void | Restore (string, string) |
| Similar to NSIO::SpawnKey but for save-game fields. More...
|
|
virtual void | EvaluateEntity (void) |
| Run each tic after physics are run to determine if we need to send updates over the network. More...
|
|
virtual float | SendEntity (entity, float) |
| Called by the engine whenever we need to send a client an update about this entity. More...
|
|
virtual void | Touch (entity) |
| Called whenever we're touching another entity. More...
|
|
virtual void | Spawned (void) |
| Called when the entity is fulled initialized. More...
|
|
virtual void | Respawn (void) |
| Server: Called when the entity first spawns or when game-logic requests the entity to return to its original spawn state. More...
|
|
virtual void | Input (entity, string, string) |
| Called when we are being prompted by another object/function with an input message. More...
|
|
virtual void | Pain (entity, entity, int, vector, vector, int) |
| Called whenever the entity receives damage. More...
|
|
virtual void | Death (entity, entity, int, vector, vector, int) |
| Called when the health is equal or below 0. More...
|
|
virtual void | Physics (void) |
|
virtual void | Gib (int, vector) |
|
virtual void | Sound (string) |
|
virtual void | SpawnKey (string, string) |
| This method handles entity key/value pairs on map load. More...
|
|
virtual void | RunAI (void) |
| Internal use only. More...
|
|
virtual void | IdleNoise (void) |
| Overridable: Called after a while when they've got nothing to do. More...
|
|
virtual void | FallNoise (void) |
| Overridable: Called when they start falling. More...
|
|
virtual void | AlertNoise (void) |
| Overridable: Called when this monster gets 'alerted' to something new. More...
|
|
virtual bool | IsAlive (void) |
| Returns if they're considered alive. More...
|
|
virtual bool | IsFriend (int) |
| Returns whether they are allied with the type in question. More...
|
|
virtual void | HasBeenKilled (void) |
| Overridable: Called once, when the monster has died. More...
|
|
virtual void | HasBeenHit (void) |
| Overridable: Called every time the monster is hurt, while still alive. More...
|
|
virtual void | HasBeenGibbed (void) |
|
virtual void | HasBeenAlerted (void) |
|
virtual void | SeeThink (void) |
| Internal use only. More...
|
|
virtual float | SeeFOV (void) |
| Overridable: Returns the field of view in degrees. More...
|
|
virtual void | AlertNearby (void) |
| FIXME: Same as WarnAllies/StartleAllies? WTF? More...
|
|
virtual float | GetWalkSpeed (void) |
| Overridable: Returns the walking speed in Quake units per second. More...
|
|
virtual float | GetChaseSpeed (void) |
| Overridable: Returns the chase speed in Quake units per second. More...
|
|
virtual float | GetRunSpeed (void) |
| Overridable: Returns the running speed in Quake units per second. More...
|
|
virtual float | GetYawSpeed (void) |
| Overridable: Returns the turning speed in euler-angle units per second. More...
|
|
virtual void | AttackDraw (void) |
| Overridable: Called when they're drawing a weapon. More...
|
|
virtual void | AttackHolster (void) |
| Overridable: Called when they're holstering a weapon. More...
|
|
virtual void | AttackThink (void) |
| Overridable: Called when aiming their weapon. More...
|
|
virtual int | AttackMelee (void) |
| Overridable: Called when attempting to melee attack. More...
|
|
virtual int | AttackRanged (void) |
| Overridable: Called when attempting to attack from a distance. More...
|
|
nonvirtual void | PerformAttack (string) |
|
virtual float | MeleeMaxDistance (void) |
| Overridable: Returns the distance in qu of what'll be a successfull melee attack. More...
|
|
virtual bool | MeleeCondition (void) |
| Returns whether or not we should attempt a melee attack. More...
|
|
nonvirtual bool | IsValidEnemy (entity) |
| Returns TRUE if 'enemy' should be considered a valid target for killing. More...
|
|
virtual bool | IsOnRoute (void) |
| Returns TRUE if the monster is currently on route to a position. More...
|
|
virtual void | FreeState (void) |
| Internal use only. More...
|
|
virtual void | FreeStateMoved (void) |
| Internal use only. More...
|
|
virtual void | FreeStateDead (void) |
| Internal use only. More...
|
|
virtual void | RouteEnded (void) |
| Internal use only. More...
|
|
virtual void | WalkRoute (void) |
| Internal use only. More...
|
|
virtual void | SeenPlayer (NSActor) |
| Called when a player is seen by the monster. More...
|
|
virtual void | SeenEnemy (NSActor) |
| Called when an enemy is seen by the monster. More...
|
|
virtual void | SeenFriend (NSActor) |
| Called when a friend is seen by the monster. More...
|
|
nonvirtual int | GetSequenceState (void) |
| Returns the type of sequence they're currently in. More...
|
|
nonvirtual bool | InSequence (void) |
| Returns if they're currently in a scripted sequence. More...
|
|
virtual int | AnimIdle (void) |
| DEPRECATED, Overridable: Called when we need to play a fresh idle framegroup. More...
|
|
virtual int | AnimWalk (void) |
| DEPRECATED, Overridable: Called when we need to play a fresh walking framegroup. More...
|
|
virtual int | AnimRun (void) |
| DEPRECATED, Overridable: Called when we need to play a fresh running framegroup. More...
|
|
virtual void | AnimPlay (float) |
| Call to play a single animation onto it, which cannot be interrupted by movement. More...
|
|
virtual void | AnimationUpdate (void) |
| Internal use only. More...
|
|
nonvirtual bool | InAnimation (void) |
| Returns if we're currently in a forced animation sequence. More...
|
|
nonvirtual void | AnimReset (void) |
|
virtual void | StateChanged (monsterState_t, monsterState_t) |
| Called whenever the state of this NSMonster changes. More...
|
|
nonvirtual void | SetState (monsterState_t) |
| Sets the current state of this NSMonster. More...
|
|
nonvirtual monsterState_t | GetState (void) |
| Returns the current state of this NSMonster. More...
|
|
nonvirtual int | GetTriggerCondition (void) |
| Returns the condition under which they'll trigger their targets. More...
|
|
virtual void | TriggerTargets (void) |
| Call to trigger their targets manually. More...
|
|
virtual void | Trigger (entity, triggermode_t) |
| Called whenever we're legacy triggered by another object or function. More...
|
|
nonvirtual vector | GetHeadAngles (void) |
|
virtual void | customphysics (void) |
| overrides More...
|
|
virtual float | predraw (void) |
|
virtual void | ReceiveEntity (float, float) |
| Client: Handles network updates from the server for the associated entity. More...
|
|