# CBaseEntity
extends CEntityInstance
Function | Description | Client |
---|---|---|
void AddEffects(nFlags) | AddEffects( int ): Adds the render effect flag. | ❌ |
void ApplyAbsVelocityImpulse(vecImpulse) | Apply a Velocity Impulse | ❌ |
void ApplyLocalAngularVelocityImpulse(angImpulse) | Apply an Ang Velocity Impulse | ❌ |
float Attribute_GetFloatValue(pName, flDefault) | Get float value for an entity attribute. | ❌ |
int Attribute_GetIntValue(pName, nDefault) | Get int value for an entity attribute. | ❌ |
void Attribute_SetFloatValue(pName, flValue) | Set float value for an entity attribute. | ❌ |
void Attribute_SetIntValue(pName, nValue) | Set int value for an entity attribute. | ❌ |
void DeleteAttribute(pName) | Delete an entity attribute. | ❌ |
void EmitSound(soundname) | Plays a sound from this entity. | ❌ |
void EmitSoundParams(soundname, nPitch, flVolume, flDelay) | Plays/modifies a sound from this entity. changes sound if nPitch and/or flVol or flSoundTime is > 0. | ❌ |
QAngle EyeAngles() | Get the qangles that this entity is looking at. | ❌ |
Vector EyePosition() | Get vector to eye position - absolute coords. | ❌ |
handle FirstMoveChild() | ❌ | |
void FollowEntity(hEnt, bBoneMerge) | hEntity to follow, bool bBoneMerge | ❌ |
void GatherCriteria(hResult) | Returns a table containing the criteria that would be used for response queries on this entity. This is the same as the table that is passed to response rule script function callbacks. | ❌ |
Vector GetAbsOrigin() | ✔️ | |
float GetAbsScale() | ❌ | |
QAngle GetAngles() | ❌ | |
Vector GetAnglesAsVector() | Get entity pitch, yaw, roll as a vector. | ❌ |
Vector GetAngularVelocity() | Get the local angular velocity - returns a vector of pitch,yaw,roll | ❌ |
Vector GetBaseVelocity() | Get Base? velocity. | ❌ |
Vector GetBoundingMaxs() | Get a vector containing max bounds, centered on object. | ❌ |
Vector GetBoundingMins() | Get a vector containing min bounds, centered on object. | ❌ |
table GetBounds() | Get a table containing the 'Mins' & 'Maxs' vector bounds, centered on object. | ❌ |
Vector GetCenter() | Get vector to center of object - absolute coords | ❌ |
handle GetChildren() | Get the entities parented to this entity. | ❌ |
table GetContext(name) | GetContext( name ): looks up a context and returns it if available. May return string, float, or null (if the context isn't found). | ❌ |
Vector GetForwardVector() | Get the forward vector of the entity. | ❌ |
int GetHealth() | Get the health of this entity. | ❌ |
QAngle GetLocalAngles() | Get entity local pitch, yaw, roll as a QAngle | ❌ |
QAngle GetLocalAngularVelocity() | Maybe local angvel | ❌ |
Vector GetLocalOrigin() | Get entity local origin as a Vector | ❌ |
float GetLocalScale() | ❌ | |
Vector GetLocalVelocity() | Get Entity relative velocity. | ❌ |
float GetMass() | Get the mass of an entity. (returns 0 if it doesn't have a physics object) | ❌ |
int GetMaxHealth() | Get the maximum health of this entity. | ❌ |
string GetModelName() | Returns the name of the model. | ❌ |
handle GetMoveParent() | If in hierarchy, retrieves the entity's parent. | ❌ |
Vector GetOrigin() | ❌ | |
handle GetOwner() | Gets this entity's owner | ❌ |
handle GetOwnerEntity() | Get the owner entity, if there is one | ❌ |
Vector GetRightVector() | Get the right vector of the entity. | ❌ |
handle GetRootMoveParent() | If in hierarchy, walks up the hierarchy to find the root parent. | ❌ |
float GetSoundDuration(soundname, actormodel) | Returns float duration of the sound. Takes soundname and optional actormodelname. | ❌ |
int GetTeam() | Get the team number of this entity. | ❌ |
int GetTeamNumber() | Get the team number of this entity. | ✔️ |
Vector GetUpVector() | Get the up vector of the entity. | ❌ |
Vector GetVelocity() | ❌ | |
bool HasAttribute(pName) | See if an entity has a particular attribute. | ❌ |
bool IsAlive() | Is this entity alive? | ❌ |
bool IsNPC() | Is this entity an CAI_BaseNPC? | ❌ |
bool IsPlayer() | Is this entity a player? | ❌ |
void Kill() | ❌ | |
handle NextMovePeer() | ❌ | |
void OverrideFriction(duration, friction) | Takes duration, value for a temporary override. | ❌ |
void PrecacheScriptSound(soundname) | Precache a sound for later playing. | ❌ |
void RemoveEffects(nFlags) | RemoveEffects( int ): Removes the render effect flag. | ❌ |
void SetAbsAngles(fPitch, fYaw, fRoll) | Set entity pitch, yaw, roll by component. | ❌ |
void SetAbsOrigin(origin) | ❌ | |
void SetAbsScale(flScale) | ❌ | |
void SetAngles(fPitch, fYaw, fRoll) | Set entity pitch, yaw, roll by component. | ❌ |
void SetAngularVelocity(pitchVel, yawVel, rollVel) | Set the local angular velocity - takes float pitch,yaw,roll velocities | ❌ |
void SetConstraint(vPos) | Set the position of the constraint. | ❌ |
void SetContext(pName, pValue, duration) | SetContext( name , value, duration ): store any key/value pair in this entity's dialog contexts. Value must be a string. Will last for duration (set 0 to mean 'forever'). | ❌ |
void SetContextNum(pName, fValue, duration) | SetContextNum( name , value, duration ): store any key/value pair in this entity's dialog contexts. Value must be a number (int or float). Will last for duration (set 0 to mean 'forever'). | ❌ |
void SetContextThink(pszContextName, hThinkFunc, flInterval) | Set a think function on this entity. | ✔️ |
void SetEntityName(pName) | Set the name of an entity. | ❌ |
void SetForwardVector(v) | Set the orientation of the entity to have this forward vector. | ❌ |
void SetFriction(flFriction) | Set PLAYER friction, ignored for objects. | ❌ |
void SetGravity(flGravity) | Set PLAYER gravity, ignored for objects. | ❌ |
void SetHealth(nHealth) | Set the health of this entity. | ❌ |
void SetLocalAngles(fPitch, fYaw, fRoll) | Set entity local pitch, yaw, roll by component | ❌ |
void SetLocalOrigin(origin) | Set entity local origin from a Vector | ❌ |
void SetLocalScale(flScale) | ❌ | |
void SetMass(flMass) | Set the mass of an entity. (does nothing if it doesn't have a physics object) | ❌ |
void SetMaxHealth(amt) | Set the maximum health of this entity. | ❌ |
void SetOrigin(v) | ❌ | |
void SetOwner(pOwner) | Sets this entity's owner | ❌ |
void SetParent(hParent, pAttachmentname) | Set the parent for this entity. | ❌ |
void SetTeam(iTeamNum) | ❌ | |
void SetVelocity(vecVelocity) | ❌ | |
void StopSound(soundname) | Stops a named sound playing from this entity. | ❌ |
int TakeDamage(hInfo) | Apply damage to this entity. Use CreateDamageInfo() to create a damageinfo object. | ❌ |
Vector TransformPointEntityToWorld(vPoint) | Returns the input Vector transformed from entity to world space | ❌ |
Vector TransformPointWorldToEntity(vPoint) | Returns the input Vector transformed from world to entity space | ❌ |
void Trigger() | Fires off this entity's OnTrigger responses. | ❌ |
void ValidatePrivateScriptScope() | Validates the private script scope and creates it if one doesn't exist. | ❌ |