Nuclide
Software Development Kit for id Technology
|
NSSquadMonster based NPCs are able to communicate strategies together.
Public Member Functions | |
void | NSSquadMonster (void) |
virtual void | Spawned (void) |
Called when the entity is fulled initialized. More... | |
virtual void | SpawnKey (string, string) |
This method handles entity key/value pairs on map load. More... | |
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 | HasBecomeSquadLeader (void) |
Overridable: Called when this NPC became squad leader. More... | |
virtual void | HasJoinedSquad (void) |
Overridable: Called when this NPC joined a squad. More... | |
nonvirtual bool | InSquad (void) |
Returns true/false if they're in a squad. More... | |
nonvirtual bool | IsSquadLeader (void) |
Returns whether or not they're the squad leader. More... | |
nonvirtual NSSquadMonster | GetSquadLeader (void) |
Returns the leader of their squad. More... | |
nonvirtual void | FindSquadNearMe (float) |
Will find and attach to a Squad in the specified radius. More... | |
nonvirtual void | AddToSquad (NSSquadMonster) |
Will add the specified NPC to this entity's current squad. More... | |
nonvirtual void | RemoveFromSquad (NSSquadMonster) |
Will remove the specified NPC from this entity's current squad. More... | |
nonvirtual NSSquadMonster | GetNearestSquadMember (void) |
Returns the nearest available member of its squad. More... | |
nonvirtual NSSquadMonster | GetFarthestSquadMember (void) |
Returns the farthest available member of its squad. More... | |
void NSSquadMonster::NSSquadMonster | ( | void | ) |
void NSSquadMonster::AddToSquad | ( | NSSquadMonster | addMember | ) |
Will add the specified NPC to this entity's current squad.
void NSSquadMonster::FindSquadNearMe | ( | float | searchRadius | ) |
Will find and attach to a Squad in the specified radius.
NSSquadMonster NSSquadMonster::GetFarthestSquadMember | ( | void | ) |
Returns the farthest available member of its squad.
NSSquadMonster NSSquadMonster::GetNearestSquadMember | ( | void | ) |
Returns the nearest available member of its squad.
NSSquadMonster NSSquadMonster::GetSquadLeader | ( | void | ) |
Returns the leader of their squad.
Invalid if none.
|
virtual |
Overridable: Called when this NPC became squad leader.
|
virtual |
Overridable: Called when this NPC joined a squad.
bool NSSquadMonster::InSquad | ( | void | ) |
Returns true/false if they're in a squad.
bool NSSquadMonster::IsSquadLeader | ( | void | ) |
Returns whether or not they're the squad leader.
void NSSquadMonster::RemoveFromSquad | ( | NSSquadMonster | toRemove | ) |
Will remove the specified NPC from this entity's current squad.
Can be called on self.
|
virtual |
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 NSMonster.
Reimplemented in ambient_generic, speaker, and NSTalkMonster.
|
virtual |
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 NSMonster.
Reimplemented in ambient_generic, speaker, and NSTalkMonster.
|
virtual |
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 NSMonster.
Reimplemented in ambient_generic, and speaker.
|
virtual |
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 NSMonster.
Reimplemented in ambient_generic, speaker, and NSTalkMonster.