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

CBaseFilter

PassesDamageFilter

Check if the given caller and damage info pass the damage filter. The caller is the one who requests the filter result; For example, the entity being damaged when using this as a damage filter.

bool CBaseFilter::PassesDamageFilter(entity caller, CTakeDamageInfo info)

PassesFilter

Check if the given caller and entity pass the filter. The caller is the one who requests the filter result; For example, the entity being damaged when using this as a damage filter.

bool CBaseFilter::PassesFilter(entity caller, entity target)

Inherited from CBaseEntity

ConnectOutput

Adds an I/O connection that will call the named function in this entity's scope when the specified output fires.

void CBaseEntity::ConnectOutput(string output, string funcName)

Destroy

Kill this entity.

void CBaseEntity::Destroy()

DisconnectOutput

Removes the output created by ConnectOutput().

void CBaseEntity::DisconnectOutput(string output, string funcName)

EmitSound

Plays a sound from this entity.

void CBaseEntity::EmitSound(string soundName)

EyeAngles

Get eye pitch, yaw, roll as a vector.

Vector CBaseEntity::EyeAngles()

EyeLocalAngles

Get eye local pitch, yaw, roll as a vector.

Vector CBaseEntity::EyeLocalAngles()

EyePosition

Get vector to eye position - absolute coords.

Vector CBaseEntity::EyePosition()

FirstMoveChild

Returns an arbitary 'first' child for this entity, or null if this entity has no children. Use NextMovePeer() to iterate through children.

handle CBaseEntity::FirstMoveChild()

GetAngles

Get entity pitch, yaw, roll as a vector.

Vector CBaseEntity::GetAngles()

GetAngularVelocity

Get the local angular velocity - returns a vector of pitch,yaw,roll.

Vector CBaseEntity::GetAngularVelocity()

GetBoundingMaxs

Get a vector containing max bounds in local scope.

Vector CBaseEntity::GetBoundingMaxs()

GetBoundingMaxsOriented

Get a vector containing max bounds, centered on object, taking the object's orientation into account.

Vector CBaseEntity::GetBoundingMaxsOriented()

GetBoundingMins

Get a vector containing min bounds in local scape.

Vector CBaseEntity::GetBoundingMins()

GetBoundingMinsOriented

Get a vector containing min bounds, centered on object, taking the object's orientation into account.

Vector CBaseEntity::GetBoundingMinsOriented()

GetCenter

Get vector to center of object - absolute coords.

Vector CBaseEntity::GetCenter()

GetClassname

Get the classname for this entity.

string CBaseEntity::GetClassname()

GetCollisionGroup

Get the collision group, which will be a COLLISION_GROUP_* constant.

int CBaseEntity::GetCollisionGroup()

GetElasticity

Get the current elasticity value for this entity.

float CBaseEntity::GetElasticity()

GetForwardVector

Get the forward vector of the entity.

Vector CBaseEntity::GetForwardVector()

GetFriction

Get the current friction for this entity.

float CBaseEntity::GetFriction()

GetGravity

Get the current gravity for this entity, vertically.

float CBaseEntity::GetGravity()

GetHealth

Return the current health of this entity.

int CBaseEntity::GetHealth()

GetKeyValueBool

Get a KeyValue on this entity as a bool.

bool CBaseEntity::GetKeyValueBool(string name)

GetKeyValueFloat

Get a KeyValue on this entity as a float.

float CBaseEntity::GetKeyValueFloat(string name)

GetKeyValueInt

Get a KeyValue on this entity as an integer.

int CBaseEntity::GetKeyValueInt(string name)

GetKeyValueString

Get a KeyValue on this entity as a string.

string CBaseEntity::GetKeyValueString(string name)

GetLeftVector

Get the left vector of the entity.

Vector CBaseEntity::GetLeftVector()

GetMaxHealth

Return the current maximum health of this entity.

int CBaseEntity::GetMaxHealth()

GetModelKeyValues

Returns access to the $keyvalues definition for this entity's model.

handle CBaseEntity::GetModelKeyValues()

GetModelName

Returns the name of the model this entity is set to. For brush entities, this will be in the form '*123'.

string CBaseEntity::GetModelName()

GetMoveCollide

Returns the current move collision mode, which will be a MOVECOLLIDE_* constant.

int CBaseEntity::GetMoveCollide()

GetMoveParent

If in hierarchy, retrieves the entity's parent.

handle CBaseEntity::GetMoveParent()

GetMoveType

Returns the current move type, which will be a MOVETYPE_* constant.

int CBaseEntity::GetMoveType()

GetName

Get the targetname of this entity.

string CBaseEntity::GetName()

GetNamespace

Get the namespace for this entity's classname.

string CBaseEntity::GetNamespace()

GetOrigin

Get the absolute position of this entity.

Vector CBaseEntity::GetOrigin()

GetOwner

Gets this entity's owner.

handle CBaseEntity::GetOwner()

GetPreTemplateName

