Nuclide
Software Development Kit for id Tech
|
This entity class represents non-player characters. More...
#include <NSMonster.h>
Public Member Functions | |
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, int) |
Called whenever the entity receives damage. More... | |
virtual void | Death (entity, entity, int, vector, int) |
Called when the health is equal or below 0. More... | |
virtual void | Physics (void) |
virtual void | Gib (void) |
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... | |
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... | |
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 float | FramegroupForAct (float) |
Overridable: Returns which framegroup to play for a given ACT. More... | |
nonvirtual void | ActPlay (float) |
Call to play an ACT on the given NSMonster. 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... | |
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... | |
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
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.
reload_count
to be set > 0.Overridable: Called when this monster gets 'alerted' to something new.
Internal use only.
Run every frame to update animation parameters.
|
virtual |
DEPRECATED, Overridable: Called when we need to play a fresh idle framegroup.
Call to play a single animation onto it, which cannot be interrupted by movement.
|
virtual |
DEPRECATED, Overridable: Called when we need to play a fresh running framegroup.
|
virtual |
DEPRECATED, Overridable: Called when we need to play a fresh walking framegroup.
Overridable: Called when they're holstering a weapon.
|
virtual |
Overridable: Called when attempting to melee attack.
Return 0 if impossible.
|
virtual |
Overridable: Called when attempting to attack from a distance.
Return 0 if impossible.
|
virtual |
Called when the health is equal or below 0.
Reimplemented from NSSurfacePropEntity.
Run each tic after physics are run to determine if we need to send updates over the network.
Reimplemented from NSSurfacePropEntity.
Reimplemented in ambient_generic, and speaker.
Overridable: Returns which framegroup to play for a given ACT.
Internal use only.
Called when a sequence is done and we leave a corpse.
Overridable: Returns the chase speed in Quake units per second.
Overridable: Returns the running speed in Quake units per second.
int NSMonster::GetSequenceState | ( | void | ) |
Returns the type of sequence they're currently in.
monsterState_t NSMonster::GetState | ( | void | ) |
Returns the current state of this NSMonster.
int NSMonster::GetTriggerCondition | ( | void | ) |
Returns the condition under which they'll trigger their targets.
Overridable: Returns the walking speed in Quake units per second.
Overridable: Returns the turning speed in euler-angle units per second.
Overridable: Called every time the monster is hurt, while still alive.
Overridable: Called after a while when they've got nothing to do.
bool NSMonster::InAnimation | ( | void | ) |
Returns if we're currently in a forced animation sequence.
Called when we are being prompted by another object/function with an input message.
Reimplemented from NSSurfacePropEntity.
Reimplemented in ambient_generic.
bool NSMonster::InSequence | ( | void | ) |
Returns if they're currently in a scripted sequence.
|
virtual |
Returns if they're considered alive.
Reimplemented from NSSurfacePropEntity.
|
virtual |
Returns whether they are allied with the type in question.
|
virtual |
Returns TRUE if the monster is currently on route to a position.
bool NSMonster::IsValidEnemy | ( | entity | enny | ) |
Returns TRUE if 'enemy' should be considered a valid target for killing.
|
virtual |
Returns whether or not we should attempt a melee attack.
FIXME: Should pass a parameter for the enemy in question instead!
Overridable: Returns the distance in qu of what'll be a successfull melee attack.
|
virtual |
Called whenever the entity receives damage.
Reimplemented from NSSurfacePropEntity.
Reimplemented from NSSurfacePropEntity.
Reimplemented in NSTalkMonster.
Client: Handles network updates from the server for the associated entity.
Reimplemented from NSSurfacePropEntity.
Reimplemented in speaker, and NSTalkMonster.
Server: Called when the entity first spawns or when game-logic requests the entity to return to its original spawn state.
Reimplemented from NSSurfacePropEntity.
Reimplemented in monster_furniture, monster_generic, ambient_generic, speaker, and NSTalkMonster.
Similar to NSIO::SpawnKey
but for save-game fields.
Whatever you write into file handles within your NSIO::Save()
method needs to be read back in here.
Reimplemented from NSActor.
Reimplemented in ambient_generic, speaker, NSSquadMonster, and NSTalkMonster.
Handles saving a copy of this entity to a given filehandle.
Within you want to use the NSIO::SaveFloat() etc. methods to write the internal member attributes to the specified file handle.
Reimplemented from NSActor.
Reimplemented in ambient_generic, speaker, NSSquadMonster, and NSTalkMonster.
Called by the engine whenever we need to send a client an update about this entity.
Reimplemented from NSSurfacePropEntity.
Reimplemented in ambient_generic, speaker, and NSTalkMonster.
void NSMonster::SetState | ( | monsterState_t | newState | ) |
Sets the current state of this NSMonster.
Called when the entity is fulled initialized.
Any spawn key/value info pairs have already been dealt with. So now we can make full decisions on the entity. Always make sure to call super::Spawned();
inside your method when overriding.
Reimplemented from NSSurfacePropEntity.
Reimplemented in ambient_generic, speaker, and NSSquadMonster.
This method handles entity key/value pairs on map load.
You can easily convert the strValue
parameter using the ReadFloat etc. methods that are part of NSIO.
Reimplemented from NSSurfacePropEntity.
Reimplemented in monster_furniture, ambient_generic, speaker, NSSquadMonster, and NSTalkMonster.
|
virtual |
Called whenever the state of this NSMonster changes.
|
virtual |
Called whenever we're touching another entity.
Reimplemented from NSTrigger.
Reimplemented in NSTalkMonster.
|
virtual |
Internal use only.
Called every frame to progress through a route.