Limited support
This feature is only present in Portal 2: Community Edition and Portal: Revolution.

CEntities

CreateByClassname

Creates an entity by classname.

handle CEntities::CreateByClassname(string className)

DispatchSpawn

Calls the Spawn function for the specified entity.

void CEntities::DispatchSpawn(entity ent)

FindByClassname

Find entities by class name. Pass null to start an iteration, or reference to a previously found entity to continue a search.

handle CEntities::FindByClassname(entity previous, string className)

FindByClassnameNearest

Find entities by class name nearest to a point.

handle CEntities::FindByClassnameNearest(string className, Vector position, float radius)

FindByClassnameWithin

Find entities by class name within a radius. Pass null to start an iteration, or reference to a previously found entity to continue a search.

handle CEntities::FindByClassnameWithin(entity previous, string className, Vector position, float radius)

FindByModel

Find entities by model name. Pass null to start an iteration, or reference to a previously found entity to continue a search.

handle CEntities::FindByModel(entity previous, string modelName)

FindByName

Find entities by name. Pass null to start an iteration, or reference to a previously found entity to continue a search.

handle CEntities::FindByName(entity previous, string targetName)

FindByNameNearest

Find entities by name nearest to a point.

handle CEntities::FindByNameNearest(string targetName, Vector position, float radius)

FindByNameWithin

Find entities by name within a radius. Pass null to start an iteration, or reference to a previously found entity to continue a search.

handle CEntities::FindByNameWithin(entity previous, string targetName, Vector position, float radius)

FindByTarget

Find entities by which target the specified name. Pass null to start an iteration, or reference to a previously found entity to continue a search.

handle CEntities::FindByTarget(entity previous, string target)

FindInSphere

Find entities within a radius. Pass null to start an iteration, or reference to a previously found entity to continue a search.

handle CEntities::FindInSphere(entity previous, Vector center, float radius)

First

Begin an iteration over the list of entities.

handle CEntities::First()

GetByIndex

Returns handle to entity based on its ent index. The index is 1-based.

handle CEntities::GetByIndex(int index)

Next

Continue an iteration over the list of entities, providing reference to a previously found entity.

handle CEntities::Next(entity previous)