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

CPropPhysicsPaintable

GetPaint

Get the current paint type applied to the prop. Returns a value from the *_POWER enum.

int CPropPhysicsPaintable::GetPaint()

GetPaintedSkin

Get the skin used when the prop is painted.

int CPropPhysicsPaintable::GetPaintedSkin()

GetUnPaintedSkin

Get the skin used when the prop is not painted.

int CPropPhysicsPaintable::GetUnPaintedSkin()

Inherited from CBaseAnimating

FindBodygroupByName

Find a bodygroup given its name, -1 if the bodygroup does not exist.

int CBaseAnimating::FindBodygroupByName(string name)

GetAttachmentAngles

Get world angles as a p,y,r vector for the specified attachment id.

Vector CBaseAnimating::GetAttachmentAngles(int attachIndex)

GetAttachmentOrigin

Get world position for the specified attachement id.

Vector CBaseAnimating::GetAttachmentOrigin(int attachIndex)

GetBodygroup

Gets the current part of a bodygroup group.

int CBaseAnimating::GetBodygroup(int group)

GetBodygroupCount

Gets the number of parts in a bodygroup group.

int CBaseAnimating::GetBodygroupCount(int group)

GetBodygroupName

Returns the name of the bodygroup.

string CBaseAnimating::GetBodygroupName(int group)

GetBodygroupPartName

Returns the bodygroup part name.

string CBaseAnimating::GetBodygroupPartName(int group, int part)

GetBoneCount

Returns the number of bones.

int CBaseAnimating::GetBoneCount()

GetBonePosition

Returns the world origin of the bone.

Vector CBaseAnimating::GetBonePosition(int bone)

GetBoneRotation

Returns the world rotation of the bone.

Vector CBaseAnimating::GetBoneRotation(int bone)

GetNumBodyGroups

Returns the number of bodygroup groups.

int CBaseAnimating::GetNumBodyGroups()

GetObjectScaleLevel

The scale size of the entity.

int CBaseAnimating::GetObjectScaleLevel()

GetPlaybackRate

Returns the current playback rate

float CBaseAnimating::GetPlaybackRate()

GetPoseParameter

Returns pose parameter value based on index.

float CBaseAnimating::GetPoseParameter(int parameter)

GetPoseParameterMax

Returns the max value of the pose parameter.

float CBaseAnimating::GetPoseParameterMax(int parameter)

GetPoseParameterMin

Returns the min value of the pose parameter.

float CBaseAnimating::GetPoseParameterMin(int parameter)

GetSequence

Returns the current sequence.

int CBaseAnimating::GetSequence()

GetSequenceActivityName

Returns the name of the sequence's activity.

string CBaseAnimating::GetSequenceActivityName(int sequence)

GetSequenceCount

Returns the number of available sequences.

int CBaseAnimating::GetSequenceCount()

GetSequenceCycleRate

Gets the sequence cycle rate for the specified sequence.

float CBaseAnimating::GetSequenceCycleRate(int sequence)

GetSequenceDuration

Gets the sequence duration for the specified sequence.

float CBaseAnimating::GetSequenceDuration(int sequence)

GetSequenceName

Returns the name of the sequence, if it's valid.

string CBaseAnimating::GetSequenceName(int sequence)

GetSkin

Gets the current model skin index.

int CBaseAnimating::GetSkin()

IsActivityFinished

Is the current activity finished?

bool CBaseAnimating::IsActivityFinished()

IsSequenceFinished

Is the current sequence finished?

bool CBaseAnimating::IsSequenceFinished()

IsSequenceLooped

Returns if the specified sequence is looped or not.

bool CBaseAnimating::IsSequenceLooped(int sequence)

IsValidSequence

Checks if the specified sequence is valid.

bool CBaseAnimating::IsValidSequence(int sequence)

LookupActivity

Looks up an activity based on name.

int CBaseAnimating::LookupActivity(string activity)

LookupAttachment

Get the named attachement id, or -1 if not found.

int CBaseAnimating::LookupAttachment(string attachment)

LookupPoseParameter

Lookup a pose parameter based on its name. Returns -1 if not found

int CBaseAnimating::LookupPoseParameter(string parameter)

SetBodygroup

Changes a bodygroup group to a different part.

void CBaseAnimating::SetBodygroup(int group, int value)

SetPlaybackRate

Sets the current playback rate

void CBaseAnimating::SetPlaybackRate(float playbackRate)

SetPoseParameter

Set pose parameter value based on index.

float CBaseAnimating::SetPoseParameter(int parameter, float value)

SetSequence

Sets the current sequence.

void CBaseAnimating::SetSequence(int sequence)

SetSkin

Sets the current model skin index.

void CBaseAnimating::SetSkin(int skin)

sequence

Looks up a sequence based on name.

int CBaseAnimating::sequence(string LookupSequence)

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()