Get the targetname stripped of template unique decoration like name&0123.

string CBaseEntity::GetPreTemplateName()

GetRootMoveParent

If in hierarchy, walks up the hierarchy to find the root parent.

handle CBaseEntity::GetRootMoveParent()

GetScriptId

Retrieve the unique identifier used to refer to the entity within the scripting system.

string CBaseEntity::GetScriptId()

GetScriptScope

Retrieve the script-side data associated with an entity, or null if not created.

handle CBaseEntity::GetScriptScope()

GetSoundDuration

Returns float duration of the sound. The optional actor model is used to resolve $gender variables.

float CBaseEntity::GetSoundDuration(string soundName, string actorModel)

GetTeam

Get this entity's team number.

int CBaseEntity::GetTeam()

GetUpVector

Get the up vector of the entity.

Vector CBaseEntity::GetUpVector()

GetVelocity

Return this entity's absolute linear velocity.

Vector CBaseEntity::GetVelocity()

IsBSPModel

Returns if this entity is a BSP model or not (i.e. func_brush).

bool CBaseEntity::IsBSPModel()

IsFloating

Returns if this entity is floating in water or not.

bool CBaseEntity::IsFloating()

NextMovePeer

Returns the 'next' sibling for this entity, or null if all siblings were returned. Calling this repeatedly on FirstMoveChild() will give all children in turn.

handle CBaseEntity::NextMovePeer()

PrecacheModel

Ensure this model is loaded for later use. Should be called inside the Precache() method.

void CBaseEntity::PrecacheModel(string modelName)

PrecacheScriptSound

Ensure this sound is loaded for later use. Should be called inside the Precache() method.

void CBaseEntity::PrecacheScriptSound(string ?)

PrecacheSoundScript

Precache a game sound or raw sound for later playing.

void CBaseEntity::PrecacheSoundScript(string sound)

SetAbsOrigin

Set the absolute position of this entity.

void CBaseEntity::SetAbsOrigin(Vector origin)

SetAngles

Set entity pitch, yaw, roll.

void CBaseEntity::SetAngles(float pitch, float roll, float yaw)

SetAngularVelocity

Set the local angular velocity. The move type must be set for this to have effect.

void CBaseEntity::SetAngularVelocity(float pitch, float roll, float yaw)

SetCollisionGroup

Sets the collision group to one of the COLLISION_GROUP_* constants.

void CBaseEntity::SetCollisionGroup(int group)

SetElasticity

Set the elasticity value for this entity.

void CBaseEntity::SetElasticity(float elasticity)

SetForwardVector

Set the orientation of the entity to have this forward vector.

void CBaseEntity::SetForwardVector(Vector forward)

SetFriction

Set the friction for this entity.

void CBaseEntity::SetFriction(float friction)

SetGravity

Sets gravity on this entity. Only affects gravity along Z axis

void CBaseEntity::SetGravity(float gravity)

SetHealth

Set the health for this entity. Zero will cause instant death.

void CBaseEntity::SetHealth(int ?)

SetMaxHealth

Set the maximum health for this entity.

void CBaseEntity::SetMaxHealth(int ?)

SetModel

Change the model used for the entity. The model must be precached manually.

void CBaseEntity::SetModel(string modelName)

SetMoveCollide

Set the move collision mode to one of the MOVECOLLIDE_* constants, determining how this entity reacts to collisions.

void CBaseEntity::SetMoveCollide(int moveCollide)

SetMoveType

Set the move type to one of the MOVETYPE_* constants, which determines how this entity is moved by velocity values.

void CBaseEntity::SetMoveType(int moveType)

SetOrigin

Teleport the entity to the specified position.

void CBaseEntity::SetOrigin(Vector origin)

SetOwner

Set this entity's owner. Owners are used for things like projectiles.

void CBaseEntity::SetOwner(entity owner)

SetParent

Sets the parent entity.

void CBaseEntity::SetParent(entity parent)

SetParentWithAttachment

Sets the parent entity with an attachment index.

void CBaseEntity::SetParentWithAttachment(entity parent, int attachmentIndex)

SetSize

Set the bounding box size for this entity.

void CBaseEntity::SetSize(Vector mins, Vector maxes)

SetTeam

Assign this entity to a different team.

void CBaseEntity::SetTeam(int team)

SetVelocity

Set this entity's absolute linear velocity. The move type must be set for this to have effect.

void CBaseEntity::SetVelocity(Vector ?)

Spawn

Spawns the entity

void CBaseEntity::Spawn()

StopSound

Stops a sound on this entity.

void CBaseEntity::StopSound(string soundName)

Teleport

Teleport the entity to a new position with angles.

void CBaseEntity::Teleport(Vector origin, Vector angles)

ValidateScriptScope

Ensure that an entity's script scope has been created.

bool CBaseEntity::ValidateScriptScope()

entindex

Returns the index for this entity. This is unique among live entities, but could change during save/load.

int CBaseEntity::entindex()