| remove |
Removes this entity from the game. |
| getName |
Returns the name of this entity. |
| setName |
Sets the name of this entity. |
| activate |
Activates this entity as if it was activated by a trigger. Activator is the entity that caused the action (usually the player). |
| activateTargets |
Causes this entity to activate all it's targets. Similar to how a trigger activates entities. Activator is the entity that caused the action (usually the |
| numTargets |
Returns the number of entities this entity has targeted. |
| getTarget |
Returns the requested target entity. |
| randomTarget |
Returns a random targeted entity. Pass in an entity name to skip that entity. |
| bind |
Fixes this entity's position and orientation relative to another entity, such that when the master entity moves, so does thisentity. |
| bindPosition |
Fixes this entity's position (but not orientation) relative to another entity, such that when the master entity moves, so does this entity. |
| bindToJoint |
Fixes this entity's position and orientation relative to a bone on another entity, such that when the master's bone moves, so does this entity. |
| unbind |
Detaches this entity from its master. |
| removeBinds |
Removes all attached entities from the game. |
| setOwner |
Sets the owner of this entity. Entity's will never collide with their owner. |
| setModel |
Sets the model this entity uses. |
| setSkin |
Sets the skin this entity uses. Set to "" to turn off the skin. |
| getWorldOrigin |
Returns the current worldspace position of this entity (regardless of any bind parent). |
| setWorldOrigin |
Sets the current position of this entity (regardless of any bind parent). |
| getOrigin |
Returns the current position of this entity (relative to bind parent if any). |
| setOrigin |
Sets the current position of this entity (relative to it's bind parent if any). |
| getAngles |
Returns the current orientation of this entity (relative to bind parent if any). |
| setAngles |
Sets the current orientation of this entity (relative to bind parent if any). |
| getLinearVelocity |
Gets the current linear velocity of this entity. The linear velocity of a physics object is a vector that defines the translation of the center of mass in |
| setLinearVelocity |
Sets the current linear velocity of this entity in units per second. The linear velocity of a physics object is a vector that defines the translation of the |
| getAngularVelocity |
Gets the current angular velocity of this entity. The angular velocity of a physics object is a vector that passes through the center of mass. The direction of |
| setAngularVelocity |
Sets the current angular velocity of this entity. The angular velocity of a physics object is a vector that passes through the center of mass. The direction of |
| getSize |
Gets the size of this entity's bounding box. |
| setSize |
Sets the size of this entity's bounding box. |
| getMins |
Gets the minimum corner of this entity's bounding box. |
| getMaxs |
Gets the maximum corner of this entity's bounding box. |
| isHidden |
checks if the entity's model is invisible. |
| hide |
Makes this entity invisible. |
| show |
Makes this entity visible if it has a model. |
| touches |
Returns true if this entity touches the other entity. |
| clearSignal |
Disables the callback function on the specified signal. |
| getShaderParm |
Gets the value of the specified shader parm. |
| setShaderParm |
Sets the value of the specified shader parm. |
| setShaderParms |
Sets shader parms Parm0, Parm1, Parm2, and Parm3 (red, green, blue, and alpha respectively). |
| setColor |
Sets the RGB color of this entity (shader parms Parm0, Parm1, Parm2). |
| getColor |
Gets the color of this entity (shader parms Parm0, Parm1, Parm2). |
| cacheSoundShader |
ensure the specified sound shader is loaded by the system. prevents cache hits when playing sound shaders. |
| startSoundShader |
Plays a specific sound shader on the channel and returns the length of the sound in seconds. This is not the prefered method of playing a sound since you must |
| stopSound |
Stops a specific sound shader on the channel. |
| startSound |
Plays the sound specified by the snd_* key/value pair on the channel and returns the length of the sound. This is the preferred method for playing sounds on an |
| fadeSound |
Fades the sound on this entity to a new level over a period of time. Use SND_CHANNEL_ANY for all currently playing sounds. |
| setGuiParm |
Sets a parameter on this entity's GUI. |
| setGuiFloat |
Sets a parameter on this entity's GUI. |
| getNextKey |
searches for the name of a spawn arg that matches the prefix. for example, passing in "attack_target" matches "attack_target1", "attack_targetx", |
| setKey |
Sets a key on this entity's spawn args. Note that most spawn args are evaluated when this entity spawns in, so this will not change the entity's behavior in |
| getKey |
Retrieves the value of a specific spawn arg. |
| getIntKey |
Retrieves the integer value of a specific spawn arg. |
| getFloatKey |
Retrieves the floating point value of a specific spawn arg. |
| getVectorKey |
Retrieves the vector value of a specific spawn arg. |
| getEntityKey |
Retrieves the entity specified by the spawn arg. |
| restorePosition |
Returns this entity to the position stored in the "origin" spawn arg. This is the position the entity was spawned in unless the "origin" key is changed. Note |
| distanceTo |
Returns the distance of this entity to another entity. |
| distanceToPoint |
Returns the distance of this entity to a point. |
| startFx |
Starts an FX on this entity. |
| waitFrame |
Suspends execution of current thread for one game frame. |
| wait |
Suspends execution of the current thread for the given number of seconds. |
| hasFunction |
checks if an entity's script object has a specific function |
| callFunction |
calls a function on an entity's script object |
| setNeverDormant |
enables or prevents an entity from going dormant |