Getting Entities¶
There are a multitude of selectors to get specific kinds of entities.
Creating entities is documented here.
Players¶
array
Get array of all players
array
Get array of all players by class, team within dist. team -1 for any team, "any"
for any class, otherwise "titan"
or "pilot"
, -1 for any dist
array
Get array of all players that are in a team
array
Get array of all players that are not allied with the team
array
Get array of all players that are alive
array
Get array of all players in a team that are alive
array
array
Get array of all players that are not titans
array
array
array
array
array
array
Connecting Players¶
array
Get array of all players, even ones who are connecting
int GetPendingClientsCount()
Titans¶
Get all players in a titan and souls.
array
array
array
array
int GetTitanCountForTeam( int team )
int GetTeamPlayerCount( int team )
NPCs & Props¶
int GetSurfacePropForEntity( entity ent )
entity GetEntByIndex( int index )
array
array
array
array
Get array of all NPCs by class, team, within dist. team -1 for any team, "any"
for any class, otherwise "titan"
or "pilot"
, -1 for any dist
GetNPCArrayWithSubclassEx( string classname, int onSameTeamAsNum, int enemiesOfTeamNum, vector origin, float maxdist, array
Get array of all NPCs by class, team, and subclass (array), within dist. team -1 for any team, "'any"
for any class, -1 for any dist
array
Get array of all NPCs of class
array
Get array of all NPCs of class and subclass
Projectiles¶
array
array
Get array of all NPCs by class, team, within dist. team -1 for any team, "any"
for any class, otherwise "titan"
or "pilot"
, -1 for any dist
Find Entities¶
entity Entities_First()
entity Entities_Next( entity ent )
entity Entities_FindByClassname( entity ent, string className )
entity Entities_FindByName( entity ent, string name )
entity Entities_FindInSphere( entity ent, vector sphereDir, float radius )
entity Entities_FindByTarget( entity ent, string target )
entity Entities_FindByNameNearest( string name, vector dir, float length )
entity Entities_FindByNameWithin( entity ent, string name, vector v, float len )
entity Entities_FindByClassnameNearest( string className, vector v, float f )
entity Entities_FindByClassnameWithin( entity ent, string className, vector v, float f )
entity GetEntByScriptName( string name )
entity GetEntByScriptNameInInstance( string name, string instanceName )
entity GetTeamEnt( int team )
Get Multiple Entites¶
array
Get array of entitites matching a name
array
Get array of entities matching a name with support for *
array
Get array of entities matching a class
array
Get array of entities matching a class with support for *
array
Get array of entities matching a script name
array
Get array of entities matching a script name and instance
array
Get weapons in the world