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)

DispatchSpawn

Calls the Spawn function for the specified entity

void CEntities::DispatchSpawn(handle)

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(handle, string)

FindByClassnameNearest

Find entities by class name nearest to a point.

handle CEntities::FindByClassnameNearest(string, Vector, float)

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(handle, string, Vector, float)

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(handle, string)

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(handle, string)

FindByNameNearest

Find entities by name nearest to a point.

handle CEntities::FindByNameNearest(string, Vector, float)

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(handle, string, Vector, float)

FindByTarget

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

handle CEntities::FindByTarget(handle, string)

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(handle, Vector, float)

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)

Next

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

handle CEntities::Next(handle)