Team Fortress 2/Scripting/Script Functions: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Removed fake script functions (leftover from a test script))
(Some major changes: 1. Removed duplicate methods caused by class inheritance 2. Separated data types and classes into their own section 3. Missing documentation partially filled with L4D2 / CSGO's 4. Reorder all classes 5. Name of all singleton instances)
Line 16: Line 16:
{{todo|Format the constructors more nicely}}
{{todo|Format the constructors more nicely}}


=== Global ===
<!-- These line breaks were always here, and are to put the section at the bottom of the TOC table -->
{{todo|Split this section up (especially the built-in Squirrel functions)}}
<!-- 25 line breaks here, currently -->
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
 
== Classes ==
=== CBaseEntity ===
This is a script handle class for entities. All entities have a script handle using this class, sometimes as one of its subclasses.
 
An entity's own handle are accessed with:
* <code>[[#CEntities|Entities]]</code> instance.
* [[Entity Scripts]] only - The <code>self</code> keyword.


{| class = "standard-table" style = "width: 85%;"
{| class = "standard-table" style = "width: 85%;"
Line 24: Line 33:
! Description
! Description
|-
|-
| <code>__CollectEventCallbacks</code>
| <code>__KeyValueFromFloat</code>
| <code>__CollectEventCallbacks()</code>
| <code>__KeyValueFromFloat(string, num)</code>
|  
|  
|-
|-
| <code>__CollectGameEventCallbacks</code>
| <code>__KeyValueFromInt</code>
| <code>__CollectGameEventCallbacks()</code>
| <code>__KeyValueFromInt(string, num)</code>
|  
|  
|-
|-
| <code>__DumpScope</code>
| <code>__KeyValueFromString</code>
| <code>__DumpScope()</code>
| <code>__KeyValueFromString(string, string)</code>
|  
|  
|-
|-
| <code>__ReplaceClosures</code>
| <code>__KeyValueFromVector</code>
| <code>__ReplaceClosures()</code>
| <code>__KeyValueFromVector(string, Vector)</code>
|  
|  
|-
|-
| <code>__RunEventCallbacks</code>
| <code>ApplyAbsVelocityImpulse</code>
| <code>__RunEventCallbacks()</code>
| <code>void ApplyAbsVelocityImpulse(Vector)</code>
|  
| Apply a Velocity Impulse
|-
| <code>ApplyLocalAngularVelocityImpulse</code>
| <code>void ApplyLocalAngularVelocityImpulse(Vector)</code>
| Apply an Ang Velocity Impulse
|-
| <code>ConnectOutput</code>
| <code>void ConnectOutput(string, string)</code>
| Adds an I/O connection that will call the named function when the specified output fires
|-
|-
| <code>__RunGameEventCallbacks</code>
| <code>Destroy</code>
| <code>__RunGameEventCallbacks()</code>
| <code>void Destroy()</code>
|  
|  
|-
|-
| <code>__VScriptServerDebugHook</code>
| <code>DisableDraw</code>
| <code>__VScriptServerDebugHook()</code>
| <code>void DisableDraw()</code>
|  
| Enable drawing (removes EF_NODRAW)
|-
| <code>DisconnectOutput</code>
| <code>void DisconnectOutput(string, string)</code>
| Removes a connected script function from an I/O event.
|-
|-
| <code>abs</code>
| <code>DispatchSpawn</code>
| <code>abs(num)</code>
| <code>void DispatchSpawn()</code>
|  
| Alternative dispatch spawn, same as the one in CEntities, for convenience.
|-
|-
| <code>acos</code>
| <code>EmitSound</code>
| <code>acos(num)</code>
| <code>void EmitSound(string)</code>
|  
| Plays a sound from this entity.
|-
|-
| <code>AddThinkToEnt</code>
| <code>EnableDraw</code>
| <code>void AddThinkToEnt(handle, string)</code>
| <code>void EnableDraw()</code>
| Adds a late bound think function to the C++ think tables for the obj
| Disable drawing (sets EF_NODRAW)
|-
|-
| <code>AddToScriptHelp</code>
| <code>entindex</code>
| <code>AddToScriptHelp()</code>
| <code>int entindex()</code>
|  
|  
|-
|-
| <code>AllowThirdPersonCamera</code>
| <code>EyePosition</code>
| <code>bool AllowThirdPersonCamera()</code>
| <code>Vector EyePosition()</code>
| Get vector to eye position - absolute coords
|-
| <code>FirstMoveChild</code>
| <code>handle FirstMoveChild()</code>
|  
|  
|-
|-
| <code>ArePlayersInHell</code>
| <code>GetAbsAngles</code>
| <code>bool ArePlayersInHell()</code>
| <code>QAngle GetAbsAngles()</code>
|  
| Get entity pitch, yaw, roll as QAngles
|-
|-
| <code>array</code>
| <code>GetAngles</code>
| <code>array(num)</code>
| <code>Vector GetAngles()</code>
|  
| !!!LEGACY FOR COMPAT!!! DO NOT USE ME. Get entity pitch, yaw, roll as a vector
|-
|-
| <code>asin</code>
| <code>GetAngularVelocity</code>
| <code>asin(num)</code>
| <code>Vector GetAngularVelocity()</code>
|  
| Get the local angular velocity - returns a vector of pitch,yaw,roll
|-
|-
| <code>assert</code>
| <code>GetBaseVelocity</code>
| <code>assert()</code>
| <code>Vector GetBaseVelocity()</code>
|  
| Get Base? velocity
|-
|-
| <code>Assert</code>
| <code>GetBoundingMaxs</code>
| <code>Assert()</code>
| <code>Vector GetBoundingMaxs()</code>
|  
| Get a vector containing max bounds, centered on object
|-
|-
| <code>atan</code>
| <code>GetBoundingMaxsOriented</code>
| <code>atan(num)</code>
| <code>Vector GetBoundingMaxsOriented()</code>
|  
| Get a vector containing max bounds, centered on object, taking the object's orientation into account
|-
|-
| <code>atan2</code>
| <code>GetBoundingMins</code>
| <code>atan2(num, num)</code>
| <code>Vector GetBoundingMins()</code>
|  
| Get a vector containing min bounds, centered on object
|-
| <code>GetBoundingMinsOriented</code>
| <code>Vector GetBoundingMinsOriented()</code>
| Get a vector containing min bounds, centered on object, taking the object's orientation into account
|-
|-
| <code>BeginScriptDebug</code>
| <code>GetCenter</code>
| <code>BeginScriptDebug()</code>
| <code>Vector GetCenter()</code>
|  
| Get vector to center of object - absolute coords
|-
|-
| <code>callee</code>
| <code>GetClassname</code>
| <code>callee()</code>
| <code>string GetClassname()</code>
|  
|  
|-
|-
| <code>ceil</code>
| <code>GetEntityHandle</code>
| <code>ceil(num)</code>
| <code><unknown> GetEntityHandle()</code>
|  
| Get the entity as an EHANDLE
|-
|-
| <code>ClearGameEventCallbacks</code>
| <code>GetEntityIndex</code>
| <code>ClearGameEventCallbacks()</code>
| <code>int GetEntityIndex()</code>
|  
|  
|-
|-
| <code>ClientPrint</code>
| <code>GetForwardVector</code>
| <code>void ClientPrint(handle, int, string)</code>
| <code>Vector GetForwardVector()</code>
| Print a client message
| Get the forward vector of the entity
|-
|-
| <code>collectgarbage</code>
| <code>GetFriction</code>
| <code>collectgarbage()</code>
| <code>float GetFriction()</code>
|  
| Get PLAYER friction, ignored for objects
|-
|-
| <code>compilestring</code>
| <code>GetHealth</code>
| <code>compilestring(string, string)</code>
| <code>int GetHealth()</code>
|  
|  
|-
|-
| <code>cos</code>
| <code>GetLeftVector</code>
| <code>cos(num)</code>
| <code>Vector GetLeftVector()</code>
| !!!LEGACY FOR COMPAT!!! Get the **right** vector of the entity. This is purely for compatibility. DO NOT USE ME. Use GetRightVector!
|-
| <code>GetLocalAngles</code>
| <code>QAngle GetLocalAngles()</code>
|  
|  
|-
|-
| <code>CreateProp</code>
| <code>GetLocalOrigin</code>
| <code>handle CreateProp(string, Vector, string, int)</code>
| <code>Vector GetLocalOrigin()</code>
| Create a physics prop
|  
|-
|-
| <code>CreateSceneEntity</code>
| <code>GetLocalVelocity</code>
| <code>handle CreateSceneEntity(string)</code>
| <code>Vector GetLocalVelocity()</code>
| Create a scene entity to play the specified scene.
| Get Entity relative velocity
|-
|-
| <code>DebugDrawBox</code>
| <code>GetMaxHealth</code>
| <code>void DebugDrawBox(Vector, Vector, int, int, int, int, float)</code>
| <code>int GetMaxHealth()</code>
| Draw a debug overlay box
|  
|-
|-
| <code>DebugDrawBoxAngles</code>
| <code>GetModelKeyValues</code>
| <code>void DebugDrawBoxAngles(Vector, Vector, Vector, QAngle, Vector, float, float)</code>
| <code>handle GetModelKeyValues()</code>
| Draw a debug oriented box (cent, min, max, angles(p,y,r), vRgb, a, duration)
| Get a KeyValue class instance on this entity's model
|-
|-
| <code>DebugDrawBoxDirection</code>
| <code>GetModelName</code>
| <code>void DebugDrawBoxDirection(Vector, Vector, Vector, Vector, Vector, float, float)</code>
| <code>string GetModelName()</code>
| Draw a debug forward box (cent, min, max, forward, vRgb, a, duration)
| Returns the name of the model
|-
|-
| <code>DebugDrawCircle</code>
| <code>GetMoveParent</code>
| <code>void DebugDrawCircle(Vector, Vector, float, float, bool, float)</code>
| <code>handle GetMoveParent()</code>
| Draw a debug circle (center, rad, vRgb, a, ztest, duration)
| If in hierarchy, retrieves the entity's parent
|-
|-
| <code>DebugDrawClear</code>
| <code>GetName</code>
| <code>void DebugDrawClear()</code>
| <code>string GetName()</code>
| Try to clear all the debug overlay info
|  
|-
|-
| <code>DebugDrawLine</code>
| <code>GetOrigin</code>
| <code>void DebugDrawLine(Vector, Vector, int, int, int, bool, float)</code>
| <code>Vector GetOrigin()</code>
| Draw a debug overlay line
| This is GetAbsOrigin with a funny script name for some reason. Not changing it for legacy compat though.
|-
|-
| <code>DebugDrawLine_vCol</code>
| <code>GetOwner</code>
| <code>void DebugDrawLine_vCol(Vector, Vector, Vector, bool, float)</code>
| <code>handle GetOwner()</code>
| Draw a debug line using color vec (start, end, vRgb, a, ztest, duration)
| Gets this entity's owner
|-
|-
| <code>DebugDrawScreenTextLine</code>
| <code>GetPreTemplateName</code>
| <code>void DebugDrawScreenTextLine(float, float, int, string, int, int, int, int, float)</code>
| <code>string GetPreTemplateName()</code>
| Draw text with a line offset
| Get the entity name stripped of template unique decoration
|-
|-
| <code>DebugDrawText</code>
| <code>GetRightVector</code>
| <code>void DebugDrawText(Vector, string, bool, float)</code>
| <code>Vector GetRightVector()</code>
| Draw text in 3d (origin, text, bViewCheck, duration)
| Get the right vector of the entity
|-
|-
| <code>developer</code>
| <code>GetRootMoveParent</code>
| <code>developer()</code>
| <code>handle GetRootMoveParent()</code>
|  
| If in hierarchy, walks up the hierarchy to find the root parent
|-
| <code>GetScriptId</code>
| <code>string GetScriptId()</code>
| Retrieve the unique identifier used to refer to the entity within the scripting system
|-
|-
| <code>DispatchParticleEffect</code>
| <code>GetScriptScope</code>
| <code>void DispatchParticleEffect(string, Vector, Vector)</code>
| <code>handle GetScriptScope()</code>
| Dispatches a one-off particle system
| Retrieve the script-side data associated with an entity
|-
|-
| <code>Document</code>
| <code>GetSoundDuration</code>
| <code>Document()</code>
| <code>float GetSoundDuration(string, string)</code>
|  
| Returns float duration of the sound. Takes soundname and optional actormodelname.
|-
|-
| <code>DoEntFire</code>
| <code>GetTeam</code>
| <code>DoEntFire(string, string, string, num, Vector, Vector)</code>
| <code>int GetTeam()</code>
|  
|  
|-
|-
| <code>DoIncludeScript</code>
| <code>GetUpVector</code>
| <code>bool DoIncludeScript(string, handle)</code>
| <code>Vector GetUpVector()</code>
| Execute a script (internal)
| Get the up vector of the entity
|-
|-
| <code>DoUniqueString</code>
| <code>GetVelocity</code>
| <code>DoUniqueString(string)</code>
| <code>Vector GetVelocity()</code>
|  
|  
|-
|-
| <code>dummy</code>
| <code>IsPlayer</code>
| <code>dummy()</code>
| <code>bool IsPlayer()</code>
|  
|  
|-
|-
| <code>DumpObject</code>
| <code>IsValid</code>
| <code>DumpObject()</code>
| <code>IsValid()</code>
|  
|  
|-
|-
| <code>EmitAmbientSoundOn</code>
| <code>KeyValueFromFloat</code>
| <code>void EmitAmbientSoundOn(string, float, int, int, handle)</code>
| <code>bool KeyValueFromFloat(string, float)</code>
| Play named ambient sound on an entity.
| Executes KeyValue with a float
|-
| <code>KeyValueFromInt</code>
| <code>bool KeyValueFromInt(string, int)</code>
| Executes KeyValue with an int
|-
|-
| <code>EmitSoundOn</code>
| <code>KeyValueFromString</code>
| <code>void EmitSoundOn(string, handle)</code>
| <code>bool KeyValueFromString(string, string)</code>
| Play named sound on Entity
| Executes KeyValue with a string
|-
|-
| <code>EmitSoundOnClient</code>
| <code>KeyValueFromVector</code>
| <code>void EmitSoundOnClient(string, handle)</code>
| <code>bool KeyValueFromVector(string, Vector)</code>
| Play named sound only on the client for the passed in player
| Executes KeyValue with a vector
|-
|-
| <code>enabledebuginfo</code>
| <code>Kill</code>
| <code>enabledebuginfo()</code>
| <code>void Kill()</code>
|  
|  
|-
|-
| <code>EndScriptDebug</code>
| <code>NextMovePeer</code>
| <code>EndScriptDebug()</code>
| <code>handle NextMovePeer()</code>
|  
|  
|-
|-
| <code>EntFire</code>
| <code>PrecacheModel</code>
| <code>function EntFire(target, action, value, delay, activator)</code>
| <code>void PrecacheModel(string)</code>
| Generate and entity i/o event
|  
|-
|-
| <code>EntFireByHandle</code>
| <code>PrecacheScriptSound</code>
| <code>void EntFireByHandle(handle, string, string, float, handle, handle)</code>
| <code>void PrecacheScriptSound(string)</code>
| Generate and entity i/o event. First parameter is an entity instance.
|-
| <code>EntIndexToHScript</code>
| <code>handle EntIndexToHScript(int)</code>
| Turn an entity index integer to an HScript representing that entity's script instance.
|-
| <code>error</code>
| <code>error()</code>
|  
|  
|-
|-
| <code>exp</code>
| <code>PrecacheSoundScript</code>
| <code>exp(num)</code>
| <code>void PrecacheSoundScript(string)</code>
|  
| Precache a sound for later playing.
|-
|-
| <code>fabs</code>
| <code>SetAbsAngles</code>
| <code>fabs(num)</code>
| <code>void SetAbsAngles(QAngle)</code>
|  
| Set entity pitch, yaw, roll as QAngles
|-
|-
| <code>FileToString</code>
| <code>SetAbsOrigin</code>
| <code>string FileToString(string)</code>
| <code>void SetAbsOrigin(Vector)</code>
| Reads a string from a file to send to script
| SetAbsOrigin
|-
|-
| <code>FindCircularReference</code>
| <code>SetAngles</code>
| <code>FindCircularReference()</code>
| <code>void SetAngles(float, float, float)</code>
|  
| !!!LEGACY FOR COMPAT!!! DO NOT USE ME. Set entity pitch, yaw, roll
|-
|-
| <code>FindCircularReferences</code>
| <code>SetAngularVelocity</code>
| <code>FindCircularReferences()</code>
| <code>void SetAngularVelocity(float, float, float)</code>
|  
| Set the local angular velocity - takes float pitch,yaw,roll velocities
|-
| <code>SetDrawEnabled</code>
| <code>void SetDrawEnabled(bool)</code>
| Enables drawing if you pass true, disables drawing if you pass false.
|-
|-
| <code>FireGameEvent</code>
| <code>SetForwardVector</code>
| <code>bool FireGameEvent(string, handle)</code>
| <code>void SetForwardVector(Vector)</code>
| Fire a game event to a listening callback function in script. Parameters are passed in a squirrel table.
| Set the orientation of the entity to have this forward vector
|-
|-
| <code>FireScriptEvent</code>
| <code>SetFriction</code>
| <code>FireScriptEvent()</code>
| <code>void SetFriction(float)</code>
|  
| Set PLAYER friction, ignored for objects
|-
|-
| <code>FlagsMayBeCapped</code>
| <code>SetGravity</code>
| <code>bool FlagsMayBeCapped()</code>
| <code>void SetGravity(float)</code>
| May a flag be captured?
| Set PLAYER gravity, ignored for objects
|-
|-
| <code>floor</code>
| <code>SetHealth</code>
| <code>floor(num)</code>
| <code>void SetHealth(int)</code>
|  
|  
|-
|-
| <code>format</code>
| <code>SetLocalAngles</code>
| <code>format(string)</code>
| <code>void SetLocalAngles(QAngle)</code>
|  
|  
|-
|-
| <code>FrameTime</code>
| <code>SetLocalOrigin</code>
| <code>float FrameTime()</code>
| <code>void SetLocalOrigin(Vector)</code>
| Get the time spent on the server in the last frame
|  
|-
|-
| <code>GameModeUsesCurrency</code>
| <code>SetMaxHealth</code>
| <code>bool GameModeUsesCurrency()</code>
| <code>void SetMaxHealth(int)</code>
| Does the current gamemode have currency?
|  
|-
|-
| <code>GameModeUsesMiniBosses</code>
| <code>SetModel</code>
| <code>bool GameModeUsesMiniBosses()</code>
| <code>void SetModel(string)</code>
| Does the current gamemode have minibosses?
| Set a model for this entity
|-
|-
| <code>GameModeUsesUpgrades</code>
| <code>SetOrigin</code>
| <code>bool GameModeUsesUpgrades()</code>
| <code>void SetOrigin(Vector)</code>
| Does the current gamemode have upgrades?
| THIS DOESNT CALL SetAbsOrigin IT CALLS Teleport
|-
|-
| <code>GetClassLimit</code>
| <code>SetOwner</code>
| <code>int GetClassLimit(int)</code>
| <code>void SetOwner(handle)</code>
| Get class limit for class. Indices:
| Sets this entity's owner
|-
|-
| <code>getconsttable</code>
| <code>SetSize</code>
| <code>getconsttable()</code>
| <code>void SetSize(Vector, Vector)</code>
|  
|  
|-
|-
| <code>GetDeveloperLevel</code>
| <code>SetTeam</code>
| <code>int GetDeveloperLevel()</code>
| <code>void SetTeam(int)</code>
| Gets the level of 'developer'
|  
|-
|-
| <code>GetFrameCount</code>
| <code>SetVelocity</code>
| <code>int GetFrameCount()</code>
| <code>void SetVelocity(Vector)</code>
| Returns the engines current frame count
|-
| <code>GetFriction</code>
| <code>float GetFriction(handle)</code>
| Returns the Friction on a player entity, meaningless if not a player
|-
| <code>GetFunctionSignature</code>
| <code>GetFunctionSignature()</code>
|  
|  
|-
|-
| <code>GetGravityMultiplier</code>
| <code>StopSound</code>
| <code>float GetGravityMultiplier()</code>
| <code>void StopSound(string)</code>
|  
| Stops a sound on this entity.
|-
|-
| <code>GetListenServerHost</code>
| <code>TakeDamage</code>
| <code>handle GetListenServerHost()</code>
| <code>void TakeDamage(float, int, handle)</code>
| Get the local player on a listen server.
| (flDamage, nDamageType, hAttacker)
|-
|-
| <code>GetMannVsMachineAlarmStatus</code>
| <code>TakeDamageEx</code>
| <code>bool GetMannVsMachineAlarmStatus()</code>
| <code>void TakeDamageEx(handle, handle, handle, Vector, Vector, float, int)</code>
|  
| (hInflictor, hAttacker, hWeapon, vecDamageForce, vecDamagePosition, flDamage, nDamageType)
|-
|-
| <code>GetMapName</code>
| <code>ValidateScriptScope</code>
| <code>string GetMapName()</code>
| <code>bool ValidateScriptScope()</code>
| Get the name of the map.
| Ensure that an entity's script scope has been created
|-
|}
| <code>GetModelIndex</code>
 
| <code>int GetModelIndex(string)</code>
=== CBaseAnimating ===
| Returns the index of the named model.
Extends [[#CBaseEntity|CBaseEntity]]
 
Script handle class for animatable entities, such as props.
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
|-
| <code>GetOvertimeAllowedForCTF</code>
| <code>FindBodygroupByName</code>
| <code>bool GetOvertimeAllowedForCTF()</code>
| <code>int FindBodygroupByName(string)</code>
|  
| Find a bodygroup id by name
|-
|-
| <code>GetPhysAngularVelocity</code>
| <code>GetAttachmentAngles</code>
| <code>Vector GetPhysAngularVelocity(handle)</code>
| <code>QAngle GetAttachmentAngles(int)</code>
| Get Angular Velocity for VPHYS or normal object
| Get the attachement id's angles as a p,y,r vector
|-
|-
| <code>GetPhysVelocity</code>
| <code>GetAttachmentBone</code>
| <code>Vector GetPhysVelocity(handle)</code>
| <code>int GetAttachmentBone(int)</code>
| Get Velocity for VPHYS or normal object
| Get the named attachement's parent bone index
|-
|-
| <code>GetPlayerFromUserID</code>
| <code>GetAttachmentOrigin</code>
| <code>handle GetPlayerFromUserID(int)</code>
| <code>Vector GetAttachmentOrigin(int)</code>
| Given a user id, return the entity, or null
| Get the attachement id's origin vector
|-
|-
| <code>getroottable</code>
| <code>GetBodygroup</code>
| <code>getroottable()</code>
| <code>int GetBodygroup(int)</code>
|  
| Get a bodygroup by id
|-
|-
| <code>GetRoundState</code>
| <code>GetBodygroupName</code>
| <code>int GetRoundState()</code>
| <code>string GetBodygroupName(int)</code>
| Get current round state. Indices:
| Get the bodygroup id's name
|-
|-
| <code>GetSoundDuration</code>
| <code>GetBodygroupPartName</code>
| <code>float GetSoundDuration(string, string)</code>
| <code>string GetBodygroupPartName(int, int)</code>
| Returns float duration of the sound. Takes soundname and optional actormodelname.
| Get name by group and part
|-
|-
| <code>getstackinfos</code>
| <code>GetBoneAngles</code>
| <code>getstackinfos(num)</code>
| <code>QAngle GetBoneAngles(int)</code>
|  
| Get the bone id's angles as a p,y,r vector
|-
|-
| <code>GetStopWatchState</code>
| <code>GetBoneOrigin</code>
| <code>int GetStopWatchState()</code>
| <code>Vector GetBoneOrigin(int)</code>
| Get the current stopwatch state. Indices:
| Get the bone id's origin vector
|-
|-
| <code>GetWinningTeam</code>
| <code>GetModelScale</code>
| <code>int GetWinningTeam()</code>
| <code>float GetModelScale()</code>
| Who won!
|-
| <code>HaveStopWatchWinner</code>
| <code>bool HaveStopWatchWinner()</code>
|  
|  
|-
|-
| <code>IncludeScript</code>
| <code>GetSequence</code>
| <code>IncludeScript()</code>
| <code>int GetSequence()</code>
|  
| Get the current sequence id
|-
|-
| <code>InMatchStartCountdown</code>
| <code>GetSequenceActivityName</code>
| <code>bool InMatchStartCountdown()</code>
| <code>string GetSequenceActivityName(int)</code>
| Are we in the pre-match state?
| Get the activity name for a sequence by id
|-
|-
| <code>InOvertime</code>
| <code>GetSequenceDuration</code>
| <code>bool InOvertime()</code>
| <code>float GetSequenceDuration(int)</code>
| Currently in overtime?
| Get a sequence duration by id
|-
|-
| <code>IsAttackDefenseMode</code>
| <code>GetSequenceName</code>
| <code>bool IsAttackDefenseMode()</code>
| <code>string GetSequenceName(int)</code>
|  
| Get a sequence name by id
|-
|-
| <code>IsBirthday</code>
| <code>GetSkin</code>
| <code>bool IsBirthday()</code>
| <code>int GetSkin()</code>
| Are we in birthday mode?
| Gets the current skin index.
|-
|-
| <code>IsCompetitiveMode</code>
| <code>IsSequenceFinished</code>
| <code>bool IsCompetitiveMode()</code>
| <code>bool IsSequenceFinished()</code>
| Playing competitive?
| Ask whether the main sequence is done playing
|-
|-
| <code>IsDedicatedServer</code>
| <code>LookupActivity</code>
| <code>bool IsDedicatedServer()</code>
| <code>int LookupActivity(string)</code>
| Returns true if this server is a dedicated server.
| Get the named activity index
|-
|-
| <code>IsDefaultGameMode</code>
| <code>LookupAttachment</code>
| <code>bool IsDefaultGameMode()</code>
| <code>int LookupAttachment(string)</code>
| The absence of arena, mvm, tournament mode, etc
| Get the named attachement id
|-
|-
| <code>IsHolidayActive</code>
| <code>LookupBone</code>
| <code>bool IsHolidayActive(int)</code>
| <code>int LookupBone(string)</code>
| Is the given holiday active? Indices:
| Get the named bone index
|-
|-
| <code>IsHolidayMap</code>
| <code>LookupSequence</code>
| <code>bool IsHolidayMap(int)</code>
| <code>int LookupSequence(string)</code>
| Playing a holiday map? Indices:
| Looks up a sequence by sequence name or activity name
|-
|-
| <code>IsInArenaMode</code>
| <code>ResetSequence</code>
| <code>bool IsInArenaMode()</code>
| <code>void ResetSequence(int)</code>
| Playing arena mode?
| Reset a sequence by id. If the id is different than the current sequence, switch to the new sequence
|-
|-
| <code>IsInKothMode</code>
| <code>SetBodygroup</code>
| <code>bool IsInKothMode()</code>
| <code>void SetBodygroup(int, int)</code>
| Playing king of the hill mode?
| Sets a bodygroup
|-
|-
| <code>IsInMedievalMode</code>
| <code>SetModelScale</code>
| <code>bool IsInMedievalMode()</code>
| <code>void SetModelScale(float, float)</code>
| Playing medieval mode?
| (scale, change_duration) Changes a model's scale over time
|-
|-
| <code>IsInWaitingForPlayers</code>
| <code>SetPoseParameter</code>
| <code>bool IsInWaitingForPlayers()</code>
| <code>float SetPoseParameter(int, float)</code>
| Are we waiting for some stragglers?
| (id, value) Sets a pose parameter value
|-
|-
| <code>IsMannVsMachineMode</code>
| <code>SetSequence</code>
| <code>bool IsMannVsMachineMode()</code>
| <code>void SetSequence(int)</code>
| Playing MvM? Beep boop
| Set a sequence by id
|-
|-
| <code>IsMannVsMachineRespecEnabled</code>
| <code>SetSkin</code>
| <code>bool IsMannVsMachineRespecEnabled()</code>
| <code>void SetSkin(int)</code>
| Are players allowed to refund their upgrades?
| Sets the skin.
|}
 
 
=== CBasePlayer ===
Extends [[#CBaseAnimating|CBaseAnimating]]
 
Script handle class for player entities.
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
|-
| <code>IsMatchTypeCasual</code>
| <code>IsNoclipping</code>
| <code>bool IsMatchTypeCasual()</code>
| <code>bool IsNoclipping()</code>
| Playing casual?
| Returns true if the player is in noclip mode.
|}
 
 
=== CBaseMultiplayerPlayer ===
Extends [[#CBasePlayer|CBasePlayer]]
 
Script handle sub-classes for player entities in multiplayer games. No additional methods.
 
 
=== CTFPlayer ===
Extends [[#CBaseMultiplayerPlayer|CBaseMultiplayerPlayer]]
 
Script handle class for TF2s player entities.
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
|-
| <code>IsMatchTypeCompetitive</code>
| <code>AddCond</code>
| <code>bool IsMatchTypeCompetitive()</code>
| <code>void AddCond(string)</code>
| Playing competitive?
|  
|-
|-
| <code>IsModelPrecached</code>
| <code>AddCondEx</code>
| <code>bool IsModelPrecached(string)</code>
| <code>void AddCondEx(string, float, handle)</code>
| Checks if the modelname is precached.
|  
|-
|-
| <code>IsPasstimeMode</code>
| <code>AddCustomAttribute</code>
| <code>bool IsPasstimeMode()</code>
| <code>void AddCustomAttribute(string, float, float)</code>
| No ball games.
| Add a custom attribute to the player
|-
|-
| <code>IsPlayerABot</code>
| <code>ApplyPunchImpulseX</code>
| <code>bool IsPlayerABot(handle)</code>
| <code>bool ApplyPunchImpulseX(float)</code>
| Is this player/entity a bot
|  
|-
|-
| <code>IsPowerupMode</code>
| <code>CanAirDash</code>
| <code>bool IsPowerupMode()</code>
| <code>bool CanAirDash()</code>
| Playing powerup mode? Not compatible with MvM
|  
|-
|-
| <code>IsPVEModeActive</code>
| <code>CanBeDebuffed</code>
| <code>bool IsPVEModeActive()</code>
| <code>bool CanBeDebuffed()</code>
|  
|  
|-
|-
| <code>IsQuickBuildTime</code>
| <code>CanBreatheUnderwater</code>
| <code>bool IsQuickBuildTime()</code>
| <code>bool CanBreatheUnderwater()</code>
| If an engie places a building, will it immediately upgrade? Eg. MvM pre-round etc.
|  
|-
|-
| <code>IsSoundPrecached</code>
| <code>CanDuck</code>
| <code>bool IsSoundPrecached(string)</code>
| <code>bool CanDuck()</code>
| Takes a sound name
| Can the player duck?
|-
|-
| <code>IsTruceActive</code>
| <code>CanGetWet</code>
| <code>bool IsTruceActive()</code>
| <code>bool CanGetWet()</code>
|  
|  
|-
|-
| <code>IsUsingGrapplingHook</code>
| <code>CanJump</code>
| <code>bool IsUsingGrapplingHook()</code>
| <code>bool CanJump()</code>
|  
| Can the player jump?
|-
|-
| <code>IsUsingSpells</code>
| <code>CanPlayerMove</code>
| <code>bool IsUsingSpells()</code>
| <code>bool CanPlayerMove()</code>
|  
| Can the player move?
|-
|-
| <code>IsWeakref</code>
| <code>DropFlag</code>
| <code>IsWeakref()</code>
| <code>void DropFlag(bool)</code>
|  
| Force player to drop the flag.
|-
|-
| <code>LocalTime</code>
| <code>DropRune</code>
| <code>void LocalTime(handle)</code>
| <code>void DropRune(bool, int)</code>
| Fills out a table with the local time (second, minute, hour, day, month, year, dayofweek, dayofyear, daylightsavings)
| Force player to drop the rune.
|-
|-
| <code>log</code>
| <code>FiringTalk</code>
| <code>log(num)</code>
| <code>void FiringTalk()</code>
| Makes eg. a heavy go AAAAAAAAAAaAaa like they are firing their minigun.
|-
| <code>FirstMoveChild</code>
| <code>FirstMoveChild()</code>
|  
|  
|-
|-
| <code>log10</code>
| <code>ForceChangeTeam</code>
| <code>log10(num)</code>
| <code>void ForceChangeTeam(int, bool)</code>
| Force player to change their team.
|-
| <code>GetBackstabs</code>
| <code>int GetBackstabs()</code>
|  
|  
|-
|-
| <code>lstrip</code>
| <code>GetBuildingsDestroyed</code>
| <code>lstrip(string)</code>
| <code>int GetBuildingsDestroyed()</code>
|  
|  
|-
|-
| <code>MakeNamespace</code>
| <code>GetCaptures</code>
| <code>MakeNamespace()</code>
| <code>int GetCaptures()</code>
|  
|  
|-
|-
| <code>MapHasMatchSummaryStage</code>
| <code>GetClassEyeHeight</code>
| <code>bool MapHasMatchSummaryStage()</code>
| <code>Vector GetClassEyeHeight()</code>
|  
| Gets the eye height of the player
|-
|-
| <code>MatchmakingShouldUseStopwatchMode</code>
| <code>GetCondDuration</code>
| <code>bool MatchmakingShouldUseStopwatchMode()</code>
| <code>float GetCondDuration(string)</code>
|  
|  
|-
|-
| <code>Msg</code>
| <code>GetCurrentTauntMoveSpeed</code>
| <code>Msg()</code>
| <code>float GetCurrentTauntMoveSpeed()</code>
|  
|  
|-
|-
| <code>newthread</code>
| <code>GetDefenses</code>
| <code>newthread(Vector)</code>
| <code>int GetDefenses()</code>
|  
|  
|-
|-
| <code>PickupObject</code>
| <code>GetDisguiseAmmoCount</code>
| <code>void PickupObject(handle, handle)</code>
| <code>int GetDisguiseAmmoCount()</code>
| Have a player pickup a nearby named entity
|-
| <code>PlayerInstanceFromIndex</code>
| <code>handle PlayerInstanceFromIndex(int)</code>
| Get a script instance of a player by index.
|-
| <code>PlayerReadyStatus_ArePlayersOnTeamReady</code>
| <code>bool PlayerReadyStatus_ArePlayersOnTeamReady(int)</code>
|  
|  
|-
|-
| <code>PlayerReadyStatus_HaveMinPlayersToEnable</code>
| <code>GetDisguiseTarget</code>
| <code>bool PlayerReadyStatus_HaveMinPlayersToEnable()</code>
| <code>handle GetDisguiseTarget()</code>
|  
|  
|-
|-
| <code>PlayerReadyStatus_ResetState</code>
| <code>GetDisguiseTeam</code>
| <code>void PlayerReadyStatus_ResetState()</code>
| <code>int GetDisguiseTeam()</code>
|  
|  
|-
|-
| <code>PlayersAreOnMatchSummaryStage</code>
| <code>GetDominations</code>
| <code>bool PlayersAreOnMatchSummaryStage()</code>
| <code>int GetDominations()</code>
|  
|  
|-
|-
| <code>PointsMayBeCaptured</code>
| <code>GetGrapplingHookTarget</code>
| <code>bool PointsMayBeCaptured()</code>
| <code>handle GetGrapplingHookTarget()</code>
| Are points able to be captured?
| What entity is the player grappling?
|-
|-
| <code>pow</code>
| <code>GetHeadshots</code>
| <code>pow(num, num)</code>
| <code>int GetHeadshots()</code>
|  
|  
|-
|-
| <code>PrecacheEntityFromTable</code>
| <code>GetHealPoints</code>
| <code>bool PrecacheEntityFromTable(handle)</code>
| <code>int GetHealPoints()</code>
| Precache an entity from KeyValues in table
|  
|-
|-
| <code>PrecacheModel</code>
| <code>GetHealTarget</code>
| <code>void PrecacheModel(string)</code>
| <code>handle GetHealTarget()</code>
| Precache a model.
| Who is the medic healing?
|-
|-
| <code>PrecacheSound</code>
| <code>GetInvulns</code>
| <code>void PrecacheSound(string)</code>
| <code>int GetInvulns()</code>
| Precache a sound.
|  
|-
|-
| <code>print</code>
| <code>GetKillAssists</code>
| <code>print()</code>
| <code>int GetKillAssists()</code>
|  
|  
|-
|-
| <code>PrintHelp</code>
| <code>GetNextChangeClassTime</code>
| <code>PrintHelp()</code>
| <code>float GetNextChangeClassTime()</code>
|  
| Get next change class time.
|-
| <code>GetNextChangeTeamTime</code>
| <code>float GetNextChangeTeamTime()</code>
| Get next change team time.
|-
| <code>GetNextRegenTime</code>
| <code>float GetNextRegenTime()</code>
| Get next health regen time.
|-
|-
| <code>printl</code>
| <code>GetRageMeter</code>
| <code>printl()</code>
| <code>float GetRageMeter()</code>
|  
|  
|-
|-
| <code>rand</code>
| <code>GetResupplyPoints</code>
| <code>rand()</code>
| <code>int GetResupplyPoints()</code>
|  
|  
|-
|-
| <code>RandomFloat</code>
| <code>GetRevenge</code>
| <code>float RandomFloat(float, float)</code>
| <code>int GetRevenge()</code>
| Generate a random floating point number within a range, inclusive
|  
|-
|-
| <code>RandomInt</code>
| <code>GetScoutHypeMeter</code>
| <code>int RandomInt(int, int)</code>
| <code>float GetScoutHypeMeter()</code>
| Generate a random integer within a range, inclusive
|  
|-
|-
| <code>realPrint</code>
| <code>GetSpyCloakMeter</code>
| <code>realPrint()</code>
| <code>float GetSpyCloakMeter()</code>
|  
|  
|-
|-
| <code>RegisterFunctionDocumentation</code>
| <code>GetTeleports</code>
| <code>RegisterFunctionDocumentation()</code>
| <code>int GetTeleports()</code>
|  
|  
|-
|-
| <code>RegisterScriptGameEventListener</code>
| <code>GetTimeSinceCalledForMedic</code>
| <code>void RegisterScriptGameEventListener(string)</code>
| <code>float GetTimeSinceCalledForMedic()</code>
| Register as a listener for a game event from script.
| When did the player last call medic
|-
| <code>HasItem</code>
| <code>bool HasItem()</code>
| Currently holding an item? Eg. capture flag
|-
|-
| <code>resurrectunreachable</code>
| <code>InAirDueToExplosion</code>
| <code>resurrectunreachable()</code>
| <code>bool InAirDueToExplosion()</code>
|  
|  
|-
|-
| <code>RetrieveNativeSignature</code>
| <code>InAirDueToKnockback</code>
| <code>RetrieveNativeSignature()</code>
| <code>bool InAirDueToKnockback()</code>
|  
|  
|-
|-
| <code>RotateOrientation</code>
| <code>InCond</code>
| <code>QAngle RotateOrientation(QAngle, QAngle)</code>
| <code>bool InCond(string)</code>
| Rotate a QAngle by another QAngle.
|  
|-
|-
| <code>RotatePosition</code>
| <code>IsAirDashing</code>
| <code>Vector RotatePosition(Vector, QAngle, Vector)</code>
| <code>bool IsAirDashing()</code>
| Rotate a Vector around a point.
|  
|-
|-
| <code>rstrip</code>
| <code>IsAllowedToTaunt</code>
| <code>rstrip(string)</code>
| <code>bool IsAllowedToTaunt()</code>
|  
|  
|-
|-
| <code>Say</code>
| <code>IsCallingForMedic</code>
| <code>void Say(handle, string, bool)</code>
| <code>bool IsCallingForMedic()</code>
| Have Entity say string, and teamOnly or not
| Is this player calling for medic?
|-
|-
| <code>ScreenFade</code>
| <code>IsCarryingRune</code>
| <code>void ScreenFade(handle, int, int, int, int, float, float, int)</code>
| <code>bool IsCarryingRune()</code>
| Start a screenfade with the following parameters. player, red, green, blue, alpha, flFadeTime, flFadeHold, flags
|  
|-
|-
| <code>ScreenShake</code>
| <code>IsControlStunned</code>
| <code>void ScreenShake(Vector, float, float, float, float, int, bool)</code>
| <code>bool IsControlStunned()</code>
| Start a screenshake with the following parameters. vecCenter, flAmplitude, flFrequency, flDuration, flRadius, eCommand( SHAKE_START = 0, SHAKE_STOP = 1 ), bAirShake
|-
| <code>ScriptDebugAddTextFilter</code>
| <code>ScriptDebugAddTextFilter()</code>
|  
|  
|-
|-
| <code>ScriptDebugAddTrace</code>
| <code>IsCritBoosted</code>
| <code>ScriptDebugAddTrace()</code>
| <code>bool IsCritBoosted()</code>
|  
|  
|-
|-
| <code>ScriptDebugAddWatch</code>
| <code>IsFireproof</code>
| <code>ScriptDebugAddWatch()</code>
| <code>bool IsFireproof()</code>
|  
|  
|-
|-
| <code>ScriptDebugAddWatches</code>
| <code>IsFullyInvisible</code>
| <code>ScriptDebugAddWatches()</code>
| <code>bool IsFullyInvisible()</code>
|  
|  
|-
|-
| <code>ScriptDebugAddWatchPattern</code>
| <code>IsHypeBuffed</code>
| <code>ScriptDebugAddWatchPattern()</code>
| <code>bool IsHypeBuffed()</code>
|  
|  
|-
|-
| <code>ScriptDebugClearTraces</code>
| <code>IsImmuneToPushback</code>
| <code>ScriptDebugClearTraces()</code>
| <code>bool IsImmuneToPushback()</code>
|  
|  
|-
|-
| <code>ScriptDebugClearWatches</code>
| <code>IsInspecting</code>
| <code>ScriptDebugClearWatches()</code>
| <code>bool IsInspecting()</code>
|  
|  
|-
|-
| <code>ScriptDebugDefaultWatchColor</code>
| <code>IsInvulnerable</code>
| <code>ScriptDebugDefaultWatchColor()</code>
| <code>bool IsInvulnerable()</code>
|  
|  
|-
|-
| <code>ScriptDebugDraw</code>
| <code>IsJumping</code>
| <code>ScriptDebugDraw()</code>
| <code>bool IsJumping()</code>
|  
|  
|-
|-
| <code>ScriptDebugDrawWatches</code>
| <code>IsMiniBoss</code>
| <code>ScriptDebugDrawWatches()</code>
| <code>bool IsMiniBoss()</code>
|  
| Is this player an MvM mini-boss?
|-
|-
| <code>ScriptDebugDumpKeys</code>
| <code>IsParachuteEquipped</code>
| <code>ScriptDebugDumpKeys()</code>
| <code>bool IsParachuteEquipped()</code>
|  
|  
|-
|-
| <code>ScriptDebugHook</code>
| <code>IsPlacingSapper</code>
| <code>ScriptDebugHook()</code>
| <code>bool IsPlacingSapper()</code>
| Returns true if we placed a sapper in the last few moments
|-
| <code>IsPlayer</code>
| <code>IsPlayer()</code>
|  
|  
|-
|-
| <code>ScriptDebugIterateKeys</code>
| <code>IsRageDraining</code>
| <code>ScriptDebugIterateKeys()</code>
| <code>bool IsRageDraining()</code>
|  
|  
|-
|-
| <code>ScriptDebugIterateKeysRecursive</code>
| <code>IsRegenerating</code>
| <code>ScriptDebugIterateKeysRecursive()</code>
| <code>bool IsRegenerating()</code>
|  
|  
|-
|-
| <code>ScriptDebugRemoveTextFilter</code>
| <code>IsSapping</code>
| <code>ScriptDebugRemoveTextFilter()</code>
| <code>bool IsSapping()</code>
| Returns true if we are currently sapping
|-
| <code>IsSnared</code>
| <code>bool IsSnared()</code>
|  
|  
|-
|-
| <code>ScriptDebugRemoveTrace</code>
| <code>IsStealthed</code>
| <code>ScriptDebugRemoveTrace()</code>
| <code>bool IsStealthed()</code>
|  
|  
|-
|-
| <code>ScriptDebugRemoveWatch</code>
| <code>IsUsingActionSlot</code>
| <code>ScriptDebugRemoveWatch()</code>
| <code>bool IsUsingActionSlot()</code>
|  
|  
|-
|-
| <code>ScriptDebugRemoveWatches</code>
| <code>IsViewingCYOAPDA</code>
| <code>ScriptDebugRemoveWatches()</code>
| <code>bool IsViewingCYOAPDA()</code>
|  
|  
|-
|-
| <code>ScriptDebugRemoveWatchPattern</code>
| <code>RemoveAllCond</code>
| <code>ScriptDebugRemoveWatchPattern()</code>
| <code>void RemoveAllCond()</code>
|  
|  
|-
|-
| <code>ScriptDebugText</code>
| <code>RemoveAllObjects</code>
| <code>ScriptDebugText()</code>
| <code>void RemoveAllObjects(bool)</code>
| Remove all player objects. Eg. dispensers/sentries.
|-
| <code>RemoveCond</code>
| <code>void RemoveCond(string)</code>
|  
|  
|-
|-
| <code>ScriptDebugTextDraw</code>
| <code>RemoveCondEx</code>
| <code>ScriptDebugTextDraw()</code>
| <code>void RemoveCondEx(string, bool)</code>
|  
|  
|-
|-
| <code>ScriptDebugTextPrint</code>
| <code>RemoveCustomAttribute</code>
| <code>ScriptDebugTextPrint()</code>
| <code>void RemoveCustomAttribute(string)</code>
| Remove a custom attribute to the player
|-
| <code>RemoveDisguise</code>
| <code>void RemoveDisguise()</code>
| Undisguise a spy.
|-
| <code>RemoveInvisibility</code>
| <code>void RemoveInvisibility()</code>
| Un-invisible a spy.
|-
| <code>ResetScores</code>
| <code>void ResetScores()</code>
|  
|  
|-
|-
| <code>ScriptDebugTextTrace</code>
| <code>SetCondDuration</code>
| <code>ScriptDebugTextTrace()</code>
| <code>void SetCondDuration(string, float)</code>
|  
|  
|-
|-
| <code>ScriptDebugTraceAll</code>
| <code>SetCurrentTauntMoveSpeed</code>
| <code>ScriptDebugTraceAll()</code>
| <code>void SetCurrentTauntMoveSpeed(float)</code>
|  
|  
|-
|-
| <code>ScriptDebugWatches</code>
| <code>SetDisguiseAmmoCount</code>
| <code>ScriptDebugWatches()</code>
| <code>void SetDisguiseAmmoCount(int)</code>
|  
|  
|-
|-
| <code>SendToConsole</code>
| <code>SetGrapplingHookTarget</code>
| <code>void SendToConsole(string)</code>
| <code>void SetGrapplingHookTarget(handle, bool)</code>
| Send a string to the console as a command
| Set the player's target grapple entity
|-
| <code>SetIsMiniBoss</code>
| <code>void SetIsMiniBoss(bool)</code>
| Make this player an MvM mini-boss.
|-
| <code>SetNextChangeClassTime</code>
| <code>void SetNextChangeClassTime(float)</code>
| Set next change class time.
|-
|-
| <code>SendToConsoleServer</code>
| <code>SetNextChangeTeamTime</code>
| <code>void SendToConsoleServer(string)</code>
| <code>void SetNextChangeTeamTime(float)</code>
| Copy of SendToServerConsole with another name for compat.
| Set next change team time.
|-
|-
| <code>SendToServerConsole</code>
| <code>SetNextRegenTime</code>
| <code>void SendToServerConsole(string)</code>
| <code>void SetNextRegenTime(float)</code>
| Send a string that gets executed on the server as a ServerCommand
| Set next health regen time.
|-
|-
| <code>setconsttable</code>
| <code>SetRageMeter</code>
| <code>setconsttable()</code>
| <code>void SetRageMeter(float)</code>
|  
|  
|-
|-
| <code>setdebughook</code>
| <code>SetScoutHypeMeter</code>
| <code>setdebughook()</code>
| <code>void SetScoutHypeMeter(float)</code>
|  
|  
|-
|-
| <code>seterrorhandler</code>
| <code>SetSpyCloakMeter</code>
| <code>seterrorhandler()</code>
| <code>void SetSpyCloakMeter(float)</code>
|  
|  
|-
|-
| <code>SetFakeClientConVarValue</code>
| <code>SetUseBossHealthBar</code>
| <code>void SetFakeClientConVarValue(handle, string, string)</code>
| <code>void SetUseBossHealthBar(bool)</code>
| Sets a USERINFO client ConVar for a fakeclient
|-
| <code>SetGravityMultiplier</code>
| <code>void SetGravityMultiplier(float)</code>
|  
|  
|-
|-
| <code>SetMannVsMachineAlarmStatus</code>
| <code>TryToPickupBuilding</code>
| <code>void SetMannVsMachineAlarmStatus(bool)</code>
| <code>bool TryToPickupBuilding()</code>
|  
| Make the player attempt to pick up a building in front of them
|-
|-
| <code>SetOvertimeAllowedForCTF</code>
| <code>WasInCond</code>
| <code>void SetOvertimeAllowedForCTF(bool)</code>
| <code>bool WasInCond(string)</code>
|  
|  
|}
=== Convars ===
Game Instance: <code>Convars</code>
Provides an interface for getting and setting [[Convar|convars]] on the server.
{{todo|The class for this doesn't seem to be directly available.}}
==== Methods ====
{| class="standard-table" style="width: 100%;"
! Function
! Signature
! Description
|-
|-
| <code>SetPlayersInHell</code>
| <code>GetClientConvarValue</code>
| <code>void SetPlayersInHell(bool)</code>
| <code>string GetClientConvarValue(string ''name'', int ''entindex'')</code>
|  
| Returns the convar value for the entindex as a string. Only works on client convars with the FCVAR_USERINFO flag.
|-
|-
| <code>setroottable</code>
| <code>GetStr</code>
| <code>setroottable()</code>
| <code>string GetStr(string ''name'')</code>
|  
| Returns the convar as a string. May return null if no such convar.
|-
|-
| <code>SetUsingSpells</code>
| <code>GetFloat</code>
| <code>void SetUsingSpells(bool)</code>
| <code>float GetFloat(string ''name'')</code>
|  
| Returns the convar as a float. May return null if no such convar.
|-
|-
| <code>ShowMessage</code>
| <code>SetValue</code>
| <code>void ShowMessage(string)</code>
| <code>void SetValue(string ''name'', ''value'')</code>
| Print a hud message on all clients
| Sets the value of the convar. Supported types are bool, int, float, string.
|}
 
=== CEntities ===
Game Instance: <code>Entities</code>
 
An interface to find and iterate over the script handles for the entities in play.  To iterate over a set of entities, pass null to the ''previous'' parameter in the appropriate method to start an iteration. A reference to a previously-found entity can be used instead to continue a search.
 
The following are two equivalent examples and iterate over all weapons on the map:
 
{| width=100%
|- style="vertical-align:top;"
|
<source lang=js>
local ent = null;
while ( ent = Entities.FindByClassname(ent, "weapon_*") )
{
  // ...
}
</source>
|
<source lang=js>
for (local ent; ent = Entities.FindByName(ent, "weapon_*"); )
{
  // ...
}
</source>
|}
 
{{Note |
* The variable name <code>ent</code> is arbitrary.
* Indeed, we mean "{{=}}" and not "{{=}}{{=}}" in the loop conditions! The loops end if <code>ent</code> becomes <code>null</code>, which happens when no matching entities have an [[entity index]] higher to the one in ''previous'' parameter.
* Semicolons are optional, except in the header of the <code>for</code> statement.
* The string parameters of the <code>FindBy...</code> functions support the wildcard star <code>*</code>. In the above example, <code>FindByClassname</code> only returns either a handle of an entity whose classname begins with "<code>weapon_</code>" or it returns <code>null</code>.
}}
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
|-
| <code>sin</code>
| <code>CreateByClassname</code>
| <code>sin(num)</code>
| <code>handle CreateByClassname(string)</code>
|  
| Creates an entity by classname
|-
|-
| <code>SpawnEntityFromTable</code>
| <code>DispatchSpawn</code>
| <code>handle SpawnEntityFromTable(string, handle)</code>
| <code>void DispatchSpawn(handle)</code>
| Spawn entity from KeyValues in table - 'name' is entity name, rest are KeyValues for spawn.
| Dispatches spawn of an entity!
|-
|-
| <code>SpawnEntityGroupFromTable</code>
| <code>FindByClassname</code>
| <code>bool SpawnEntityGroupFromTable(handle)</code>
| <code>handle FindByClassname(handle, string)</code>
| Hierarchically spawn an entity group from a set of spawn tables.
| Find entities by class name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
|-
| <code>split</code>
| <code>FindByClassnameNearest</code>
| <code>split(string, string)</code>
| <code>handle FindByClassnameNearest(string, Vector, float)</code>
|  
| Find entities by class name nearest to a point.
|-
|-
| <code>sqrt</code>
| <code>FindByClassnameWithin</code>
| <code>sqrt(num)</code>
| <code>handle FindByClassnameWithin(handle, string, Vector, float)</code>
|  
| 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
|-
|-
| <code>srand</code>
| <code>FindByModel</code>
| <code>srand(num)</code>
| <code>handle FindByModel(handle, string)</code>
|  
| Find entities by model name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
|-
| <code>StopAmbientSoundOn</code>
| <code>FindByName</code>
| <code>void StopAmbientSoundOn(string, handle)</code>
| <code>handle FindByName(handle, string)</code>
| Stop named ambient sound on an entity.
| Find entities by name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
|-
| <code>StopSoundOn</code>
| <code>FindByNameNearest</code>
| <code>void StopSoundOn(string, handle)</code>
| <code>handle FindByNameNearest(string, Vector, float)</code>
| Stop named sound on Entity
| Find entities by name nearest to a point.
|-
|-
| <code>StringToFile</code>
| <code>FindByNameWithin</code>
| <code>bool StringToFile(string, string)</code>
| <code>handle FindByNameWithin(handle, string, Vector, float)</code>
| Store a string to a file for later reading
| Find entities by name within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
|-
| <code>strip</code>
| <code>FindByTarget</code>
| <code>strip(string)</code>
| <code>handle FindByTarget(handle, string)</code>
|  
| Find entities by targetname. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
|-
| <code>suspend</code>
| <code>FindInSphere</code>
| <code>suspend()</code>
| <code>handle FindInSphere(handle, Vector, float)</code>
|  
| Find entities within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
| <code>First</code>
| <code>handle First()</code>
| Begin an iteration over the list of entities
|-
|-
| <code>tan</code>
| <code>Next</code>
| <code>tan(num)</code>
| <code>handle Next(handle)</code>
|  
| At the given reference of a previously-found entity, returns the next one after it in the list.
|}
 
 
=== CNetPropManager ===
Game Instance: <code>NetProps</code>
 
Allows reading and updating the [[Networking_Entities#Network_Variables|network properties]] and datamaps of an entity.
 
If the entity has multiple netprops with the same name, the data table name can be prepended with a dot to specify which one to use (e.g. "m_itTimer.m_timestamp").
 
{{tip|List of netprops and datamaps can be found here: https://www.invalidvertex.com/tf2dump.php}}
{{warning|Each netprop has a set size in bits, exceeding the size may desync the clients from the server causing unpredictable behavior.}}
 
==== Methods ====
{| class="standard-table" style="width: 100%;"
! Function
! Signature
! Description
|-
|-
| <code>Time</code>
| <code>GetPropArraySize</code>
| <code>float Time()</code>
| <code>int GetPropArraySize(CBaseEntity ''entity'', string ''propertyName'')</code>
| Get the current server time
| Returns the size of an netprop array, or -1.
|-
|-
| <code>TraceLine</code>
| <code>GetPropEntity</code>
| <code>float TraceLine(Vector, Vector, handle)</code>
| <code>CBaseEntity GetPropEntity(CBaseEntity ''entity'', string ''propertyName'')</code>
| given 2 points & ent to ignore, return fraction along line that hits world or models
| Reads an EHANDLE-valued netprop (21 bit integer). Returns the script handle of the entity.
|-
|-
| <code>TraceLineEx</code>
| <code>GetPropEntityArray</code>
| <code>bool TraceLineEx(handle)</code>
| <code>CBaseEntity GetPropEntityArray(CBaseEntity ''entity'', string ''propertyName'', int ''arrayElement'')</code>
| Pass table - Inputs: start, end, mask, ignore  -- outputs: pos, fraction, hit, enthit, startsolid
| Reads an EHANDLE-valued netprop (21 bit integer) from an array. Returns the script handle of the entity.
|-
|-
| <code>TraceLinePlayersIncluded</code>
| <code>GetPropFloat</code>
| <code>float TraceLinePlayersIncluded(Vector, Vector, handle)</code>
| <code>float GetPropFloat(CBaseEntity ''entity'', string ''propertyName'')</code>
| given 2 points & ent to ignore, return fraction along line that hits world, models, players or npcs
| Reads a float-valued netprop.
|-
|-
| <code>type</code>
| <code>GetPropFloatArray</code>
| <code>type()</code>
| <code>float GetPropFloatArray(CBaseEntity ''entity'', string ''propertyName'', int ''arrayElement'')</code>
|  
| Reads a float-valued netprop from an array.
|-
|-
| <code>UniqueString</code>
| <code>GetPropInt</code>
| <code>function UniqueString(string)</code>
| <code>int GetPropInt(CBaseEntity ''entity'', string ''propertyName'')</code>
| Generate a string guaranteed to be unique across the life of the script VM, with an optional root string. Useful for adding data to tables when not sure what keys are already in use in that table.
| Reads an integer-valued netprop.
|-
|-
| <code>UsePlayerReadyStatusMode</code>
| <code>GetPropIntArray</code>
| <code>bool UsePlayerReadyStatusMode()</code>
| <code>int GetPropIntArray(CBaseEntity ''entity'', string ''propertyName'', int ''arrayElement'')</code>
|  
| Reads an integer-valued netprop from an array.
|-
|-
| <code>VSquirrel_OnCreateScope</code>
| <code>GetPropString</code>
| <code>VSquirrel_OnCreateScope()</code>
| <code>string GetPropString(CBaseEntity ''entity'', string ''propertyName'')</code>
|  
| Reads an string-valued netprop.
|-
|-
| <code>VSquirrel_OnReleaseScope</code>
| <code>GetPropStringArray</code>
| <code>VSquirrel_OnReleaseScope()</code>
| <code>string GetPropStringArray(CBaseEntity ''entity'', string ''propertyName'', int ''arrayElement'')</code>
|  
| Reads an string-valued netprop from an array.
|}
 
=== CBaseEntity ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
|-
| <code>__KeyValueFromFloat</code>
| <code>GetPropType</code>
| <code>__KeyValueFromFloat(string, num)</code>
| <code>string GetPropType(CBaseEntity ''entity'', string ''propertyName'')</code>
|  
| Returns the name of the netprop type as a string.
|-
|-
| <code>__KeyValueFromInt</code>
| <code>GetPropVector</code>
| <code>__KeyValueFromInt(string, num)</code>
| <code>Vector GetPropVector(CBaseEntity ''entity'', string ''propertyName'')</code>
|  
| Reads a 3D vector-valued netprop. {{todo | Does it work for other dimensions too?}}
|-
|-
| <code>__KeyValueFromString</code>
| <code>GetPropVectorArray</code>
| <code>__KeyValueFromString(string, string)</code>
| <code>Vector GetPropVectorArray(CBaseEntity ''entity'', string ''propertyName'', int ''arrayElement'')</code>
|  
| Reads a 3D vector-valued netprop from an array.
|-
| <code>HasProp</code>
| <code>bool HasProp(CBaseEntity ''entity'', string ''propertyName'')</code>
| Checks if a netprop exists.
|-
|-
| <code>__KeyValueFromVector</code>
| <code>SetPropEntity</code>
| <code>__KeyValueFromVector(string, Vector)</code>
| <code>void SetPropEntity(CBaseEntity ''entity'', string ''propertyName'', CBaseEntity ''value'')</code>
|  
| Sets an EHANDLE-valued netprop (21 bit integer) to reference the specified entity.
|-
|-
| <code>ApplyAbsVelocityImpulse</code>
| <code>SetPropEntityArray</code>
| <code>void ApplyAbsVelocityImpulse(Vector)</code>
| <code>void SetPropEntityArray(CBaseEntity ''entity'', string ''propertyName'', CBaseEntity ''value'', int ''arrayElement'')</code>
| Apply a Velocity Impulse
| Sets an EHANDLE-valued netprop (21 bit integer) from an array to reference the specified entity.
|-
|-
| <code>ApplyLocalAngularVelocityImpulse</code>
| <code>SetPropFloat</code>
| <code>void ApplyLocalAngularVelocityImpulse(Vector)</code>
| <code>void SetPropFloat(CBaseEntity ''entity'', string ''propertyName'', float ''value'')</code>
| Apply an Ang Velocity Impulse
| Sets a netprop to the specified float.
|-
|-
| <code>ConnectOutput</code>
| <code>SetPropFloatArray</code>
| <code>void ConnectOutput(string, string)</code>
| <code>void SetPropFloatArray(CBaseEntity ''entity'', string ''propertyName'', float ''value'', int ''arrayElement'')</code>
| Adds an I/O connection that will call the named function when the specified output fires
| Sets a netprop from an array to the specified float.
|-
|-
| <code>Destroy</code>
| <code>SetPropInt</code>
| <code>void Destroy()</code>
| <code>void SetPropInt(CBaseEntity ''entity'', string ''propertyName'', int ''value'')</code>
|  
| Sets a netprop to the specified integer.
|-
|-
| <code>DisableDraw</code>
| <code>SetPropIntArray</code>
| <code>void DisableDraw()</code>
| <code>void SetPropInt(CBaseEntity ''entity'', string ''propertyName'', int ''value'', int ''arrayElement'')</code>
| Enable drawing (removes EF_NODRAW)
| Sets a netprop from an array to the specified integer.
|-
|-
| <code>DisconnectOutput</code>
| <code>SetPropString</code>
| <code>void DisconnectOutput(string, string)</code>
| <code>void SetPropString(CBaseEntity ''entity'', string ''propertyName'', string ''value'')</code>
| Removes a connected script function from an I/O event.
| Sets a netprop to the specified string.
|-
|-
| <code>DispatchSpawn</code>
| <code>SetPropStringArray</code>
| <code>void DispatchSpawn()</code>
| <code>void SetPropStringArray(CBaseEntity ''entity'', string ''propertyName'', string ''value'', int ''arrayElement'')</code>
| Alternative dispatch spawn, same as the one in CEntities, for convenience.
| Sets a netprop from an array to the specified string.
|-
|-
| <code>EmitSound</code>
| <code>SetPropVector</code>
| <code>void EmitSound(string)</code>
| <code>void SetPropVector(CBaseEntity ''entity'', string ''propertyName'', Vector ''value'')</code>
| Plays a sound from this entity.
| Sets a netprop to the specified vector.
|-
|-
| <code>EnableDraw</code>
| <code>SetPropVectorArray</code>
| <code>void EnableDraw()</code>
| <code>void SetPropVectorArray(CBaseEntity ''entity'', string ''propertyName'', Vector ''value'', int ''arrayElement'')</code>
| Disable drawing (sets EF_NODRAW)
| Sets a netprop from an array to the specified vector.
|}
 
 
=== CScriptEntityOutputs ===
Game Instance: <code>EntityOutputs</code>
 
Allows reading and manipulation of entity output data.
 
==== Methods ====
{| class="standard-table" style="width: 100%;"
! Function
! Signature
! Description
|-
|-
| <code>entindex</code>
| <code>AddOutput</code>
| <code>int entindex()</code>
| <code>void AddOutput(CBaseEntity ''entity'', string ''outputName'', string ''targetName'', string ''inputName'', string ''parameter'', float ''delay'', int ''timesToFire'')</code>
|  
| Adds a new output to the entity.
|-
|-
| <code>EyePosition</code>
| <code>GetNumElements</code>
| <code>Vector EyePosition()</code>
| <code>int GetNumElements(CBaseEntity ''entity'', string ''outputName'')</code>
| Get vector to eye position - absolute coords
| Returns the number of array elements.
|-
|-
| <code>FirstMoveChild</code>
| <code>GetOutputTable</code>
| <code>handle FirstMoveChild()</code>
| <code>void GetOutputTable(CBaseEntity ''entity'', string ''outputName'', table, int ''arrayElement'')</code>
|  
| Fills the passed table with output information.
|-
|-
| <code>GetAbsAngles</code>
| <code>HasAction</code>
| <code>QAngle GetAbsAngles()</code>
| <code>bool HasAction(CBaseEntity ''entity'', string ''outputName'')</code>
| Get entity pitch, yaw, roll as QAngles
| Returns true if an action exists for the output.
|-
|-
| <code>GetAngles</code>
| <code>HasOutput</code>
| <code>Vector GetAngles()</code>
| <code>bool HasOutput(CBaseEntity ''entity'', string ''outputName'')</code>
| !!!LEGACY FOR COMPAT!!! DO NOT USE ME. Get entity pitch, yaw, roll as a vector
| Returns true if the output exists.
|-
|-
| <code>GetAngularVelocity</code>
| <code>RemoveOutput</code>
| <code>Vector GetAngularVelocity()</code>
| <code>void RemoveOutput(CBaseEntity ''entity'', string ''outputName'', string ''targetName'', string ''inputName'', string ''parameter'')</code>
| Get the local angular velocity - returns a vector of pitch,yaw,roll
| Removes an output from the entity.
|}
 
 
=== CScriptKeyValues ===
Script handle representation of a model's [[$keyvalues]] block.
All sub-keys are instances of the same class.
 
==== Methods ====
{| class="standard-table" style="width: 100%;"
! Function
! Signature
! Description
|-
|-
| <code>GetBaseVelocity</code>
| <code>constructor</code>
| <code>Vector GetBaseVelocity()</code>
| Get Base? velocity
|-
|-
| <code>GetBoundingMaxs</code>
| <code>FindKey</code>
| <code>Vector GetBoundingMaxs()</code>
| <code>CScriptKeyValues FindKey(string ''key'')</code>
| Get a vector containing max bounds, centered on object
| Find a sub key by the key name.
|-
|-
| <code>GetBoundingMaxsOriented</code>
| <code>GetFirstSubKey</code>
| <code>Vector GetBoundingMaxsOriented()</code>
| <code>CScriptKeyValues GetFirstSubKey()</code>
| Get a vector containing max bounds, centered on object, taking the object's orientation into account
| Return the first sub key object.
|-
|-
| <code>GetBoundingMins</code>
| <code>GetKeyBool</code>
| <code>Vector GetBoundingMins()</code>
| <code>bool GetKeyBool(string ''key'')</code>
| Get a vector containing min bounds, centered on object
| Return the key value as a bool.
|-
|-
| <code>GetBoundingMinsOriented</code>
| <code>GetKeyFloat</code>
| <code>Vector GetBoundingMinsOriented()</code>
| <code>float GetKeyFloat(string ''key'')</code>
| Get a vector containing min bounds, centered on object, taking the object's orientation into account
| Return the key value as a float.
|-
|-
| <code>GetCenter</code>
| <code>GetKeyInt</code>
| <code>Vector GetCenter()</code>
| <code>int GetKeyInt(string ''key'')</code>
| Get vector to center of object - absolute coords
| Return the key value as an integer.
|-
|-
| <code>GetClassname</code>
| <code>GetKeyString</code>
| <code>string GetClassname()</code>
| <code>string GetKeyString(string ''key'')</code>
|  
| Return the key value as a string.
|-
|-
| <code>GetEntityHandle</code>
| <code>GetNextKey</code>
| <code><unknown> GetEntityHandle()</code>
| <code>CScriptKeyValues GetNextKey()</code>
| Get the entity as an EHANDLE
| Return the next neighbor key object to the one the method is called on.
|-
|-
| <code>GetEntityIndex</code>
| <code>IsKeyEmpty</code>
| <code>int GetEntityIndex()</code>
| <code>bool IsKeyEmpty(string ''key'')</code>
|  
| Returns true if the named key has no value.
|-
|-
| <code>GetForwardVector</code>
| <code>IsValid</code>
| <code>Vector GetForwardVector()</code>
| <code>bool IsValid()</code>
| Get the forward vector of the entity
| Whether the handle belongs to a valid key.
|-
|-
| <code>GetFriction</code>
| <code>ReleaseKeyValues</code>
| <code>float GetFriction()</code>
| <code>void ReleaseKeyValues()</code>
| Get PLAYER friction, ignored for objects
| Releases the contents of the instance.
|}
 
 
=== CPlayerVoiceListener ===
{{todo|What instances use this class?}}
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
|-
| <code>GetHealth</code>
| <code>GetPlayerSpeechDuration</code>
| <code>int GetHealth()</code>
| <code>float GetPlayerSpeechDuration(int)</code>
|  
| Returns the number of seconds the player has been continuously speaking.
|-
|-
| <code>GetLeftVector</code>
| <code>IsPlayerSpeaking</code>
| <code>Vector GetLeftVector()</code>
| <code>bool IsPlayerSpeaking(int)</code>
| !!!LEGACY FOR COMPAT!!! Get the **right** vector of the entity. This is purely for compatibility. DO NOT USE ME. Use GetRightVector!
| Returns whether the player specified is speaking.
|-
|}
| <code>GetLocalAngles</code>
 
| <code>QAngle GetLocalAngles()</code>
 
|  
=== CEnvEntityMaker ===
Extends [[#CBaseEntity|CBaseEntity]]
 
Script handle class for {{ent|env_entity_maker}}.
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
| <code>SpawnEntity</code>
| <code>void SpawnEntity()</code>
| Create an entity at the location of the maker
|-
|-
| <code>GetLocalOrigin</code>
| <code>SpawnEntityAtEntityOrigin</code>
| <code>Vector GetLocalOrigin()</code>
| <code>void SpawnEntityAtEntityOrigin(handle)</code>
|  
| Create an entity at the location of a specified entity instance
|-
|-
| <code>GetLocalVelocity</code>
| <code>SpawnEntityAtLocation</code>
| <code>Vector GetLocalVelocity()</code>
| <code>void SpawnEntityAtLocation(Vector, Vector)</code>
| Get Entity relative velocity
| Create an entity at a specified location and orientaton, orientation is Euler angle in degrees (pitch, yaw, roll)
|-
|-
| <code>GetMaxHealth</code>
| <code>SpawnEntityAtNamedEntityOrigin</code>
| <code>int GetMaxHealth()</code>
| <code>void SpawnEntityAtNamedEntityOrigin(string)</code>
| Create an entity at the location of a named entity
|  
|  
|}
=== CFuncTrackTrain ===
Extends [[#CBaseEntity|CBaseEntity]]
Script handle class for {{ent|func_tracktrain}}.
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
|-
| <code>GetModelKeyValues</code>
| <code>GetFuturePosition</code>
| <code>handle GetModelKeyValues()</code>
| <code>Vector GetFuturePosition(float, float)</code>
| Get a KeyValue class instance on this entity's model
| Get a position on the track x seconds in the future
|-
|
| <code>GetModelName</code>
|}
| <code>string GetModelName()</code>
 
| Returns the name of the model
 
=== CPointScriptTemplate ===
Extends [[#CBaseEntity|CBaseEntity]]
 
Script handle class for {{ent|point_script_template}}.
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
|-
| <code>GetMoveParent</code>
| <code>AddTemplate</code>
| <code>handle GetMoveParent()</code>
| <code>void AddTemplate(string, handle)</code>
| If in hierarchy, retrieves the entity's parent
| Add an entity to the template spawner
|-
|-
| <code>GetName</code>
| <code>SetGroupSpawnTables</code>
| <code>string GetName()</code>
| <code>void SetGroupSpawnTables(handle, handle)</code>
|  
| Cache the group spawn tables
|-
|}
| <code>GetOrigin</code>
 
| <code>Vector GetOrigin()</code>
 
| This is GetAbsOrigin with a funny script name for some reason. Not changing it for legacy compat though.
=== CSceneEntity ===
Extends [[#CBaseEntity|CBaseEntity]]
 
Script handle class for {{ent|scripted_scene}}, which make use of [[VCD]] data.
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
|-
| <code>GetOwner</code>
| <code>AddBroadcastTeamTarget</code>
| <code>handle GetOwner()</code>
| <code>void AddBroadcastTeamTarget(int)</code>
| Gets this entity's owner
| Adds a team (by index) to the broadcast list
|-
|-
| <code>GetPreTemplateName</code>
| <code>EstimateLength</code>
| <code>string GetPreTemplateName()</code>
| <code>float EstimateLength()</code>
| Get the entity name stripped of template unique decoration
| Returns length of this scene in seconds.
|-
|-
| <code>GetRightVector</code>
| <code>FindNamedEntity</code>
| <code>Vector GetRightVector()</code>
| <code>handle FindNamedEntity(string)</code>
| Get the right vector of the entity
| given an entity reference, such as !target, get actual entity from scene object
|-
|-
| <code>GetRootMoveParent</code>
| <code>IsPaused</code>
| <code>handle GetRootMoveParent()</code>
| <code>bool IsPaused()</code>
| If in hierarchy, walks up the hierarchy to find the root parent
| If this scene is currently paused.
|-
|-
| <code>GetScriptId</code>
| <code>IsPlayingBack</code>
| <code>string GetScriptId()</code>
| <code>bool IsPlayingBack()</code>
| Retrieve the unique identifier used to refer to the entity within the scripting system
| If this scene is currently playing.
|-
|-
| <code>GetScriptScope</code>
| <code>LoadSceneFromString</code>
| <code>handle GetScriptScope()</code>
| <code>bool LoadSceneFromString(string, string)</code>
| Retrieve the script-side data associated with an entity
| given a dummy scene name and a vcd string, load the scene
|-
|-
| <code>GetSoundDuration</code>
| <code>RemoveBroadcastTeamTarget</code>
| <code>float GetSoundDuration(string, string)</code>
| <code>void RemoveBroadcastTeamTarget(int)</code>
| Returns float duration of the sound. Takes soundname and optional actormodelname.
| Removes a team (by index) from the broadcast list
|}
 
 
=== CSimpleCallChainer ===
Has the same members as [[#CCallChainer|CCallChainer]].
{{todo}}
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
|-
| <code>GetTeam</code>
| <code>Call</code>
| <code>int GetTeam()</code>
| <code>Call()</code>
|  
|  
|-
|-
| <code>GetUpVector</code>
| <code>chain</code>
| <code>Vector GetUpVector()</code>
| <code>chain()</code>
| Get the up vector of the entity
|  
|-
|-
| <code>GetVelocity</code>
| <code>constructor</code>
| <code>Vector GetVelocity()</code>
| <code>constructor()</code>
|  
|  
|-
|-
| <code>IsPlayer</code>
| <code>PostScriptExecute</code>
| <code>bool IsPlayer()</code>
| <code>PostScriptExecute()</code>
|  
|  
|-
|-
| <code>IsValid</code>
| <code>prefix</code>
| <code>IsValid()</code>
| <code>prefix()</code>
|  
|  
|-
|-
| <code>KeyValueFromFloat</code>
| <code>scope</code>
| <code>bool KeyValueFromFloat(string, float)</code>
| <code>scope()</code>
| Executes KeyValue with a float
|  
|}
 
=== CCallChainer ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
|-
| <code>KeyValueFromInt</code>
| <code>Call</code>
| <code>bool KeyValueFromInt(string, int)</code>
| <code>Call()</code>
| Executes KeyValue with an int
|  
|-
|-
| <code>KeyValueFromString</code>
| <code>chains</code>
| <code>bool KeyValueFromString(string, string)</code>
| <code>chains()</code>
| Executes KeyValue with a string
|  
|-
|-
| <code>KeyValueFromVector</code>
| <code>constructor</code>
| <code>bool KeyValueFromVector(string, Vector)</code>
| <code>constructor()</code>
| Executes KeyValue with a vector
|-
| <code>Kill</code>
| <code>void Kill()</code>
|  
|  
|-
|-
| <code>NextMovePeer</code>
| <code>PostScriptExecute</code>
| <code>handle NextMovePeer()</code>
| <code>PostScriptExecute()</code>
|  
|  
|-
|-
| <code>PrecacheModel</code>
| <code>prefix</code>
| <code>void PrecacheModel(string)</code>
| <code>prefix()</code>
|  
|  
|-
|-
| <code>PrecacheScriptSound</code>
| <code>scope</code>
| <code>void PrecacheScriptSound(string)</code>
| <code>scope()</code>
|  
|  
|}
=== LateBinder ===
{{todo}}
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
|-
| <code>PrecacheSoundScript</code>
| <code>Begin</code>
| <code>void PrecacheSoundScript(string)</code>
| <code>Begin()</code>
| Precache a sound for later playing.
|  
|-
|-
| <code>SetAbsAngles</code>
| <code>End</code>
| <code>void SetAbsAngles(QAngle)</code>
| <code>End()</code>
| Set entity pitch, yaw, roll as QAngles
|  
|-
|-
| <code>SetAbsOrigin</code>
| <code>EstablishDelegation</code>
| <code>void SetAbsOrigin(Vector)</code>
| <code>EstablishDelegation()</code>
| SetAbsOrigin
|  
|-
|-
| <code>SetAngles</code>
| <code>HookRootMetamethod</code>
| <code>void SetAngles(float, float, float)</code>
| <code>HookRootMetamethod()</code>
| !!!LEGACY FOR COMPAT!!! DO NOT USE ME. Set entity pitch, yaw, roll
|  
|-
|-
| <code>SetAngularVelocity</code>
| <code>Log</code>
| <code>void SetAngularVelocity(float, float, float)</code>
| <code>Log()</code>
| Set the local angular velocity - takes float pitch,yaw,roll velocities
|  
|-
|-
| <code>SetDrawEnabled</code>
| <code>m_bindNamesStack</code>
| <code>void SetDrawEnabled(bool)</code>
| <code>m_bindNamesStack()</code>
| Enables drawing if you pass true, disables drawing if you pass false.
|  
|-
|-
| <code>SetForwardVector</code>
| <code>m_fixupSet</code>
| <code>void SetForwardVector(Vector)</code>
| <code>m_fixupSet()</code>
| Set the orientation of the entity to have this forward vector
|  
|-
|-
| <code>SetFriction</code>
| <code>m_targetTable</code>
| <code>void SetFriction(float)</code>
| <code>m_targetTable()</code>
| Set PLAYER friction, ignored for objects
|-
| <code>SetGravity</code>
| <code>void SetGravity(float)</code>
| Set PLAYER gravity, ignored for objects
|-
| <code>SetHealth</code>
| <code>void SetHealth(int)</code>
|  
|  
|-
|-
| <code>SetLocalAngles</code>
| <code>RemoveDelegation</code>
| <code>void SetLocalAngles(QAngle)</code>
| <code>RemoveDelegation()</code>
|  
|  
|-
|-
| <code>SetLocalOrigin</code>
| <code>Resolve</code>
| <code>void SetLocalOrigin(Vector)</code>
| <code>Resolve()</code>
|  
|  
|-
|-
| <code>SetMaxHealth</code>
| <code>UnhookRootMetamethod</code>
| <code>void SetMaxHealth(int)</code>
| <code>UnhookRootMetamethod()</code>
|  
|  
|}
=== regexp ===
The built-in [http://squirrel-lang.org/doc/sqstdlib3.html#d0e2591 Squirrel class] for regular expressions.
==== Methods ====
{| class="standard-table" style="width: 100%;"
! Function
! Signature
! Description
|-
|-
| <code>SetModel</code>
| <code>constructor</code>
| <code>void SetModel(string)</code>
| <code>regexp()</code>
| Set a model for this entity
|  
|-
|-
| <code>SetOrigin</code>
| <code>capture</code>
| <code>void SetOrigin(Vector)</code>
| <code>table capture(''str'', [''start''])</code>
| THIS DOESNT CALL SetAbsOrigin IT CALLS Teleport
| Returns an array of tables containing two indexes ("begin" and "end") of the first match of the regular expression in the string str. An array entry is created for each captured sub expressions. If no match occurs returns null. The search starts from the index start of the string, if start is omitted the search starts from the beginning of the string.
|-
|-
| <code>SetOwner</code>
| <code>match</code>
| <code>void SetOwner(handle)</code>
| <code> bool match(''str'')</code>
| Sets this entity's owner
| Returns a true if the regular expression matches the string str, otherwise returns false.
|-
|-
| <code>SetSize</code>
| <code>search</code>
| <code>void SetSize(Vector, Vector)</code>
| <code>table search(''str'', [''start''])</code>
|  
| Returns a table containing two indexes ("begin" and "end") of the first match of the regular expression in the string ''str'', otherwise if no match occurs returns null. The search starts from the index start of the string, if start is omitted the search starts from the beginning of the string.
|-
|-
| <code>SetTeam</code>
| <code>subexpcount</code>
| <code>void SetTeam(int)</code>
| <code>subexpcount()</code>
|  
|  
|-
|}
| <code>SetVelocity</code>
 
| <code>void SetVelocity(Vector)</code>
== Data Types ==
|
|-
| <code>StopSound</code>
| <code>void StopSound(string)</code>
| Stops a sound on this entity.
|-
| <code>TakeDamage</code>
| <code>void TakeDamage(float, int, handle)</code>
| (flDamage, nDamageType, hAttacker)
|-
| <code>TakeDamageEx</code>
| <code>void TakeDamageEx(handle, handle, handle, Vector, Vector, float, int)</code>
| (hInflictor, hAttacker, hWeapon, vecDamageForce, vecDamagePosition, flDamage, nDamageType)
|-
| <code>ValidateScriptScope</code>
| <code>bool ValidateScriptScope()</code>
| Ensure that an entity's script scope has been created
|}


=== CBaseAnimating ===
=== Vector ===
Squirrel equivalent of the C++ [[Vector]] class. A three-dimensional vector with overloaded arithmetic operations for both Vectors and scalar values. {{todo}}


{| class = "standard-table" style = "width: 85%;"
==== Methods ====
{| class="standard-table" style="width: 100%;"
! Function
! Function
! Signature
! Signature
! Description
! Description
|-
|-
| <code>__KeyValueFromFloat</code>
| <code>constructor</code>
| <code>__KeyValueFromFloat(string, num)</code>
| <code>Vector()</code>
|  
| Creates a new null vector.
|-
|-
| <code>__KeyValueFromInt</code>
| <code>constructor</code>
| <code>__KeyValueFromInt(string, num)</code>
| <code>Vector(float ''x'', float ''y'', float ''z'')</code>
|  
| Creates a new vector with the specified Cartesian coordiantes.
|-
|-
| <code>__KeyValueFromString</code>
| <code>Cross</code>
| <code>__KeyValueFromString(string, string)</code>
| <code>float Cross(Vector ''factor'')</code>
|  
| The vector product of two vectors. Returns a vector orthogonal to the input vectors.
|-
|-
| <code>__KeyValueFromVector</code>
| <code>Dot</code>
| <code>__KeyValueFromVector(string, Vector)</code>
| <code>float Dot(Vector ''factor'')</code>
|  
| The scalar product of two vectors.
|-
|-
| <code>ApplyAbsVelocityImpulse</code>
| <code>Length</code>
| <code>ApplyAbsVelocityImpulse(Vector)</code>
| <code>float Length()</code>
|  
| Magnitude of the vector.
|-
| <code>LengthSqr</code>
| <code>float LengthSqr()</code>
| The magnitude of the vector squared. Faster than the above method.
|-
|-
| <code>ApplyLocalAngularVelocityImpulse</code>
| <code>Length2D</code>
| <code>ApplyLocalAngularVelocityImpulse(Vector)</code>
| <code>float Length2D()</code>
|  
| Returns the magnitude of the vector on the x-y plane. Meant to be used when working with the client's HUD.
|-
|-
| <code>ConnectOutput</code>
| <code>Length2DSqr</code>
| <code>ConnectOutput(string, string)</code>
| <code>float Length2DSqr()</code>
|  
| Returns the square of the magnitude of the vector on the x-y plane. Faster than the above method.
|-
|-
| <code>Destroy</code>
| <code>Norm</code>
| <code>Destroy()</code>
| <code>float Norm()</code>
|  
| Seems to also return the vector length.
|-
|-
| <code>DisableDraw</code>
| <code>Scale</code>
| <code>DisableDraw()</code>
| <code>Vector Scale(float ''factor'')</code>
|  
| Scales the vector magnitude.
|-
|-
| <code>DisconnectOutput</code>
| <code>ToKVString</code>
| <code>DisconnectOutput(string, string)</code>
| <code>string ToKVString()</code>
|  
| Returns a string without separations commas.
|-
|-
| <code>DispatchSpawn</code>
| <code>tostring</code>
| <code>DispatchSpawn()</code>
| <code>string tostring()</code>
|  
| Returns a human-readable string.
|}
 
 
==== Members ====
{| class="standard-table" style="width: 100%;"
! Instance
! Type
! Description
|-
|-
| <code>EmitSound</code>
| <code>x</code>
| <code>EmitSound(string)</code>
| <code>float</code>
|  
| Cartesian X axis.
|-
|-
| <code>EnableDraw</code>
| <code>y</code>
| <code>EnableDraw()</code>
| <code>float</code>
|  
| Cartesian Y axis.
|-
|-
| <code>entindex</code>
| <code>z</code>
| <code>entindex()</code>
| <code>float</code>
|  
| Cartesian Z axis.
|}
 
==== Operations ====
 
{| class="standard-table" style="width: 100%;"
! Operation
! Description
|-
|-
| <code>EyePosition</code>
| <code>Vector + Vector</code>
| <code>EyePosition()</code>
| Returns the sum of two Vectors.
|  
|-
|-
| <code>FindBodygroupByName</code>
| <code>Vector - Vector</code>
| <code>int FindBodygroupByName(string)</code>
| Returns the subtraction of two Vectors.
| Find a bodygroup id by name
|-
| <code>Vector * Vector</code>
| Returns the multiplication of two Vectors.
|-
| <code>Vector / Vector</code>
| Returns the division of two Vectors.
|
|}
 
==== QAngle ====
Squirrel equivalent of the C++ [[QAngle]] class. Represents a three-dimensional orientation as Euler angles.
 
Has overloaded arithmetic operations with both QAngles and scalar values. {{todo}}
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
|-
| <code>FirstMoveChild</code>
| <code>constructor</code>
| <code>FirstMoveChild()</code>
| <code>constructor()</code>
|  
|  
|-
|-
| <code>GetAbsAngles</code>
| <code>Forward</code>
| <code>GetAbsAngles()</code>
| <code>Forward()</code>
|  
|  
|-
|-
| <code>GetAngles</code>
| <code>Left</code>
| <code>GetAngles()</code>
| <code>Left()</code>
|  
|  
|-
|-
| <code>GetAngularVelocity</code>
| <code>Pitch</code>
| <code>GetAngularVelocity()</code>
| <code>Pitch()</code>
|  
|  
|-
|-
| <code>GetAttachmentAngles</code>
| <code>Roll</code>
| <code>QAngle GetAttachmentAngles(int)</code>
| <code>Roll()</code>
| Get the attachement id's angles as a p,y,r vector
|  
|-
|-
| <code>GetAttachmentBone</code>
| <code>ToKVString</code>
| <code>int GetAttachmentBone(int)</code>
| <code>ToKVString()</code>
| Get the named attachement's parent bone index
|  
|-
|-
| <code>GetAttachmentOrigin</code>
| <code>ToQuat</code>
| <code>Vector GetAttachmentOrigin(int)</code>
| <code>ToQuat()</code>
| Get the attachement id's origin vector
|  
|-
|-
| <code>GetBaseVelocity</code>
| <code>Up</code>
| <code>GetBaseVelocity()</code>
| <code>Up()</code>
|  
|  
|-
|-
| <code>GetBodygroup</code>
| <code>Yaw</code>
| <code>int GetBodygroup(int)</code>
| <code>Yaw()</code>
| Get a bodygroup by id
|  
|}
 
 
=== Vector2D, Vector4D ===
Two and four-dimensional equivalents to Vector.
 
==== Methods ====
{| class="standard-table" style="width: 100%;"
! Function
! Signature
! Description
|-
|-
| <code>GetBodygroupName</code>
| <code>constructor</code>
| <code>string GetBodygroupName(int)</code>
| <code>Vector''X''D(float ''x'', float ''y'', ...)</code>
| Get the bodygroup id's name
| Creates a new vector with the specified Cartesian coordiantes.
|-
|-
| <code>GetBodygroupPartName</code>
| <code>Dot</code>
| <code>string GetBodygroupPartName(int, int)</code>
| <code>float Dot(Vector''X''D ''factor'')</code>
| Get name by group and part
| The scalar product of two vectors.
|-
|-
| <code>GetBoneAngles</code>
| <code>Length</code>
| <code>QAngle GetBoneAngles(int)</code>
| <code>float Length()</code>
| Get the bone id's angles as a p,y,r vector
| Magnitude of the vector.
|-
|-
| <code>GetBoneOrigin</code>
| <code>LengthSqr</code>
| <code>Vector GetBoneOrigin(int)</code>
| <code>float LengthSqr()</code>
| Get the bone id's origin vector
| The magnitude of the vector squared. Faster than the above method.
|-
|-
| <code>GetBoundingMaxs</code>
| <code>Norm</code>
| <code>GetBoundingMaxs()</code>
| <code>float Norm()</code>
|  
| Seems to also return the vector length.
|-
|-
| <code>GetBoundingMaxsOriented</code>
| <code>ToKVString</code>
| <code>GetBoundingMaxsOriented()</code>
| <code>string ToKVString()</code>
|  
| Returns a string without separations commas.
|}
 
 
=== Quaternion ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
|-
| <code>GetBoundingMins</code>
| <code>constructor</code>
| <code>GetBoundingMins()</code>
| <code>constructor()</code>
|  
|  
|-
|-
| <code>GetBoundingMinsOriented</code>
| <code>Dot</code>
| <code>GetBoundingMinsOriented()</code>
| <code>Dot()</code>
|  
|  
|-
|-
| <code>GetCenter</code>
| <code>Invert</code>
| <code>GetCenter()</code>
| <code>Invert()</code>
|  
|  
|-
|-
| <code>GetClassname</code>
| <code>Norm</code>
| <code>GetClassname()</code>
| <code>Norm()</code>
|  
|  
|-
|-
| <code>GetEntityHandle</code>
| <code>SetPitchYawRoll</code>
| <code>GetEntityHandle()</code>
| <code>SetPitchYawRoll(num, num, num)</code>
|  
|  
|-
|-
| <code>GetEntityIndex</code>
| <code>ToKVString</code>
| <code>GetEntityIndex()</code>
| <code>ToKVString()</code>
|  
|  
|-
|-
| <code>GetForwardVector</code>
| <code>ToQAngle</code>
| <code>GetForwardVector()</code>
| <code>ToQAngle()</code>
|
|-
| <code>GetFriction</code>
| <code>GetFriction()</code>
|  
|  
|}
=== Globals ===
{{todo|Split this section up (especially the built-in Squirrel functions)}}
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
|-
| <code>GetHealth</code>
| <code>__CollectEventCallbacks</code>
| <code>GetHealth()</code>
| <code>__CollectEventCallbacks()</code>
|  
|  
|-
|-
| <code>GetLeftVector</code>
| <code>__CollectGameEventCallbacks</code>
| <code>GetLeftVector()</code>
| <code>__CollectGameEventCallbacks()</code>
|  
|  
|-
|-
| <code>GetLocalAngles</code>
| <code>__DumpScope</code>
| <code>GetLocalAngles()</code>
| <code>__DumpScope()</code>
|  
|  
|-
|-
| <code>GetLocalOrigin</code>
| <code>__ReplaceClosures</code>
| <code>GetLocalOrigin()</code>
| <code>__ReplaceClosures()</code>
|  
|  
|-
|-
| <code>GetLocalVelocity</code>
| <code>__RunEventCallbacks</code>
| <code>GetLocalVelocity()</code>
| <code>__RunEventCallbacks()</code>
|  
|  
|-
|-
| <code>GetMaxHealth</code>
| <code>__RunGameEventCallbacks</code>
| <code>GetMaxHealth()</code>
| <code>__RunGameEventCallbacks()</code>
|  
|  
|-
|-
| <code>GetModelKeyValues</code>
| <code>__VScriptServerDebugHook</code>
| <code>GetModelKeyValues()</code>
| <code>__VScriptServerDebugHook()</code>
|  
|  
|-
|-
| <code>GetModelName</code>
| <code>abs</code>
| <code>GetModelName()</code>
| <code>abs(num)</code>
|  
|  
|-
|-
| <code>GetModelScale</code>
| <code>acos</code>
| <code>float GetModelScale()</code>
| <code>acos(num)</code>
|  
|  
|-
|-
| <code>GetMoveParent</code>
| <code>AddThinkToEnt</code>
| <code>GetMoveParent()</code>
| <code>void AddThinkToEnt(handle, string)</code>
|  
| Adds a late bound think function to the C++ think tables for the obj
|-
|-
| <code>GetName</code>
| <code>AddToScriptHelp</code>
| <code>GetName()</code>
| <code>AddToScriptHelp()</code>
|  
|  
|-
|-
| <code>GetOrigin</code>
| <code>AllowThirdPersonCamera</code>
| <code>GetOrigin()</code>
| <code>bool AllowThirdPersonCamera()</code>
|  
|  
|-
|-
| <code>GetOwner</code>
| <code>ArePlayersInHell</code>
| <code>GetOwner()</code>
| <code>bool ArePlayersInHell()</code>
|  
|  
|-
|-
| <code>GetPreTemplateName</code>
| <code>array</code>
| <code>GetPreTemplateName()</code>
| <code>array(num)</code>
|  
|  
|-
|-
| <code>GetRightVector</code>
| <code>asin</code>
| <code>GetRightVector()</code>
| <code>asin(num)</code>
|  
|  
|-
|-
| <code>GetRootMoveParent</code>
| <code>assert</code>
| <code>GetRootMoveParent()</code>
| <code>assert()</code>
|  
|  
|-
|-
| <code>GetScriptId</code>
| <code>Assert</code>
| <code>GetScriptId()</code>
| <code>Assert()</code>
|  
|  
|-
|-
| <code>GetScriptScope</code>
| <code>atan</code>
| <code>GetScriptScope()</code>
| <code>atan(num)</code>
|  
|  
|-
|-
| <code>GetSequence</code>
| <code>atan2</code>
| <code>int GetSequence()</code>
| <code>atan2(num, num)</code>
| Get the current sequence id
|  
|-
|-
| <code>GetSequenceActivityName</code>
| <code>BeginScriptDebug</code>
| <code>string GetSequenceActivityName(int)</code>
| <code>BeginScriptDebug()</code>
| Get the activity name for a sequence by id
|  
|-
|-
| <code>GetSequenceDuration</code>
| <code>callee</code>
| <code>float GetSequenceDuration(int)</code>
| <code>callee()</code>
| Get a sequence duration by id
|-
| <code>GetSequenceName</code>
| <code>string GetSequenceName(int)</code>
| Get a sequence name by id
|-
| <code>GetSkin</code>
| <code>int GetSkin()</code>
| Gets the current skin index.
|-
| <code>GetSoundDuration</code>
| <code>GetSoundDuration(string, string)</code>
|  
|  
|-
|-
| <code>GetTeam</code>
| <code>ceil</code>
| <code>GetTeam()</code>
| <code>ceil(num)</code>
|  
|  
|-
|-
| <code>GetUpVector</code>
| <code>ClearGameEventCallbacks</code>
| <code>GetUpVector()</code>
| <code>ClearGameEventCallbacks()</code>
|  
|  
|-
|-
| <code>GetVelocity</code>
| <code>ClientPrint</code>
| <code>GetVelocity()</code>
| <code>void ClientPrint(handle, int, string)</code>
|  
| Print a client message
|-
|-
| <code>IsPlayer</code>
| <code>collectgarbage</code>
| <code>IsPlayer()</code>
| <code>collectgarbage()</code>
|  
|  
|-
|-
| <code>IsSequenceFinished</code>
| <code>compilestring</code>
| <code>bool IsSequenceFinished()</code>
| <code>compilestring(string, string)</code>
| Ask whether the main sequence is done playing
|-
| <code>IsValid</code>
| <code>IsValid()</code>
|  
|  
|-
|-
| <code>KeyValueFromFloat</code>
| <code>cos</code>
| <code>KeyValueFromFloat(string, num)</code>
| <code>cos(num)</code>
|  
|  
|-
|-
| <code>KeyValueFromInt</code>
| <code>CreateProp</code>
| <code>KeyValueFromInt(string, num)</code>
| <code>handle CreateProp(string, Vector, string, int)</code>
|  
| Create a physics prop
|-
|-
| <code>KeyValueFromString</code>
| <code>CreateSceneEntity</code>
| <code>KeyValueFromString(string, string)</code>
| <code>handle CreateSceneEntity(string)</code>
|  
| Create a scene entity to play the specified scene.
|-
|-
| <code>KeyValueFromVector</code>
| <code>DebugDrawBox</code>
| <code>KeyValueFromVector(string, Vector)</code>
| <code>void DebugDrawBox(Vector, Vector, int, int, int, int, float)</code>
|  
| Draw a debug overlay box
|-
|-
| <code>Kill</code>
| <code>DebugDrawBoxAngles</code>
| <code>Kill()</code>
| <code>void DebugDrawBoxAngles(Vector, Vector, Vector, QAngle, Vector, float, float)</code>
|  
| Draw a debug oriented box (cent, min, max, angles(p,y,r), vRgb, a, duration)
|-
|-
| <code>LookupActivity</code>
| <code>DebugDrawBoxDirection</code>
| <code>int LookupActivity(string)</code>
| <code>void DebugDrawBoxDirection(Vector, Vector, Vector, Vector, Vector, float, float)</code>
| Get the named activity index
| Draw a debug forward box (cent, min, max, forward, vRgb, a, duration)
|-
|-
| <code>LookupAttachment</code>
| <code>DebugDrawCircle</code>
| <code>int LookupAttachment(string)</code>
| <code>void DebugDrawCircle(Vector, Vector, float, float, bool, float)</code>
| Get the named attachement id
| Draw a debug circle (center, rad, vRgb, a, ztest, duration)
|-
|-
| <code>LookupBone</code>
| <code>DebugDrawClear</code>
| <code>int LookupBone(string)</code>
| <code>void DebugDrawClear()</code>
| Get the named bone index
| Try to clear all the debug overlay info
|-
|-
| <code>LookupSequence</code>
| <code>DebugDrawLine</code>
| <code>int LookupSequence(string)</code>
| <code>void DebugDrawLine(Vector, Vector, int, int, int, bool, float)</code>
| Looks up a sequence by sequence name or activity name
| Draw a debug overlay line
|-
|-
| <code>NextMovePeer</code>
| <code>DebugDrawLine_vCol</code>
| <code>NextMovePeer()</code>
| <code>void DebugDrawLine_vCol(Vector, Vector, Vector, bool, float)</code>
|  
| Draw a debug line using color vec (start, end, vRgb, a, ztest, duration)
|-
|-
| <code>PrecacheModel</code>
| <code>DebugDrawScreenTextLine</code>
| <code>PrecacheModel(string)</code>
| <code>void DebugDrawScreenTextLine(float, float, int, string, int, int, int, int, float)</code>
|  
| Draw text with a line offset
|-
|-
| <code>PrecacheScriptSound</code>
| <code>DebugDrawText</code>
| <code>PrecacheScriptSound(string)</code>
| <code>void DebugDrawText(Vector, string, bool, float)</code>
|  
| Draw text in 3d (origin, text, bViewCheck, duration)
|-
|-
| <code>PrecacheSoundScript</code>
| <code>developer</code>
| <code>PrecacheSoundScript(string)</code>
| <code>developer()</code>
|  
|  
|-
|-
| <code>ResetSequence</code>
| <code>DispatchParticleEffect</code>
| <code>void ResetSequence(int)</code>
| <code>void DispatchParticleEffect(string, Vector, Vector)</code>
| Reset a sequence by id. If the id is different than the current sequence, switch to the new sequence
| Dispatches a one-off particle system
|-
|-
| <code>SetAbsAngles</code>
| <code>Document</code>
| <code>SetAbsAngles(Vector)</code>
| <code>Document()</code>
|  
|  
|-
|-
| <code>SetAbsOrigin</code>
| <code>DoEntFire</code>
| <code>SetAbsOrigin(Vector)</code>
| <code>DoEntFire(string, string, string, num, Vector, Vector)</code>
|  
|  
|-
|-
| <code>SetAngles</code>
| <code>DoIncludeScript</code>
| <code>SetAngles(num, num, num)</code>
| <code>bool DoIncludeScript(string, handle)</code>
|  
| Execute a script (internal)
|-
|-
| <code>SetAngularVelocity</code>
| <code>DoUniqueString</code>
| <code>SetAngularVelocity(num, num, num)</code>
| <code>DoUniqueString(string)</code>
|  
|  
|-
|-
| <code>SetBodygroup</code>
| <code>dummy</code>
| <code>void SetBodygroup(int, int)</code>
| <code>dummy()</code>
| Sets a bodygroup
|-
| <code>SetDrawEnabled</code>
| <code>SetDrawEnabled(bool)</code>
|  
|  
|-
|-
| <code>SetForwardVector</code>
| <code>DumpObject</code>
| <code>SetForwardVector(Vector)</code>
| <code>DumpObject()</code>
|  
|  
|-
|-
| <code>SetFriction</code>
| <code>EmitAmbientSoundOn</code>
| <code>SetFriction(num)</code>
| <code>void EmitAmbientSoundOn(string, float, int, int, handle)</code>
|  
| Play named ambient sound on an entity.
|-
|-
| <code>SetGravity</code>
| <code>EmitSoundOn</code>
| <code>SetGravity(num)</code>
| <code>void EmitSoundOn(string, handle)</code>
|  
| Play named sound on Entity
|-
|-
| <code>SetHealth</code>
| <code>EmitSoundOnClient</code>
| <code>SetHealth(num)</code>
| <code>void EmitSoundOnClient(string, handle)</code>
|  
| Play named sound only on the client for the passed in player
|-
|-
| <code>SetLocalAngles</code>
| <code>enabledebuginfo</code>
| <code>SetLocalAngles(Vector)</code>
| <code>enabledebuginfo()</code>
|  
|  
|-
|-
| <code>SetLocalOrigin</code>
| <code>EndScriptDebug</code>
| <code>SetLocalOrigin(Vector)</code>
| <code>EndScriptDebug()</code>
|  
|  
|-
|-
| <code>SetMaxHealth</code>
| <code>EntFire</code>
| <code>SetMaxHealth(num)</code>
| <code>function EntFire(target, action, value, delay, activator)</code>
|  
| Generate and entity i/o event
|-
|-
| <code>SetModel</code>
| <code>EntFireByHandle</code>
| <code>SetModel(string)</code>
| <code>void EntFireByHandle(handle, string, string, float, handle, handle)</code>
|  
| Generate and entity i/o event. First parameter is an entity instance.
|-
|-
| <code>SetModelScale</code>
| <code>EntIndexToHScript</code>
| <code>void SetModelScale(float, float)</code>
| <code>handle EntIndexToHScript(int)</code>
| (scale, change_duration) Changes a model's scale over time
| Turn an entity index integer to an HScript representing that entity's script instance.
|-
|-
| <code>SetOrigin</code>
| <code>error</code>
| <code>SetOrigin(Vector)</code>
| <code>error()</code>
|  
|  
|-
|-
| <code>SetOwner</code>
| <code>exp</code>
| <code>SetOwner(Vector)</code>
| <code>exp(num)</code>
|  
|  
|-
|-
| <code>SetPoseParameter</code>
| <code>fabs</code>
| <code>float SetPoseParameter(int, float)</code>
| <code>fabs(num)</code>
| (id, value) Sets a pose parameter value
|-
| <code>SetSequence</code>
| <code>void SetSequence(int)</code>
| Set a sequence by id
|-
| <code>SetSize</code>
| <code>SetSize(Vector, Vector)</code>
|  
|  
|-
|-
| <code>SetSkin</code>
| <code>FileToString</code>
| <code>void SetSkin(int)</code>
| <code>string FileToString(string)</code>
| Sets the skin.
| Reads a string from a file to send to script
|-
|-
| <code>SetTeam</code>
| <code>FindCircularReference</code>
| <code>SetTeam(num)</code>
| <code>FindCircularReference()</code>
|  
|  
|-
|-
| <code>SetVelocity</code>
| <code>FindCircularReferences</code>
| <code>SetVelocity(Vector)</code>
| <code>FindCircularReferences()</code>
|  
|  
|-
|-
| <code>StopSound</code>
| <code>FireGameEvent</code>
| <code>StopSound(string)</code>
| <code>bool FireGameEvent(string, handle)</code>
|  
| Fire a game event to a listening callback function in script. Parameters are passed in a squirrel table.
|-
|-
| <code>TakeDamage</code>
| <code>FireScriptEvent</code>
| <code>TakeDamage(num, num, Vector)</code>
| <code>FireScriptEvent()</code>
|  
|  
|-
|-
| <code>TakeDamageEx</code>
| <code>FlagsMayBeCapped</code>
| <code>TakeDamageEx(Vector, Vector, Vector, Vector, Vector, num, num)</code>
| <code>bool FlagsMayBeCapped()</code>
|  
| May a flag be captured?
|-
|-
| <code>ValidateScriptScope</code>
| <code>floor</code>
| <code>ValidateScriptScope()</code>
| <code>floor(num)</code>
|  
|  
|}
=== CBaseMultiplayerPlayer ===
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
|-
| <code>__KeyValueFromFloat</code>
| <code>format</code>
| <code>__KeyValueFromFloat(string, num)</code>
| <code>format(string)</code>
|  
|  
|-
|-
| <code>__KeyValueFromInt</code>
| <code>FrameTime</code>
| <code>__KeyValueFromInt(string, num)</code>
| <code>float FrameTime()</code>
|  
| Get the time spent on the server in the last frame
|-
|-
| <code>__KeyValueFromString</code>
| <code>GameModeUsesCurrency</code>
| <code>__KeyValueFromString(string, string)</code>
| <code>bool GameModeUsesCurrency()</code>
|  
| Does the current gamemode have currency?
|-
|-
| <code>__KeyValueFromVector</code>
| <code>GameModeUsesMiniBosses</code>
| <code>__KeyValueFromVector(string, Vector)</code>
| <code>bool GameModeUsesMiniBosses()</code>
|  
| Does the current gamemode have minibosses?
|-
|-
| <code>ApplyAbsVelocityImpulse</code>
| <code>GameModeUsesUpgrades</code>
| <code>ApplyAbsVelocityImpulse(Vector)</code>
| <code>bool GameModeUsesUpgrades()</code>
|  
| Does the current gamemode have upgrades?
|-
|-
| <code>ApplyLocalAngularVelocityImpulse</code>
| <code>GetClassLimit</code>
| <code>ApplyLocalAngularVelocityImpulse(Vector)</code>
| <code>int GetClassLimit(int)</code>
|  
| Get class limit for class. Indices:
|-
|-
| <code>ConnectOutput</code>
| <code>getconsttable</code>
| <code>ConnectOutput(string, string)</code>
| <code>getconsttable()</code>
|  
|  
|-
|-
| <code>Destroy</code>
| <code>GetDeveloperLevel</code>
| <code>Destroy()</code>
| <code>int GetDeveloperLevel()</code>
|  
| Gets the level of 'developer'
|-
|-
| <code>DisableDraw</code>
| <code>GetFrameCount</code>
| <code>DisableDraw()</code>
| <code>int GetFrameCount()</code>
|  
| Returns the engines current frame count
|-
|-
| <code>DisconnectOutput</code>
| <code>GetFriction</code>
| <code>DisconnectOutput(string, string)</code>
| <code>float GetFriction(handle)</code>
|  
| Returns the Friction on a player entity, meaningless if not a player
|-
|-
| <code>DispatchSpawn</code>
| <code>GetFunctionSignature</code>
| <code>DispatchSpawn()</code>
| <code>GetFunctionSignature()</code>
|  
|  
|-
|-
| <code>EmitSound</code>
| <code>GetGravityMultiplier</code>
| <code>EmitSound(string)</code>
| <code>float GetGravityMultiplier()</code>
|  
|  
|-
|-
| <code>EnableDraw</code>
| <code>GetListenServerHost</code>
| <code>EnableDraw()</code>
| <code>handle GetListenServerHost()</code>
|  
| Get the local player on a listen server.
|-
|-
| <code>entindex</code>
| <code>GetMannVsMachineAlarmStatus</code>
| <code>entindex()</code>
| <code>bool GetMannVsMachineAlarmStatus()</code>
|  
|  
|-
|-
| <code>EyePosition</code>
| <code>GetMapName</code>
| <code>EyePosition()</code>
| <code>string GetMapName()</code>
|  
| Get the name of the map.
|-
|-
| <code>FindBodygroupByName</code>
| <code>GetModelIndex</code>
| <code>FindBodygroupByName(string)</code>
| <code>int GetModelIndex(string)</code>
|  
| Returns the index of the named model.
|-
|-
| <code>FirstMoveChild</code>
| <code>GetOvertimeAllowedForCTF</code>
| <code>FirstMoveChild()</code>
| <code>bool GetOvertimeAllowedForCTF()</code>
|  
|  
|-
|-
| <code>GetAbsAngles</code>
| <code>GetPhysAngularVelocity</code>
| <code>GetAbsAngles()</code>
| <code>Vector GetPhysAngularVelocity(handle)</code>
|  
| Get Angular Velocity for VPHYS or normal object
|-
|-
| <code>GetAngles</code>
| <code>GetPhysVelocity</code>
| <code>GetAngles()</code>
| <code>Vector GetPhysVelocity(handle)</code>
|  
| Get Velocity for VPHYS or normal object
|-
|-
| <code>GetAngularVelocity</code>
| <code>GetPlayerFromUserID</code>
| <code>GetAngularVelocity()</code>
| <code>handle GetPlayerFromUserID(int)</code>
|  
| Given a user id, return the entity, or null
|-
|-
| <code>GetAttachmentAngles</code>
| <code>getroottable</code>
| <code>GetAttachmentAngles(num)</code>
| <code>getroottable()</code>
|  
|  
|-
|-
| <code>GetAttachmentBone</code>
| <code>GetRoundState</code>
| <code>GetAttachmentBone(num)</code>
| <code>int GetRoundState()</code>
|  
| Get current round state. Indices:
|-
|-
| <code>GetAttachmentOrigin</code>
| <code>GetSoundDuration</code>
| <code>GetAttachmentOrigin(num)</code>
| <code>float GetSoundDuration(string, string)</code>
|  
| Returns float duration of the sound. Takes soundname and optional actormodelname.
|-
|-
| <code>GetBaseVelocity</code>
| <code>getstackinfos</code>
| <code>GetBaseVelocity()</code>
| <code>getstackinfos(num)</code>
|  
|  
|-
|-
| <code>GetBodygroup</code>
| <code>GetStopWatchState</code>
| <code>GetBodygroup(num)</code>
| <code>int GetStopWatchState()</code>
|  
| Get the current stopwatch state. Indices:
|-
|-
| <code>GetBodygroupName</code>
| <code>GetWinningTeam</code>
| <code>GetBodygroupName(num)</code>
| <code>int GetWinningTeam()</code>
|  
| Who won!
|-
|-
| <code>GetBodygroupPartName</code>
| <code>HaveStopWatchWinner</code>
| <code>GetBodygroupPartName(num, num)</code>
| <code>bool HaveStopWatchWinner()</code>
|  
|  
|-
|-
| <code>GetBoneAngles</code>
| <code>IncludeScript</code>
| <code>GetBoneAngles(num)</code>
| <code>IncludeScript()</code>
|  
|  
|-
|-
| <code>GetBoneOrigin</code>
| <code>InMatchStartCountdown</code>
| <code>GetBoneOrigin(num)</code>
| <code>bool InMatchStartCountdown()</code>
|  
| Are we in the pre-match state?
|-
|-
| <code>GetBoundingMaxs</code>
| <code>InOvertime</code>
| <code>GetBoundingMaxs()</code>
| <code>bool InOvertime()</code>
|  
| Currently in overtime?
|-
|-
| <code>GetBoundingMaxsOriented</code>
| <code>IsAttackDefenseMode</code>
| <code>GetBoundingMaxsOriented()</code>
| <code>bool IsAttackDefenseMode()</code>
|  
|  
|-
|-
| <code>GetBoundingMins</code>
| <code>IsBirthday</code>
| <code>GetBoundingMins()</code>
| <code>bool IsBirthday()</code>
|  
| Are we in birthday mode?
|-
|-
| <code>GetBoundingMinsOriented</code>
| <code>IsCompetitiveMode</code>
| <code>GetBoundingMinsOriented()</code>
| <code>bool IsCompetitiveMode()</code>
|  
| Playing competitive?
|-
|-
| <code>GetCenter</code>
| <code>IsDedicatedServer</code>
| <code>GetCenter()</code>
| <code>bool IsDedicatedServer()</code>
|  
| Returns true if this server is a dedicated server.
|-
|-
| <code>GetClassname</code>
| <code>IsDefaultGameMode</code>
| <code>GetClassname()</code>
| <code>bool IsDefaultGameMode()</code>
|  
| The absence of arena, mvm, tournament mode, etc
|-
|-
| <code>GetEntityHandle</code>
| <code>IsHolidayActive</code>
| <code>GetEntityHandle()</code>
| <code>bool IsHolidayActive(int)</code>
|  
| Is the given holiday active? Indices:
|-
|-
| <code>GetEntityIndex</code>
| <code>IsHolidayMap</code>
| <code>GetEntityIndex()</code>
| <code>bool IsHolidayMap(int)</code>
|  
| Playing a holiday map? Indices:
|-
|-
| <code>GetForwardVector</code>
| <code>IsInArenaMode</code>
| <code>GetForwardVector()</code>
| <code>bool IsInArenaMode()</code>
|  
| Playing arena mode?
|-
|-
| <code>GetFriction</code>
| <code>IsInKothMode</code>
| <code>GetFriction()</code>
| <code>bool IsInKothMode()</code>
|  
| Playing king of the hill mode?
|-
|-
| <code>GetHealth</code>
| <code>IsInMedievalMode</code>
| <code>GetHealth()</code>
| <code>bool IsInMedievalMode()</code>
|  
| Playing medieval mode?
|-
|-
| <code>GetLeftVector</code>
| <code>IsInWaitingForPlayers</code>
| <code>GetLeftVector()</code>
| <code>bool IsInWaitingForPlayers()</code>
|  
| Are we waiting for some stragglers?
|-
|-
| <code>GetLocalAngles</code>
| <code>IsMannVsMachineMode</code>
| <code>GetLocalAngles()</code>
| <code>bool IsMannVsMachineMode()</code>
|  
| Playing MvM? Beep boop
|-
|-
| <code>GetLocalOrigin</code>
| <code>IsMannVsMachineRespecEnabled</code>
| <code>GetLocalOrigin()</code>
| <code>bool IsMannVsMachineRespecEnabled()</code>
|  
| Are players allowed to refund their upgrades?
|-
|-
| <code>GetLocalVelocity</code>
| <code>IsMatchTypeCasual</code>
| <code>GetLocalVelocity()</code>
| <code>bool IsMatchTypeCasual()</code>
|  
| Playing casual?
|-
|-
| <code>GetMaxHealth</code>
| <code>IsMatchTypeCompetitive</code>
| <code>GetMaxHealth()</code>
| <code>bool IsMatchTypeCompetitive()</code>
|  
| Playing competitive?
|-
|-
| <code>GetModelKeyValues</code>
| <code>IsModelPrecached</code>
| <code>GetModelKeyValues()</code>
| <code>bool IsModelPrecached(string)</code>
|  
| Checks if the modelname is precached.
|-
| <code>IsPasstimeMode</code>
| <code>bool IsPasstimeMode()</code>
| No ball games.
|-
|-
| <code>GetModelName</code>
| <code>IsPlayerABot</code>
| <code>GetModelName()</code>
| <code>bool IsPlayerABot(handle)</code>
|  
| Is this player/entity a bot
|-
|-
| <code>GetModelScale</code>
| <code>IsPowerupMode</code>
| <code>GetModelScale()</code>
| <code>bool IsPowerupMode()</code>
|  
| Playing powerup mode? Not compatible with MvM
|-
|-
| <code>GetMoveParent</code>
| <code>IsPVEModeActive</code>
| <code>GetMoveParent()</code>
| <code>bool IsPVEModeActive()</code>
|  
|  
|-
|-
| <code>GetName</code>
| <code>IsQuickBuildTime</code>
| <code>GetName()</code>
| <code>bool IsQuickBuildTime()</code>
|  
| If an engie places a building, will it immediately upgrade? Eg. MvM pre-round etc.
|-
|-
| <code>GetOrigin</code>
| <code>IsSoundPrecached</code>
| <code>GetOrigin()</code>
| <code>bool IsSoundPrecached(string)</code>
|  
| Takes a sound name
|-
|-
| <code>GetOwner</code>
| <code>IsTruceActive</code>
| <code>GetOwner()</code>
| <code>bool IsTruceActive()</code>
|  
|  
|-
|-
| <code>GetPreTemplateName</code>
| <code>IsUsingGrapplingHook</code>
| <code>GetPreTemplateName()</code>
| <code>bool IsUsingGrapplingHook()</code>
|  
|  
|-
|-
| <code>GetRightVector</code>
| <code>IsUsingSpells</code>
| <code>GetRightVector()</code>
| <code>bool IsUsingSpells()</code>
|  
|  
|-
|-
| <code>GetRootMoveParent</code>
| <code>IsWeakref</code>
| <code>GetRootMoveParent()</code>
| <code>IsWeakref()</code>
|  
|  
|-
|-
| <code>GetScriptId</code>
| <code>LocalTime</code>
| <code>GetScriptId()</code>
| <code>void LocalTime(handle)</code>
|  
| Fills out a table with the local time (second, minute, hour, day, month, year, dayofweek, dayofyear, daylightsavings)
|-
|-
| <code>GetScriptScope</code>
| <code>log</code>
| <code>GetScriptScope()</code>
| <code>log(num)</code>
|  
|  
|-
|-
| <code>GetSequence</code>
| <code>log10</code>
| <code>GetSequence()</code>
| <code>log10(num)</code>
|  
|  
|-
|-
| <code>GetSequenceActivityName</code>
| <code>lstrip</code>
| <code>GetSequenceActivityName(num)</code>
| <code>lstrip(string)</code>
|  
|  
|-
|-
| <code>GetSequenceDuration</code>
| <code>MakeNamespace</code>
| <code>GetSequenceDuration(num)</code>
| <code>MakeNamespace()</code>
|  
|  
|-
|-
| <code>GetSequenceName</code>
| <code>MapHasMatchSummaryStage</code>
| <code>GetSequenceName(num)</code>
| <code>bool MapHasMatchSummaryStage()</code>
|  
|  
|-
|-
| <code>GetSkin</code>
| <code>MatchmakingShouldUseStopwatchMode</code>
| <code>GetSkin()</code>
| <code>bool MatchmakingShouldUseStopwatchMode()</code>
|  
|  
|-
|-
| <code>GetSoundDuration</code>
| <code>Msg</code>
| <code>GetSoundDuration(string, string)</code>
| <code>Msg()</code>
|  
|  
|-
|-
| <code>GetTeam</code>
| <code>newthread</code>
| <code>GetTeam()</code>
| <code>newthread(Vector)</code>
|  
|  
|-
|-
| <code>GetUpVector</code>
| <code>PickupObject</code>
| <code>GetUpVector()</code>
| <code>void PickupObject(handle, handle)</code>
|  
| Have a player pickup a nearby named entity
|-
|-
| <code>GetVelocity</code>
| <code>PlayerInstanceFromIndex</code>
| <code>GetVelocity()</code>
| <code>handle PlayerInstanceFromIndex(int)</code>
|  
| Get a script instance of a player by index.
|-
|-
| <code>IsNoclipping</code>
| <code>PlayerReadyStatus_ArePlayersOnTeamReady</code>
| <code>IsNoclipping()</code>
| <code>bool PlayerReadyStatus_ArePlayersOnTeamReady(int)</code>
|  
|  
|-
|-
| <code>IsPlayer</code>
| <code>PlayerReadyStatus_HaveMinPlayersToEnable</code>
| <code>IsPlayer()</code>
| <code>bool PlayerReadyStatus_HaveMinPlayersToEnable()</code>
|  
|  
|-
|-
| <code>IsSequenceFinished</code>
| <code>PlayerReadyStatus_ResetState</code>
| <code>IsSequenceFinished()</code>
| <code>void PlayerReadyStatus_ResetState()</code>
|  
|  
|-
|-
| <code>IsValid</code>
| <code>PlayersAreOnMatchSummaryStage</code>
| <code>IsValid()</code>
| <code>bool PlayersAreOnMatchSummaryStage()</code>
|  
|  
|-
|-
| <code>KeyValueFromFloat</code>
| <code>PointsMayBeCaptured</code>
| <code>KeyValueFromFloat(string, num)</code>
| <code>bool PointsMayBeCaptured()</code>
|  
| Are points able to be captured?
|-
|-
| <code>KeyValueFromInt</code>
| <code>pow</code>
| <code>KeyValueFromInt(string, num)</code>
| <code>pow(num, num)</code>
|  
|  
|-
|-
| <code>KeyValueFromString</code>
| <code>PrecacheEntityFromTable</code>
| <code>KeyValueFromString(string, string)</code>
| <code>bool PrecacheEntityFromTable(handle)</code>
|  
| Precache an entity from KeyValues in table
|-
|-
| <code>KeyValueFromVector</code>
| <code>PrecacheModel</code>
| <code>KeyValueFromVector(string, Vector)</code>
| <code>void PrecacheModel(string)</code>
|  
| Precache a model.
|-
|-
| <code>Kill</code>
| <code>PrecacheSound</code>
| <code>Kill()</code>
| <code>void PrecacheSound(string)</code>
|  
| Precache a sound.
|-
|-
| <code>LookupActivity</code>
| <code>print</code>
| <code>LookupActivity(string)</code>
| <code>print()</code>
|  
|  
|-
|-
| <code>LookupAttachment</code>
| <code>PrintHelp</code>
| <code>LookupAttachment(string)</code>
| <code>PrintHelp()</code>
|  
|  
|-
|-
| <code>LookupBone</code>
| <code>printl</code>
| <code>LookupBone(string)</code>
| <code>printl()</code>
|  
|  
|-
|-
| <code>LookupSequence</code>
| <code>rand</code>
| <code>LookupSequence(string)</code>
| <code>rand()</code>
|  
|  
|-
|-
| <code>NextMovePeer</code>
| <code>RandomFloat</code>
| <code>NextMovePeer()</code>
| <code>float RandomFloat(float, float)</code>
|  
| Generate a random floating point number within a range, inclusive
|-
| <code>RandomInt</code>
| <code>int RandomInt(int, int)</code>
| Generate a random integer within a range, inclusive
|-
|-
| <code>PrecacheModel</code>
| <code>realPrint</code>
| <code>PrecacheModel(string)</code>
| <code>realPrint()</code>
|  
|  
|-
|-
| <code>PrecacheScriptSound</code>
| <code>RegisterFunctionDocumentation</code>
| <code>PrecacheScriptSound(string)</code>
| <code>RegisterFunctionDocumentation()</code>
|  
|  
|-
|-
| <code>PrecacheSoundScript</code>
| <code>RegisterScriptGameEventListener</code>
| <code>PrecacheSoundScript(string)</code>
| <code>void RegisterScriptGameEventListener(string)</code>
|  
| Register as a listener for a game event from script.
|-
|-
| <code>ResetSequence</code>
| <code>resurrectunreachable</code>
| <code>ResetSequence(num)</code>
| <code>resurrectunreachable()</code>
|  
|  
|-
|-
| <code>SetAbsAngles</code>
| <code>RetrieveNativeSignature</code>
| <code>SetAbsAngles(Vector)</code>
| <code>RetrieveNativeSignature()</code>
|  
|  
|-
|-
| <code>SetAbsOrigin</code>
| <code>RotateOrientation</code>
| <code>SetAbsOrigin(Vector)</code>
| <code>QAngle RotateOrientation(QAngle, QAngle)</code>
|  
| Rotate a QAngle by another QAngle.
|-
| <code>RotatePosition</code>
| <code>Vector RotatePosition(Vector, QAngle, Vector)</code>
| Rotate a Vector around a point.
|-
|-
| <code>SetAngles</code>
| <code>rstrip</code>
| <code>SetAngles(num, num, num)</code>
| <code>rstrip(string)</code>
|  
|  
|-
|-
| <code>SetAngularVelocity</code>
| <code>Say</code>
| <code>SetAngularVelocity(num, num, num)</code>
| <code>void Say(handle, string, bool)</code>
|  
| Have Entity say string, and teamOnly or not
|-
|-
| <code>SetBodygroup</code>
| <code>ScreenFade</code>
| <code>SetBodygroup(num, num)</code>
| <code>void ScreenFade(handle, int, int, int, int, float, float, int)</code>
|  
| Start a screenfade with the following parameters. player, red, green, blue, alpha, flFadeTime, flFadeHold, flags
|-
|-
| <code>SetDrawEnabled</code>
| <code>ScreenShake</code>
| <code>SetDrawEnabled(bool)</code>
| <code>void ScreenShake(Vector, float, float, float, float, int, bool)</code>
|  
| Start a screenshake with the following parameters. vecCenter, flAmplitude, flFrequency, flDuration, flRadius, eCommand( SHAKE_START = 0, SHAKE_STOP = 1 ), bAirShake
|-
|-
| <code>SetForwardVector</code>
| <code>ScriptDebugAddTextFilter</code>
| <code>SetForwardVector(Vector)</code>
| <code>ScriptDebugAddTextFilter()</code>
|  
|  
|-
|-
| <code>SetFriction</code>
| <code>ScriptDebugAddTrace</code>
| <code>SetFriction(num)</code>
| <code>ScriptDebugAddTrace()</code>
|  
|  
|-
|-
| <code>SetGravity</code>
| <code>ScriptDebugAddWatch</code>
| <code>SetGravity(num)</code>
| <code>ScriptDebugAddWatch()</code>
|  
|  
|-
|-
| <code>SetHealth</code>
| <code>ScriptDebugAddWatches</code>
| <code>SetHealth(num)</code>
| <code>ScriptDebugAddWatches()</code>
|  
|  
|-
|-
| <code>SetLocalAngles</code>
| <code>ScriptDebugAddWatchPattern</code>
| <code>SetLocalAngles(Vector)</code>
| <code>ScriptDebugAddWatchPattern()</code>
|  
|  
|-
|-
| <code>SetLocalOrigin</code>
| <code>ScriptDebugClearTraces</code>
| <code>SetLocalOrigin(Vector)</code>
| <code>ScriptDebugClearTraces()</code>
|  
|  
|-
|-
| <code>SetMaxHealth</code>
| <code>ScriptDebugClearWatches</code>
| <code>SetMaxHealth(num)</code>
| <code>ScriptDebugClearWatches()</code>
|  
|  
|-
|-
| <code>SetModel</code>
| <code>ScriptDebugDefaultWatchColor</code>
| <code>SetModel(string)</code>
| <code>ScriptDebugDefaultWatchColor()</code>
|  
|  
|-
|-
| <code>SetModelScale</code>
| <code>ScriptDebugDraw</code>
| <code>SetModelScale(num, num)</code>
| <code>ScriptDebugDraw()</code>
|  
|  
|-
|-
| <code>SetOrigin</code>
| <code>ScriptDebugDrawWatches</code>
| <code>SetOrigin(Vector)</code>
| <code>ScriptDebugDrawWatches()</code>
|  
|  
|-
|-
| <code>SetOwner</code>
| <code>ScriptDebugDumpKeys</code>
| <code>SetOwner(Vector)</code>
| <code>ScriptDebugDumpKeys()</code>
|  
|  
|-
|-
| <code>SetPoseParameter</code>
| <code>ScriptDebugHook</code>
| <code>SetPoseParameter(num, num)</code>
| <code>ScriptDebugHook()</code>
|  
|  
|-
|-
| <code>SetSequence</code>
| <code>ScriptDebugIterateKeys</code>
| <code>SetSequence(num)</code>
| <code>ScriptDebugIterateKeys()</code>
|  
|  
|-
|-
| <code>SetSize</code>
| <code>ScriptDebugIterateKeysRecursive</code>
| <code>SetSize(Vector, Vector)</code>
| <code>ScriptDebugIterateKeysRecursive()</code>
|  
|  
|-
|-
| <code>SetSkin</code>
| <code>ScriptDebugRemoveTextFilter</code>
| <code>SetSkin(num)</code>
| <code>ScriptDebugRemoveTextFilter()</code>
|  
|  
|-
|-
| <code>SetTeam</code>
| <code>ScriptDebugRemoveTrace</code>
| <code>SetTeam(num)</code>
| <code>ScriptDebugRemoveTrace()</code>
|  
|  
|-
|-
| <code>SetVelocity</code>
| <code>ScriptDebugRemoveWatch</code>
| <code>SetVelocity(Vector)</code>
| <code>ScriptDebugRemoveWatch()</code>
|  
|  
|-
|-
| <code>StopSound</code>
| <code>ScriptDebugRemoveWatches</code>
| <code>StopSound(string)</code>
| <code>ScriptDebugRemoveWatches()</code>
|  
|  
|-
|-
| <code>TakeDamage</code>
| <code>ScriptDebugRemoveWatchPattern</code>
| <code>TakeDamage(num, num, Vector)</code>
| <code>ScriptDebugRemoveWatchPattern()</code>
|  
|  
|-
|-
| <code>TakeDamageEx</code>
| <code>ScriptDebugText</code>
| <code>TakeDamageEx(Vector, Vector, Vector, Vector, Vector, num, num)</code>
| <code>ScriptDebugText()</code>
|  
|  
|-
|-
| <code>ValidateScriptScope</code>
| <code>ScriptDebugTextDraw</code>
| <code>ValidateScriptScope()</code>
| <code>ScriptDebugTextDraw()</code>
|  
|  
|}
=== CBasePlayer ===
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
|-
| <code>__KeyValueFromFloat</code>
| <code>ScriptDebugTextPrint</code>
| <code>__KeyValueFromFloat(string, num)</code>
| <code>ScriptDebugTextPrint()</code>
|  
|  
|-
|-
| <code>__KeyValueFromInt</code>
| <code>ScriptDebugTextTrace</code>
| <code>__KeyValueFromInt(string, num)</code>
| <code>ScriptDebugTextTrace()</code>
|  
|  
|-
|-
| <code>__KeyValueFromString</code>
| <code>ScriptDebugTraceAll</code>
| <code>__KeyValueFromString(string, string)</code>
| <code>ScriptDebugTraceAll()</code>
|  
|  
|-
|-
| <code>__KeyValueFromVector</code>
| <code>ScriptDebugWatches</code>
| <code>__KeyValueFromVector(string, Vector)</code>
| <code>ScriptDebugWatches()</code>
|  
|  
|-
|-
| <code>ApplyAbsVelocityImpulse</code>
| <code>SendToConsole</code>
| <code>ApplyAbsVelocityImpulse(Vector)</code>
| <code>void SendToConsole(string)</code>
|  
| Send a string to the console as a command
|-
|-
| <code>ApplyLocalAngularVelocityImpulse</code>
| <code>SendToConsoleServer</code>
| <code>ApplyLocalAngularVelocityImpulse(Vector)</code>
| <code>void SendToConsoleServer(string)</code>
|  
| Copy of SendToServerConsole with another name for compat.
|-
|-
| <code>ConnectOutput</code>
| <code>SendToServerConsole</code>
| <code>ConnectOutput(string, string)</code>
| <code>void SendToServerConsole(string)</code>
|  
| Send a string that gets executed on the server as a ServerCommand
|-
|-
| <code>Destroy</code>
| <code>setconsttable</code>
| <code>Destroy()</code>
| <code>setconsttable()</code>
|  
|  
|-
|-
| <code>DisableDraw</code>
| <code>setdebughook</code>
| <code>DisableDraw()</code>
| <code>setdebughook()</code>
|  
|  
|-
|-
| <code>DisconnectOutput</code>
| <code>seterrorhandler</code>
| <code>DisconnectOutput(string, string)</code>
| <code>seterrorhandler()</code>
|  
|  
|-
|-
| <code>DispatchSpawn</code>
| <code>SetFakeClientConVarValue</code>
| <code>DispatchSpawn()</code>
| <code>void SetFakeClientConVarValue(handle, string, string)</code>
|  
| Sets a USERINFO client ConVar for a fakeclient
|-
|-
| <code>EmitSound</code>
| <code>SetGravityMultiplier</code>
| <code>EmitSound(string)</code>
| <code>void SetGravityMultiplier(float)</code>
|  
|  
|-
|-
| <code>EnableDraw</code>
| <code>SetMannVsMachineAlarmStatus</code>
| <code>EnableDraw()</code>
| <code>void SetMannVsMachineAlarmStatus(bool)</code>
|  
|  
|-
|-
| <code>entindex</code>
| <code>SetOvertimeAllowedForCTF</code>
| <code>entindex()</code>
| <code>void SetOvertimeAllowedForCTF(bool)</code>
|  
|  
|-
|-
| <code>EyePosition</code>
| <code>SetPlayersInHell</code>
| <code>EyePosition()</code>
| <code>void SetPlayersInHell(bool)</code>
|  
|  
|-
|-
| <code>FindBodygroupByName</code>
| <code>setroottable</code>
| <code>FindBodygroupByName(string)</code>
| <code>setroottable()</code>
|  
|  
|-
|-
| <code>FirstMoveChild</code>
| <code>SetUsingSpells</code>
| <code>FirstMoveChild()</code>
| <code>void SetUsingSpells(bool)</code>
|  
|  
|-
|-
| <code>GetAbsAngles</code>
| <code>ShowMessage</code>
| <code>GetAbsAngles()</code>
| <code>void ShowMessage(string)</code>
|  
| Print a hud message on all clients
|-
|-
| <code>GetAngles</code>
| <code>sin</code>
| <code>GetAngles()</code>
| <code>sin(num)</code>
|  
|  
|-
|-
| <code>GetAngularVelocity</code>
| <code>SpawnEntityFromTable</code>
| <code>GetAngularVelocity()</code>
| <code>handle SpawnEntityFromTable(string, handle)</code>
|  
| Spawn entity from KeyValues in table - 'name' is entity name, rest are KeyValues for spawn.
|-
|-
| <code>GetAttachmentAngles</code>
| <code>SpawnEntityGroupFromTable</code>
| <code>GetAttachmentAngles(num)</code>
| <code>bool SpawnEntityGroupFromTable(handle)</code>
|  
| Hierarchically spawn an entity group from a set of spawn tables.
|-
|-
| <code>GetAttachmentBone</code>
| <code>split</code>
| <code>GetAttachmentBone(num)</code>
| <code>split(string, string)</code>
|  
|  
|-
|-
| <code>GetAttachmentOrigin</code>
| <code>sqrt</code>
| <code>GetAttachmentOrigin(num)</code>
| <code>sqrt(num)</code>
|  
|  
|-
|-
| <code>GetBaseVelocity</code>
| <code>srand</code>
| <code>GetBaseVelocity()</code>
| <code>srand(num)</code>
|  
|  
|-
|-
| <code>GetBodygroup</code>
| <code>StopAmbientSoundOn</code>
| <code>GetBodygroup(num)</code>
| <code>void StopAmbientSoundOn(string, handle)</code>
|  
| Stop named ambient sound on an entity.
|-
|-
| <code>GetBodygroupName</code>
| <code>StopSoundOn</code>
| <code>GetBodygroupName(num)</code>
| <code>void StopSoundOn(string, handle)</code>
|  
| Stop named sound on Entity
|-
|-
| <code>GetBodygroupPartName</code>
| <code>StringToFile</code>
| <code>GetBodygroupPartName(num, num)</code>
| <code>bool StringToFile(string, string)</code>
|  
| Store a string to a file for later reading
|-
|-
| <code>GetBoneAngles</code>
| <code>strip</code>
| <code>GetBoneAngles(num)</code>
| <code>strip(string)</code>
|  
|  
|-
|-
| <code>GetBoneOrigin</code>
| <code>suspend</code>
| <code>GetBoneOrigin(num)</code>
| <code>suspend()</code>
|  
|  
|-
|-
| <code>GetBoundingMaxs</code>
| <code>tan</code>
| <code>GetBoundingMaxs()</code>
| <code>tan(num)</code>
|  
|  
|-
|-
| <code>GetBoundingMaxsOriented</code>
| <code>Time</code>
| <code>GetBoundingMaxsOriented()</code>
| <code>float Time()</code>
|  
| Get the current server time
|-
|-
| <code>GetBoundingMins</code>
| <code>TraceLine</code>
| <code>GetBoundingMins()</code>
| <code>float TraceLine(Vector, Vector, handle)</code>
|  
| given 2 points & ent to ignore, return fraction along line that hits world or models
|-
|-
| <code>GetBoundingMinsOriented</code>
| <code>TraceLineEx</code>
| <code>GetBoundingMinsOriented()</code>
| <code>bool TraceLineEx(handle)</code>
|  
| Pass table - Inputs: start, end, mask, ignore  -- outputs: pos, fraction, hit, enthit, startsolid
|-
|-
| <code>GetCenter</code>
| <code>TraceLinePlayersIncluded</code>
| <code>GetCenter()</code>
| <code>float TraceLinePlayersIncluded(Vector, Vector, handle)</code>
|  
| given 2 points & ent to ignore, return fraction along line that hits world, models, players or npcs
|-
|-
| <code>GetClassname</code>
| <code>type</code>
| <code>GetClassname()</code>
| <code>type()</code>
|  
|  
|-
|-
| <code>GetEntityHandle</code>
| <code>UniqueString</code>
| <code>GetEntityHandle()</code>
| <code>function UniqueString(string)</code>
|  
| Generate a string guaranteed to be unique across the life of the script VM, with an optional root string. Useful for adding data to tables when not sure what keys are already in use in that table.
|-
|-
| <code>GetEntityIndex</code>
| <code>UsePlayerReadyStatusMode</code>
| <code>GetEntityIndex()</code>
| <code>bool UsePlayerReadyStatusMode()</code>
|  
|  
|-
|-
| <code>GetForwardVector</code>
| <code>VSquirrel_OnCreateScope</code>
| <code>GetForwardVector()</code>
| <code>VSquirrel_OnCreateScope()</code>
|  
|  
|-
|-
| <code>GetFriction</code>
| <code>VSquirrel_OnReleaseScope</code>
| <code>GetFriction()</code>
| <code>VSquirrel_OnReleaseScope()</code>
|
|-
| <code>GetHealth</code>
| <code>GetHealth()</code>
|
|-
| <code>GetLeftVector</code>
| <code>GetLeftVector()</code>
|
|-
| <code>GetLocalAngles</code>
| <code>GetLocalAngles()</code>
|
|-
| <code>GetLocalOrigin</code>
| <code>GetLocalOrigin()</code>
|
|-
| <code>GetLocalVelocity</code>
| <code>GetLocalVelocity()</code>
|
|-
| <code>GetMaxHealth</code>
| <code>GetMaxHealth()</code>
|
|-
| <code>GetModelKeyValues</code>
| <code>GetModelKeyValues()</code>
|
|-
| <code>GetModelName</code>
| <code>GetModelName()</code>
|
|-
| <code>GetModelScale</code>
| <code>GetModelScale()</code>
|
|-
| <code>GetMoveParent</code>
| <code>GetMoveParent()</code>
|
|-
| <code>GetName</code>
| <code>GetName()</code>
|
|-
| <code>GetOrigin</code>
| <code>GetOrigin()</code>
|
|-
| <code>GetOwner</code>
| <code>GetOwner()</code>
|
|-
| <code>GetPreTemplateName</code>
| <code>GetPreTemplateName()</code>
|
|-
| <code>GetRightVector</code>
| <code>GetRightVector()</code>
|
|-
| <code>GetRootMoveParent</code>
| <code>GetRootMoveParent()</code>
|
|-
| <code>GetScriptId</code>
| <code>GetScriptId()</code>
|
|-
| <code>GetScriptScope</code>
| <code>GetScriptScope()</code>
|
|-
| <code>GetSequence</code>
| <code>GetSequence()</code>
|
|-
| <code>GetSequenceActivityName</code>
| <code>GetSequenceActivityName(num)</code>
|
|-
| <code>GetSequenceDuration</code>
| <code>GetSequenceDuration(num)</code>
|
|-
| <code>GetSequenceName</code>
| <code>GetSequenceName(num)</code>
|
|-
| <code>GetSkin</code>
| <code>GetSkin()</code>
|
|-
| <code>GetSoundDuration</code>
| <code>GetSoundDuration(string, string)</code>
|
|-
| <code>GetTeam</code>
| <code>GetTeam()</code>
|
|-
| <code>GetUpVector</code>
| <code>GetUpVector()</code>
|
|-
| <code>GetVelocity</code>
| <code>GetVelocity()</code>
|
|-
| <code>IsNoclipping</code>
| <code>bool IsNoclipping()</code>
| Returns true if the player is in noclip mode.
|-
| <code>IsPlayer</code>
| <code>IsPlayer()</code>
|
|-
| <code>IsSequenceFinished</code>
| <code>IsSequenceFinished()</code>
|
|-
| <code>IsValid</code>
| <code>IsValid()</code>
|
|-
| <code>KeyValueFromFloat</code>
| <code>KeyValueFromFloat(string, num)</code>
|
|-
| <code>KeyValueFromInt</code>
| <code>KeyValueFromInt(string, num)</code>
|
|-
| <code>KeyValueFromString</code>
| <code>KeyValueFromString(string, string)</code>
|
|-
| <code>KeyValueFromVector</code>
| <code>KeyValueFromVector(string, Vector)</code>
|
|-
| <code>Kill</code>
| <code>Kill()</code>
|
|-
| <code>LookupActivity</code>
| <code>LookupActivity(string)</code>
|
|-
| <code>LookupAttachment</code>
| <code>LookupAttachment(string)</code>
|
|-
| <code>LookupBone</code>
| <code>LookupBone(string)</code>
|
|-
| <code>LookupSequence</code>
| <code>LookupSequence(string)</code>
|
|-
| <code>NextMovePeer</code>
| <code>NextMovePeer()</code>
|
|-
| <code>PrecacheModel</code>
| <code>PrecacheModel(string)</code>
|
|-
| <code>PrecacheScriptSound</code>
| <code>PrecacheScriptSound(string)</code>
|
|-
| <code>PrecacheSoundScript</code>
| <code>PrecacheSoundScript(string)</code>
|
|-
| <code>ResetSequence</code>
| <code>ResetSequence(num)</code>
|
|-
| <code>SetAbsAngles</code>
| <code>SetAbsAngles(Vector)</code>
|
|-
| <code>SetAbsOrigin</code>
| <code>SetAbsOrigin(Vector)</code>
|
|-
| <code>SetAngles</code>
| <code>SetAngles(num, num, num)</code>
|
|-
| <code>SetAngularVelocity</code>
| <code>SetAngularVelocity(num, num, num)</code>
|
|-
| <code>SetBodygroup</code>
| <code>SetBodygroup(num, num)</code>
|
|-
| <code>SetDrawEnabled</code>
| <code>SetDrawEnabled(bool)</code>
|
|-
| <code>SetForwardVector</code>
| <code>SetForwardVector(Vector)</code>
|
|-
| <code>SetFriction</code>
| <code>SetFriction(num)</code>
|
|-
| <code>SetGravity</code>
| <code>SetGravity(num)</code>
|
|-
| <code>SetHealth</code>
| <code>SetHealth(num)</code>
|
|-
| <code>SetLocalAngles</code>
| <code>SetLocalAngles(Vector)</code>
|
|-
| <code>SetLocalOrigin</code>
| <code>SetLocalOrigin(Vector)</code>
|
|-
| <code>SetMaxHealth</code>
| <code>SetMaxHealth(num)</code>
|
|-
| <code>SetModel</code>
| <code>SetModel(string)</code>
|
|-
| <code>SetModelScale</code>
| <code>SetModelScale(num, num)</code>
|
|-
| <code>SetOrigin</code>
| <code>SetOrigin(Vector)</code>
|
|-
| <code>SetOwner</code>
| <code>SetOwner(Vector)</code>
|
|-
| <code>SetPoseParameter</code>
| <code>SetPoseParameter(num, num)</code>
|
|-
| <code>SetSequence</code>
| <code>SetSequence(num)</code>
|
|-
| <code>SetSize</code>
| <code>SetSize(Vector, Vector)</code>
|
|-
| <code>SetSkin</code>
| <code>SetSkin(num)</code>
|
|-
| <code>SetTeam</code>
| <code>SetTeam(num)</code>
|
|-
| <code>SetVelocity</code>
| <code>SetVelocity(Vector)</code>
|
|-
| <code>StopSound</code>
| <code>StopSound(string)</code>
|
|-
| <code>TakeDamage</code>
| <code>TakeDamage(num, num, Vector)</code>
|
|-
| <code>TakeDamageEx</code>
| <code>TakeDamageEx(Vector, Vector, Vector, Vector, Vector, num, num)</code>
|
|-
| <code>ValidateScriptScope</code>
| <code>ValidateScriptScope()</code>
|
|}
 
 
=== CCallChainer ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>Call</code>
| <code>Call()</code>
|
|-
| <code>chains</code>
| <code>chains()</code>
|
|-
| <code>constructor</code>
| <code>constructor()</code>
|
|-
| <code>PostScriptExecute</code>
| <code>PostScriptExecute()</code>
|
|-
| <code>prefix</code>
| <code>prefix()</code>
|
|-
| <code>scope</code>
| <code>scope()</code>
|
|}
 
 
=== CEntities ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>CreateByClassname</code>
| <code>handle CreateByClassname(string)</code>
| Creates an entity by classname
|-
| <code>DispatchSpawn</code>
| <code>void DispatchSpawn(handle)</code>
| Dispatches spawn of an entity!
|-
| <code>FindByClassname</code>
| <code>handle FindByClassname(handle, string)</code>
| Find entities by class name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
| <code>FindByClassnameNearest</code>
| <code>handle FindByClassnameNearest(string, Vector, float)</code>
| Find entities by class name nearest to a point.
|-
| <code>FindByClassnameWithin</code>
| <code>handle FindByClassnameWithin(handle, string, Vector, float)</code>
| 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
|-
| <code>FindByModel</code>
| <code>handle FindByModel(handle, string)</code>
| Find entities by model name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
| <code>FindByName</code>
| <code>handle FindByName(handle, string)</code>
| Find entities by name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
| <code>FindByNameNearest</code>
| <code>handle FindByNameNearest(string, Vector, float)</code>
| Find entities by name nearest to a point.
|-
| <code>FindByNameWithin</code>
| <code>handle FindByNameWithin(handle, string, Vector, float)</code>
| Find entities by name within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
| <code>FindByTarget</code>
| <code>handle FindByTarget(handle, string)</code>
| Find entities by targetname. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
| <code>FindInSphere</code>
| <code>handle FindInSphere(handle, Vector, float)</code>
| Find entities within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
| <code>First</code>
| <code>handle First()</code>
| Begin an iteration over the list of entities
|-
| <code>IsValid</code>
| <code>IsValid()</code>
|
|-
| <code>Next</code>
| <code>handle Next(handle)</code>
| Continue an iteration over the list of entities, providing reference to a previously found entity
|}
 
 
=== CEnvEntityMaker ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>__KeyValueFromFloat</code>
| <code>__KeyValueFromFloat(string, num)</code>
|
|-
| <code>__KeyValueFromInt</code>
| <code>__KeyValueFromInt(string, num)</code>
|
|-
| <code>__KeyValueFromString</code>
| <code>__KeyValueFromString(string, string)</code>
|
|-
| <code>__KeyValueFromVector</code>
| <code>__KeyValueFromVector(string, Vector)</code>
|
|-
| <code>ApplyAbsVelocityImpulse</code>
| <code>ApplyAbsVelocityImpulse(Vector)</code>
|
|-
| <code>ApplyLocalAngularVelocityImpulse</code>
| <code>ApplyLocalAngularVelocityImpulse(Vector)</code>
|
|-
| <code>ConnectOutput</code>
| <code>ConnectOutput(string, string)</code>
|
|-
| <code>Destroy</code>
| <code>Destroy()</code>
|
|-
| <code>DisableDraw</code>
| <code>DisableDraw()</code>
|
|-
| <code>DisconnectOutput</code>
| <code>DisconnectOutput(string, string)</code>
|
|-
| <code>DispatchSpawn</code>
| <code>DispatchSpawn()</code>
|
|-
| <code>EmitSound</code>
| <code>EmitSound(string)</code>
|
|-
| <code>EnableDraw</code>
| <code>EnableDraw()</code>
|
|-
| <code>entindex</code>
| <code>entindex()</code>
|
|-
| <code>EyePosition</code>
| <code>EyePosition()</code>
|
|-
| <code>FirstMoveChild</code>
| <code>FirstMoveChild()</code>
|
|-
| <code>GetAbsAngles</code>
| <code>GetAbsAngles()</code>
|
|-
| <code>GetAngles</code>
| <code>GetAngles()</code>
|
|-
| <code>GetAngularVelocity</code>
| <code>GetAngularVelocity()</code>
|
|-
| <code>GetBaseVelocity</code>
| <code>GetBaseVelocity()</code>
|
|-
| <code>GetBoundingMaxs</code>
| <code>GetBoundingMaxs()</code>
|
|-
| <code>GetBoundingMaxsOriented</code>
| <code>GetBoundingMaxsOriented()</code>
|
|-
| <code>GetBoundingMins</code>
| <code>GetBoundingMins()</code>
|
|-
| <code>GetBoundingMinsOriented</code>
| <code>GetBoundingMinsOriented()</code>
|
|-
| <code>GetCenter</code>
| <code>GetCenter()</code>
|
|-
| <code>GetClassname</code>
| <code>GetClassname()</code>
|
|-
| <code>GetEntityHandle</code>
| <code>GetEntityHandle()</code>
|
|-
| <code>GetEntityIndex</code>
| <code>GetEntityIndex()</code>
|
|-
| <code>GetForwardVector</code>
| <code>GetForwardVector()</code>
|
|-
| <code>GetFriction</code>
| <code>GetFriction()</code>
|
|-
| <code>GetHealth</code>
| <code>GetHealth()</code>
|
|-
| <code>GetLeftVector</code>
| <code>GetLeftVector()</code>
|
|-
| <code>GetLocalAngles</code>
| <code>GetLocalAngles()</code>
|
|-
| <code>GetLocalOrigin</code>
| <code>GetLocalOrigin()</code>
|
|-
| <code>GetLocalVelocity</code>
| <code>GetLocalVelocity()</code>
|
|-
| <code>GetMaxHealth</code>
| <code>GetMaxHealth()</code>
|
|-
| <code>GetModelKeyValues</code>
| <code>GetModelKeyValues()</code>
|
|-
| <code>GetModelName</code>
| <code>GetModelName()</code>
|
|-
| <code>GetMoveParent</code>
| <code>GetMoveParent()</code>
|
|-
| <code>GetName</code>
| <code>GetName()</code>
|
|-
| <code>GetOrigin</code>
| <code>GetOrigin()</code>
|
|-
| <code>GetOwner</code>
| <code>GetOwner()</code>
|
|-
| <code>GetPreTemplateName</code>
| <code>GetPreTemplateName()</code>
|
|-
| <code>GetRightVector</code>
| <code>GetRightVector()</code>
|
|-
| <code>GetRootMoveParent</code>
| <code>GetRootMoveParent()</code>
|
|-
| <code>GetScriptId</code>
| <code>GetScriptId()</code>
|
|-
| <code>GetScriptScope</code>
| <code>GetScriptScope()</code>
|
|-
| <code>GetSoundDuration</code>
| <code>GetSoundDuration(string, string)</code>
|
|-
| <code>GetTeam</code>
| <code>GetTeam()</code>
|
|-
| <code>GetUpVector</code>
| <code>GetUpVector()</code>
|
|-
| <code>GetVelocity</code>
| <code>GetVelocity()</code>
|
|-
| <code>IsPlayer</code>
| <code>IsPlayer()</code>
|
|-
| <code>IsValid</code>
| <code>IsValid()</code>
|
|-
| <code>KeyValueFromFloat</code>
| <code>KeyValueFromFloat(string, num)</code>
|
|-
| <code>KeyValueFromInt</code>
| <code>KeyValueFromInt(string, num)</code>
|
|-
| <code>KeyValueFromString</code>
| <code>KeyValueFromString(string, string)</code>
|
|-
| <code>KeyValueFromVector</code>
| <code>KeyValueFromVector(string, Vector)</code>
|
|-
| <code>Kill</code>
| <code>Kill()</code>
|
|-
| <code>NextMovePeer</code>
| <code>NextMovePeer()</code>
|
|-
| <code>PrecacheModel</code>
| <code>PrecacheModel(string)</code>
|
|-
| <code>PrecacheScriptSound</code>
| <code>PrecacheScriptSound(string)</code>
|
|-
| <code>PrecacheSoundScript</code>
| <code>PrecacheSoundScript(string)</code>
|
|-
| <code>SetAbsAngles</code>
| <code>SetAbsAngles(Vector)</code>
|
|-
| <code>SetAbsOrigin</code>
| <code>SetAbsOrigin(Vector)</code>
|
|-
| <code>SetAngles</code>
| <code>SetAngles(num, num, num)</code>
|
|-
| <code>SetAngularVelocity</code>
| <code>SetAngularVelocity(num, num, num)</code>
|
|-
| <code>SetDrawEnabled</code>
| <code>SetDrawEnabled(bool)</code>
|
|-
| <code>SetForwardVector</code>
| <code>SetForwardVector(Vector)</code>
|
|-
| <code>SetFriction</code>
| <code>SetFriction(num)</code>
|
|-
| <code>SetGravity</code>
| <code>SetGravity(num)</code>
|
|-
| <code>SetHealth</code>
| <code>SetHealth(num)</code>
|
|-
| <code>SetLocalAngles</code>
| <code>SetLocalAngles(Vector)</code>
|
|-
| <code>SetLocalOrigin</code>
| <code>SetLocalOrigin(Vector)</code>
|
|-
| <code>SetMaxHealth</code>
| <code>SetMaxHealth(num)</code>
|
|-
| <code>SetModel</code>
| <code>SetModel(string)</code>
|
|-
| <code>SetOrigin</code>
| <code>SetOrigin(Vector)</code>
|
|-
| <code>SetOwner</code>
| <code>SetOwner(Vector)</code>
|
|-
| <code>SetSize</code>
| <code>SetSize(Vector, Vector)</code>
|
|-
| <code>SetTeam</code>
| <code>SetTeam(num)</code>
|
|-
| <code>SetVelocity</code>
| <code>SetVelocity(Vector)</code>
|
|-
| <code>SpawnEntity</code>
| <code>void SpawnEntity()</code>
| Create an entity at the location of the maker
|-
| <code>SpawnEntityAtEntityOrigin</code>
| <code>void SpawnEntityAtEntityOrigin(handle)</code>
| Create an entity at the location of a specified entity instance
|-
| <code>SpawnEntityAtLocation</code>
| <code>void SpawnEntityAtLocation(Vector, Vector)</code>
| Create an entity at a specified location and orientaton, orientation is Euler angle in degrees (pitch, yaw, roll)
|-
| <code>SpawnEntityAtNamedEntityOrigin</code>
| <code>void SpawnEntityAtNamedEntityOrigin(string)</code>
| Create an entity at the location of a named entity
|-
| <code>StopSound</code>
| <code>StopSound(string)</code>
|
|-
| <code>TakeDamage</code>
| <code>TakeDamage(num, num, Vector)</code>
|
|-
| <code>TakeDamageEx</code>
| <code>TakeDamageEx(Vector, Vector, Vector, Vector, Vector, num, num)</code>
|
|-
| <code>ValidateScriptScope</code>
| <code>ValidateScriptScope()</code>
|
|}
 
 
=== CFuncTrackTrain ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>__KeyValueFromFloat</code>
| <code>__KeyValueFromFloat(string, num)</code>
|
|-
| <code>__KeyValueFromInt</code>
| <code>__KeyValueFromInt(string, num)</code>
|
|-
| <code>__KeyValueFromString</code>
| <code>__KeyValueFromString(string, string)</code>
|
|-
| <code>__KeyValueFromVector</code>
| <code>__KeyValueFromVector(string, Vector)</code>
|
|-
| <code>ApplyAbsVelocityImpulse</code>
| <code>ApplyAbsVelocityImpulse(Vector)</code>
|
|-
| <code>ApplyLocalAngularVelocityImpulse</code>
| <code>ApplyLocalAngularVelocityImpulse(Vector)</code>
|
|-
| <code>ConnectOutput</code>
| <code>ConnectOutput(string, string)</code>
|
|-
| <code>Destroy</code>
| <code>Destroy()</code>
|
|-
| <code>DisableDraw</code>
| <code>DisableDraw()</code>
|
|-
| <code>DisconnectOutput</code>
| <code>DisconnectOutput(string, string)</code>
|
|-
| <code>DispatchSpawn</code>
| <code>DispatchSpawn()</code>
|
|-
| <code>EmitSound</code>
| <code>EmitSound(string)</code>
|
|-
| <code>EnableDraw</code>
| <code>EnableDraw()</code>
|
|-
| <code>entindex</code>
| <code>entindex()</code>
|
|-
| <code>EyePosition</code>
| <code>EyePosition()</code>
|
|-
| <code>FirstMoveChild</code>
| <code>FirstMoveChild()</code>
|
|-
| <code>GetAbsAngles</code>
| <code>GetAbsAngles()</code>
|
|-
| <code>GetAngles</code>
| <code>GetAngles()</code>
|
|-
| <code>GetAngularVelocity</code>
| <code>GetAngularVelocity()</code>
|
|-
| <code>GetBaseVelocity</code>
| <code>GetBaseVelocity()</code>
|
|-
| <code>GetBoundingMaxs</code>
| <code>GetBoundingMaxs()</code>
|
|-
| <code>GetBoundingMaxsOriented</code>
| <code>GetBoundingMaxsOriented()</code>
|
|-
| <code>GetBoundingMins</code>
| <code>GetBoundingMins()</code>
|
|-
| <code>GetBoundingMinsOriented</code>
| <code>GetBoundingMinsOriented()</code>
|
|-
| <code>GetCenter</code>
| <code>GetCenter()</code>
|
|-
| <code>GetClassname</code>
| <code>GetClassname()</code>
|
|-
| <code>GetEntityHandle</code>
| <code>GetEntityHandle()</code>
|
|-
| <code>GetEntityIndex</code>
| <code>GetEntityIndex()</code>
|
|-
| <code>GetForwardVector</code>
| <code>GetForwardVector()</code>
|
|-
| <code>GetFriction</code>
| <code>GetFriction()</code>
|
|-
| <code>GetFuturePosition</code>
| <code>Vector GetFuturePosition(float, float)</code>
| Get a position on the track x seconds in the future
|-
| <code>GetHealth</code>
| <code>GetHealth()</code>
|
|-
| <code>GetLeftVector</code>
| <code>GetLeftVector()</code>
|
|-
| <code>GetLocalAngles</code>
| <code>GetLocalAngles()</code>
|
|-
| <code>GetLocalOrigin</code>
| <code>GetLocalOrigin()</code>
|
|-
| <code>GetLocalVelocity</code>
| <code>GetLocalVelocity()</code>
|
|-
| <code>GetMaxHealth</code>
| <code>GetMaxHealth()</code>
|
|-
| <code>GetModelKeyValues</code>
| <code>GetModelKeyValues()</code>
|
|-
| <code>GetModelName</code>
| <code>GetModelName()</code>
|
|-
| <code>GetMoveParent</code>
| <code>GetMoveParent()</code>
|
|-
| <code>GetName</code>
| <code>GetName()</code>
|
|-
| <code>GetOrigin</code>
| <code>GetOrigin()</code>
|
|-
| <code>GetOwner</code>
| <code>GetOwner()</code>
|
|-
| <code>GetPreTemplateName</code>
| <code>GetPreTemplateName()</code>
|
|-
| <code>GetRightVector</code>
| <code>GetRightVector()</code>
|
|-
| <code>GetRootMoveParent</code>
| <code>GetRootMoveParent()</code>
|
|-
| <code>GetScriptId</code>
| <code>GetScriptId()</code>
|
|-
| <code>GetScriptScope</code>
| <code>GetScriptScope()</code>
|
|-
| <code>GetSoundDuration</code>
| <code>GetSoundDuration(string, string)</code>
|
|-
| <code>GetTeam</code>
| <code>GetTeam()</code>
|
|-
| <code>GetUpVector</code>
| <code>GetUpVector()</code>
|
|-
| <code>GetVelocity</code>
| <code>GetVelocity()</code>
|
|-
| <code>IsPlayer</code>
| <code>IsPlayer()</code>
|
|-
| <code>IsValid</code>
| <code>IsValid()</code>
|
|-
| <code>KeyValueFromFloat</code>
| <code>KeyValueFromFloat(string, num)</code>
|
|-
| <code>KeyValueFromInt</code>
| <code>KeyValueFromInt(string, num)</code>
|
|-
| <code>KeyValueFromString</code>
| <code>KeyValueFromString(string, string)</code>
|
|-
| <code>KeyValueFromVector</code>
| <code>KeyValueFromVector(string, Vector)</code>
|
|-
| <code>Kill</code>
| <code>Kill()</code>
|
|-
| <code>NextMovePeer</code>
| <code>NextMovePeer()</code>
|
|-
| <code>PrecacheModel</code>
| <code>PrecacheModel(string)</code>
|
|-
| <code>PrecacheScriptSound</code>
| <code>PrecacheScriptSound(string)</code>
|
|-
| <code>PrecacheSoundScript</code>
| <code>PrecacheSoundScript(string)</code>
|
|-
| <code>SetAbsAngles</code>
| <code>SetAbsAngles(Vector)</code>
|
|-
| <code>SetAbsOrigin</code>
| <code>SetAbsOrigin(Vector)</code>
|
|-
| <code>SetAngles</code>
| <code>SetAngles(num, num, num)</code>
|
|-
| <code>SetAngularVelocity</code>
| <code>SetAngularVelocity(num, num, num)</code>
|
|-
| <code>SetDrawEnabled</code>
| <code>SetDrawEnabled(bool)</code>
|
|-
| <code>SetForwardVector</code>
| <code>SetForwardVector(Vector)</code>
|
|-
| <code>SetFriction</code>
| <code>SetFriction(num)</code>
|
|-
| <code>SetGravity</code>
| <code>SetGravity(num)</code>
|
|-
| <code>SetHealth</code>
| <code>SetHealth(num)</code>
|
|-
| <code>SetLocalAngles</code>
| <code>SetLocalAngles(Vector)</code>
|
|-
| <code>SetLocalOrigin</code>
| <code>SetLocalOrigin(Vector)</code>
|
|-
| <code>SetMaxHealth</code>
| <code>SetMaxHealth(num)</code>
|
|-
| <code>SetModel</code>
| <code>SetModel(string)</code>
|
|-
| <code>SetOrigin</code>
| <code>SetOrigin(Vector)</code>
|
|-
| <code>SetOwner</code>
| <code>SetOwner(Vector)</code>
|
|-
| <code>SetSize</code>
| <code>SetSize(Vector, Vector)</code>
|
|-
| <code>SetTeam</code>
| <code>SetTeam(num)</code>
|
|-
| <code>SetVelocity</code>
| <code>SetVelocity(Vector)</code>
|
|-
| <code>StopSound</code>
| <code>StopSound(string)</code>
|
|-
| <code>TakeDamage</code>
| <code>TakeDamage(num, num, Vector)</code>
|
|-
| <code>TakeDamageEx</code>
| <code>TakeDamageEx(Vector, Vector, Vector, Vector, Vector, num, num)</code>
|
|-
| <code>ValidateScriptScope</code>
| <code>ValidateScriptScope()</code>
|
|}
 
 
=== CNetPropManager ===
 
{{note|This entity can also modify datamaps, not just netprops, despite the name.}}
{{tip|List of netprops and datamaps can be found here: https://www.invalidvertex.com/tf2dump.php}}
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>GetPropArraySize</code>
| <code>int GetPropArraySize(handle, string)</code>
| Arguments: ( entity, propertyName )
|-
| <code>GetPropEntity</code>
| <code>handle GetPropEntity(handle, string)</code>
| Arguments: ( entity, propertyName ) - returns an entity
|-
| <code>GetPropEntityArray</code>
| <code>handle GetPropEntityArray(handle, string, int)</code>
| Arguments: ( entity, propertyName, arrayElement ) - returns an entity
|-
| <code>GetPropFloat</code>
| <code>float GetPropFloat(handle, string)</code>
| Arguments: ( entity, propertyName )
|-
| <code>GetPropFloatArray</code>
| <code>float GetPropFloatArray(handle, string, int)</code>
| Arguments: ( entity, propertyName, arrayElement )
|-
| <code>GetPropInt</code>
| <code>int GetPropInt(handle, string)</code>
| Arguments: ( entity, propertyName )
|-
| <code>GetPropIntArray</code>
| <code>int GetPropIntArray(handle, string, int)</code>
| Arguments: ( entity, propertyName, arrayElement )
|-
| <code>GetPropString</code>
| <code>string GetPropString(handle, string)</code>
| Arguments: ( entity, propertyName )
|-
| <code>GetPropStringArray</code>
| <code>string GetPropStringArray(handle, string, int)</code>
| Arguments: ( entity, propertyName, arrayElement )
|-
| <code>GetPropType</code>
| <code>string GetPropType(handle, string)</code>
| Arguments: ( entity, propertyName ) - return the prop type as a string
|-
| <code>GetPropVector</code>
| <code>Vector GetPropVector(handle, string)</code>
| Arguments: ( entity, propertyName )
|-
| <code>GetPropVectorArray</code>
| <code>Vector GetPropVectorArray(handle, string, int)</code>
| Arguments: ( entity, propertyName, arrayElement )
|-
| <code>HasProp</code>
| <code>bool HasProp(handle, string)</code>
| Arguments: ( entity, propertyName )
|-
| <code>IsValid</code>
| <code>IsValid()</code>
|
|-
| <code>SetPropEntity</code>
| <code>void SetPropEntity(handle, string, handle)</code>
| Arguments: ( entity, propertyName, value )
|-
| <code>SetPropEntityArray</code>
| <code>void SetPropEntityArray(handle, string, handle, int)</code>
| Arguments: ( entity, propertyName, value, arrayElement )
|-
| <code>SetPropFloat</code>
| <code>void SetPropFloat(handle, string, float)</code>
| Arguments: ( entity, propertyName, value )
|-
| <code>SetPropFloatArray</code>
| <code>void SetPropFloatArray(handle, string, float, int)</code>
| Arguments: ( entity, propertyName, value, arrayElement )
|-
| <code>SetPropInt</code>
| <code>void SetPropInt(handle, string, int)</code>
| Arguments: ( entity, propertyName, value )
|-
| <code>SetPropIntArray</code>
| <code>void SetPropIntArray(handle, string, int, int)</code>
| Arguments: ( entity, propertyName, value, arrayElement )
|-
| <code>SetPropString</code>
| <code>void SetPropString(handle, string, string)</code>
| Arguments: ( entity, propertyName, value )
|-
| <code>SetPropStringArray</code>
| <code>void SetPropStringArray(handle, string, string, int)</code>
| Arguments: ( entity, propertyName, value, arrayElement )
|-
| <code>SetPropVector</code>
| <code>void SetPropVector(handle, string, Vector)</code>
| Arguments: ( entity, propertyName, value )
|-
| <code>SetPropVectorArray</code>
| <code>void SetPropVectorArray(handle, string, Vector, int)</code>
| Arguments: ( entity, propertyName, value, arrayElement )
|}
 
 
=== Convars ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>GetClientConvarValue</code>
| <code>string GetClientConvarValue(string, int)</code>
| GetClientConvarValue(name) : returns the convar value for the entindex as a string.
|-
| <code>GetFloat</code>
| <code><unknown> GetFloat(string)</code>
| GetFloat(name) : returns the convar as a float. May return null if no such convar.
|-
| <code>GetStr</code>
| <code><unknown> GetStr(string)</code>
| GetFloat(name) : returns the convar as a string. May return null if no such convar.
|-
| <code>IsValid</code>
| <code>IsValid()</code>
|
|-
| <code>SetValue</code>
| <code>void SetValue(string, <unknown>)</code>
| SetValue(name, value) : sets the value of the convar. Supported types are bool, int, float, string.
|}
 
 
=== CPlayerVoiceListener ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>GetPlayerSpeechDuration</code>
| <code>float GetPlayerSpeechDuration(int)</code>
| Returns the number of seconds the player has been continuously speaking.
|-
| <code>IsPlayerSpeaking</code>
| <code>bool IsPlayerSpeaking(int)</code>
| Returns whether the player specified is speaking.
|-
| <code>IsValid</code>
| <code>IsValid()</code>
|
|}
 
 
=== CPointScriptTemplate ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>__KeyValueFromFloat</code>
| <code>__KeyValueFromFloat(string, num)</code>
|
|-
| <code>__KeyValueFromInt</code>
| <code>__KeyValueFromInt(string, num)</code>
|
|-
| <code>__KeyValueFromString</code>
| <code>__KeyValueFromString(string, string)</code>
|
|-
| <code>__KeyValueFromVector</code>
| <code>__KeyValueFromVector(string, Vector)</code>
|
|-
| <code>AddTemplate</code>
| <code>void AddTemplate(string, handle)</code>
| Add an entity to the template spawner
|-
| <code>ApplyAbsVelocityImpulse</code>
| <code>ApplyAbsVelocityImpulse(Vector)</code>
|
|-
| <code>ApplyLocalAngularVelocityImpulse</code>
| <code>ApplyLocalAngularVelocityImpulse(Vector)</code>
|
|-
| <code>ConnectOutput</code>
| <code>ConnectOutput(string, string)</code>
|
|-
| <code>Destroy</code>
| <code>Destroy()</code>
|
|-
| <code>DisableDraw</code>
| <code>DisableDraw()</code>
|
|-
| <code>DisconnectOutput</code>
| <code>DisconnectOutput(string, string)</code>
|
|-
| <code>DispatchSpawn</code>
| <code>DispatchSpawn()</code>
|
|-
| <code>EmitSound</code>
| <code>EmitSound(string)</code>
|
|-
| <code>EnableDraw</code>
| <code>EnableDraw()</code>
|
|-
| <code>entindex</code>
| <code>entindex()</code>
|
|-
| <code>EyePosition</code>
| <code>EyePosition()</code>
|
|-
| <code>FirstMoveChild</code>
| <code>FirstMoveChild()</code>
|
|-
| <code>GetAbsAngles</code>
| <code>GetAbsAngles()</code>
|
|-
| <code>GetAngles</code>
| <code>GetAngles()</code>
|
|-
| <code>GetAngularVelocity</code>
| <code>GetAngularVelocity()</code>
|
|-
| <code>GetBaseVelocity</code>
| <code>GetBaseVelocity()</code>
|
|-
| <code>GetBoundingMaxs</code>
| <code>GetBoundingMaxs()</code>
|
|-
| <code>GetBoundingMaxsOriented</code>
| <code>GetBoundingMaxsOriented()</code>
|
|-
| <code>GetBoundingMins</code>
| <code>GetBoundingMins()</code>
|
|-
| <code>GetBoundingMinsOriented</code>
| <code>GetBoundingMinsOriented()</code>
|
|-
| <code>GetCenter</code>
| <code>GetCenter()</code>
|
|-
| <code>GetClassname</code>
| <code>GetClassname()</code>
|
|-
| <code>GetEntityHandle</code>
| <code>GetEntityHandle()</code>
|
|-
| <code>GetEntityIndex</code>
| <code>GetEntityIndex()</code>
|
|-
| <code>GetForwardVector</code>
| <code>GetForwardVector()</code>
|
|-
| <code>GetFriction</code>
| <code>GetFriction()</code>
|
|-
| <code>GetHealth</code>
| <code>GetHealth()</code>
|
|-
| <code>GetLeftVector</code>
| <code>GetLeftVector()</code>
|
|-
| <code>GetLocalAngles</code>
| <code>GetLocalAngles()</code>
|
|-
| <code>GetLocalOrigin</code>
| <code>GetLocalOrigin()</code>
|
|-
| <code>GetLocalVelocity</code>
| <code>GetLocalVelocity()</code>
|
|-
| <code>GetMaxHealth</code>
| <code>GetMaxHealth()</code>
|
|-
| <code>GetModelKeyValues</code>
| <code>GetModelKeyValues()</code>
|
|-
| <code>GetModelName</code>
| <code>GetModelName()</code>
|
|-
| <code>GetMoveParent</code>
| <code>GetMoveParent()</code>
|
|-
| <code>GetName</code>
| <code>GetName()</code>
|
|-
| <code>GetOrigin</code>
| <code>GetOrigin()</code>
|
|-
| <code>GetOwner</code>
| <code>GetOwner()</code>
|
|-
| <code>GetPreTemplateName</code>
| <code>GetPreTemplateName()</code>
|
|-
| <code>GetRightVector</code>
| <code>GetRightVector()</code>
|
|-
| <code>GetRootMoveParent</code>
| <code>GetRootMoveParent()</code>
|
|-
| <code>GetScriptId</code>
| <code>GetScriptId()</code>
|
|-
| <code>GetScriptScope</code>
| <code>GetScriptScope()</code>
|
|-
| <code>GetSoundDuration</code>
| <code>GetSoundDuration(string, string)</code>
|
|-
| <code>GetTeam</code>
| <code>GetTeam()</code>
|
|-
| <code>GetUpVector</code>
| <code>GetUpVector()</code>
|
|-
| <code>GetVelocity</code>
| <code>GetVelocity()</code>
|
|-
| <code>IsPlayer</code>
| <code>IsPlayer()</code>
|
|-
| <code>IsValid</code>
| <code>IsValid()</code>
|
|-
| <code>KeyValueFromFloat</code>
| <code>KeyValueFromFloat(string, num)</code>
|
|-
| <code>KeyValueFromInt</code>
| <code>KeyValueFromInt(string, num)</code>
|
|-
| <code>KeyValueFromString</code>
| <code>KeyValueFromString(string, string)</code>
|
|-
| <code>KeyValueFromVector</code>
| <code>KeyValueFromVector(string, Vector)</code>
|
|-
| <code>Kill</code>
| <code>Kill()</code>
|
|-
| <code>NextMovePeer</code>
| <code>NextMovePeer()</code>
|
|-
| <code>PrecacheModel</code>
| <code>PrecacheModel(string)</code>
|
|-
| <code>PrecacheScriptSound</code>
| <code>PrecacheScriptSound(string)</code>
|
|-
| <code>PrecacheSoundScript</code>
| <code>PrecacheSoundScript(string)</code>
|
|-
| <code>SetAbsAngles</code>
| <code>SetAbsAngles(Vector)</code>
|
|-
| <code>SetAbsOrigin</code>
| <code>SetAbsOrigin(Vector)</code>
|
|-
| <code>SetAngles</code>
| <code>SetAngles(num, num, num)</code>
|
|-
| <code>SetAngularVelocity</code>
| <code>SetAngularVelocity(num, num, num)</code>
|
|-
| <code>SetDrawEnabled</code>
| <code>SetDrawEnabled(bool)</code>
|
|-
| <code>SetForwardVector</code>
| <code>SetForwardVector(Vector)</code>
|
|-
| <code>SetFriction</code>
| <code>SetFriction(num)</code>
|
|-
| <code>SetGravity</code>
| <code>SetGravity(num)</code>
|
|-
| <code>SetGroupSpawnTables</code>
| <code>void SetGroupSpawnTables(handle, handle)</code>
| Cache the group spawn tables
|-
| <code>SetHealth</code>
| <code>SetHealth(num)</code>
|
|-
| <code>SetLocalAngles</code>
| <code>SetLocalAngles(Vector)</code>
|
|-
| <code>SetLocalOrigin</code>
| <code>SetLocalOrigin(Vector)</code>
|
|-
| <code>SetMaxHealth</code>
| <code>SetMaxHealth(num)</code>
|
|-
| <code>SetModel</code>
| <code>SetModel(string)</code>
|
|-
| <code>SetOrigin</code>
| <code>SetOrigin(Vector)</code>
|
|-
| <code>SetOwner</code>
| <code>SetOwner(Vector)</code>
|
|-
| <code>SetSize</code>
| <code>SetSize(Vector, Vector)</code>
|
|-
| <code>SetTeam</code>
| <code>SetTeam(num)</code>
|
|-
| <code>SetVelocity</code>
| <code>SetVelocity(Vector)</code>
|
|-
| <code>StopSound</code>
| <code>StopSound(string)</code>
|
|-
| <code>TakeDamage</code>
| <code>TakeDamage(num, num, Vector)</code>
|
|-
| <code>TakeDamageEx</code>
| <code>TakeDamageEx(Vector, Vector, Vector, Vector, Vector, num, num)</code>
|
|-
| <code>ValidateScriptScope</code>
| <code>ValidateScriptScope()</code>
|
|}
 
 
=== CSceneEntity ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>__KeyValueFromFloat</code>
| <code>__KeyValueFromFloat(string, num)</code>
|
|-
| <code>__KeyValueFromInt</code>
| <code>__KeyValueFromInt(string, num)</code>
|
|-
| <code>__KeyValueFromString</code>
| <code>__KeyValueFromString(string, string)</code>
|
|-
| <code>__KeyValueFromVector</code>
| <code>__KeyValueFromVector(string, Vector)</code>
|
|-
| <code>AddBroadcastTeamTarget</code>
| <code>void AddBroadcastTeamTarget(int)</code>
| Adds a team (by index) to the broadcast list
|-
| <code>ApplyAbsVelocityImpulse</code>
| <code>ApplyAbsVelocityImpulse(Vector)</code>
|
|-
| <code>ApplyLocalAngularVelocityImpulse</code>
| <code>ApplyLocalAngularVelocityImpulse(Vector)</code>
|
|-
| <code>ConnectOutput</code>
| <code>ConnectOutput(string, string)</code>
|
|-
| <code>Destroy</code>
| <code>Destroy()</code>
|
|-
| <code>DisableDraw</code>
| <code>DisableDraw()</code>
|
|-
| <code>DisconnectOutput</code>
| <code>DisconnectOutput(string, string)</code>
|
|-
| <code>DispatchSpawn</code>
| <code>DispatchSpawn()</code>
|
|-
| <code>EmitSound</code>
| <code>EmitSound(string)</code>
|
|-
| <code>EnableDraw</code>
| <code>EnableDraw()</code>
|
|-
| <code>entindex</code>
| <code>entindex()</code>
|
|-
| <code>EstimateLength</code>
| <code>float EstimateLength()</code>
| Returns length of this scene in seconds.
|-
| <code>EyePosition</code>
| <code>EyePosition()</code>
|
|-
| <code>FindNamedEntity</code>
| <code>handle FindNamedEntity(string)</code>
| given an entity reference, such as !target, get actual entity from scene object
|-
| <code>FirstMoveChild</code>
| <code>FirstMoveChild()</code>
|
|-
| <code>GetAbsAngles</code>
| <code>GetAbsAngles()</code>
|
|-
| <code>GetAngles</code>
| <code>GetAngles()</code>
|
|-
| <code>GetAngularVelocity</code>
| <code>GetAngularVelocity()</code>
|
|-
| <code>GetBaseVelocity</code>
| <code>GetBaseVelocity()</code>
|
|-
| <code>GetBoundingMaxs</code>
| <code>GetBoundingMaxs()</code>
|
|-
| <code>GetBoundingMaxsOriented</code>
| <code>GetBoundingMaxsOriented()</code>
|
|-
| <code>GetBoundingMins</code>
| <code>GetBoundingMins()</code>
|
|-
| <code>GetBoundingMinsOriented</code>
| <code>GetBoundingMinsOriented()</code>
|
|-
| <code>GetCenter</code>
| <code>GetCenter()</code>
|
|-
| <code>GetClassname</code>
| <code>GetClassname()</code>
|
|-
| <code>GetEntityHandle</code>
| <code>GetEntityHandle()</code>
|
|-
| <code>GetEntityIndex</code>
| <code>GetEntityIndex()</code>
|
|-
| <code>GetForwardVector</code>
| <code>GetForwardVector()</code>
|
|-
| <code>GetFriction</code>
| <code>GetFriction()</code>
|
|-
| <code>GetHealth</code>
| <code>GetHealth()</code>
|
|-
| <code>GetLeftVector</code>
| <code>GetLeftVector()</code>
|
|-
| <code>GetLocalAngles</code>
| <code>GetLocalAngles()</code>
|
|-
| <code>GetLocalOrigin</code>
| <code>GetLocalOrigin()</code>
|
|-
| <code>GetLocalVelocity</code>
| <code>GetLocalVelocity()</code>
|
|-
| <code>GetMaxHealth</code>
| <code>GetMaxHealth()</code>
|
|-
| <code>GetModelKeyValues</code>
| <code>GetModelKeyValues()</code>
|
|-
| <code>GetModelName</code>
| <code>GetModelName()</code>
|
|-
| <code>GetMoveParent</code>
| <code>GetMoveParent()</code>
|
|-
| <code>GetName</code>
| <code>GetName()</code>
|
|-
| <code>GetOrigin</code>
| <code>GetOrigin()</code>
|
|-
| <code>GetOwner</code>
| <code>GetOwner()</code>
|
|-
| <code>GetPreTemplateName</code>
| <code>GetPreTemplateName()</code>
|
|-
| <code>GetRightVector</code>
| <code>GetRightVector()</code>
|
|-
| <code>GetRootMoveParent</code>
| <code>GetRootMoveParent()</code>
|
|-
| <code>GetScriptId</code>
| <code>GetScriptId()</code>
|
|-
| <code>GetScriptScope</code>
| <code>GetScriptScope()</code>
|
|-
| <code>GetSoundDuration</code>
| <code>GetSoundDuration(string, string)</code>
|
|-
| <code>GetTeam</code>
| <code>GetTeam()</code>
|
|-
| <code>GetUpVector</code>
| <code>GetUpVector()</code>
|
|-
| <code>GetVelocity</code>
| <code>GetVelocity()</code>
|
|-
| <code>IsPaused</code>
| <code>bool IsPaused()</code>
| If this scene is currently paused.
|-
| <code>IsPlayer</code>
| <code>IsPlayer()</code>
|
|-
| <code>IsPlayingBack</code>
| <code>bool IsPlayingBack()</code>
| If this scene is currently playing.
|-
| <code>IsValid</code>
| <code>IsValid()</code>
|
|-
| <code>KeyValueFromFloat</code>
| <code>KeyValueFromFloat(string, num)</code>
|
|-
| <code>KeyValueFromInt</code>
| <code>KeyValueFromInt(string, num)</code>
|
|-
| <code>KeyValueFromString</code>
| <code>KeyValueFromString(string, string)</code>
|
|-
| <code>KeyValueFromVector</code>
| <code>KeyValueFromVector(string, Vector)</code>
|
|-
| <code>Kill</code>
| <code>Kill()</code>
|
|-
| <code>LoadSceneFromString</code>
| <code>bool LoadSceneFromString(string, string)</code>
| given a dummy scene name and a vcd string, load the scene
|-
| <code>NextMovePeer</code>
| <code>NextMovePeer()</code>
|
|-
| <code>PrecacheModel</code>
| <code>PrecacheModel(string)</code>
|
|-
| <code>PrecacheScriptSound</code>
| <code>PrecacheScriptSound(string)</code>
|
|-
| <code>PrecacheSoundScript</code>
| <code>PrecacheSoundScript(string)</code>
|
|-
| <code>RemoveBroadcastTeamTarget</code>
| <code>void RemoveBroadcastTeamTarget(int)</code>
| Removes a team (by index) from the broadcast list
|-
| <code>SetAbsAngles</code>
| <code>SetAbsAngles(Vector)</code>
|
|-
| <code>SetAbsOrigin</code>
| <code>SetAbsOrigin(Vector)</code>
|
|-
| <code>SetAngles</code>
| <code>SetAngles(num, num, num)</code>
|
|-
| <code>SetAngularVelocity</code>
| <code>SetAngularVelocity(num, num, num)</code>
|
|-
| <code>SetDrawEnabled</code>
| <code>SetDrawEnabled(bool)</code>
|
|-
| <code>SetForwardVector</code>
| <code>SetForwardVector(Vector)</code>
|
|-
| <code>SetFriction</code>
| <code>SetFriction(num)</code>
|
|-
| <code>SetGravity</code>
| <code>SetGravity(num)</code>
|
|-
| <code>SetHealth</code>
| <code>SetHealth(num)</code>
|
|-
| <code>SetLocalAngles</code>
| <code>SetLocalAngles(Vector)</code>
|
|-
| <code>SetLocalOrigin</code>
| <code>SetLocalOrigin(Vector)</code>
|
|-
| <code>SetMaxHealth</code>
| <code>SetMaxHealth(num)</code>
|
|-
| <code>SetModel</code>
| <code>SetModel(string)</code>
|
|-
| <code>SetOrigin</code>
| <code>SetOrigin(Vector)</code>
|
|-
| <code>SetOwner</code>
| <code>SetOwner(Vector)</code>
|
|-
| <code>SetSize</code>
| <code>SetSize(Vector, Vector)</code>
|
|-
| <code>SetTeam</code>
| <code>SetTeam(num)</code>
|
|-
| <code>SetVelocity</code>
| <code>SetVelocity(Vector)</code>
|
|-
| <code>StopSound</code>
| <code>StopSound(string)</code>
|
|-
| <code>TakeDamage</code>
| <code>TakeDamage(num, num, Vector)</code>
|
|-
| <code>TakeDamageEx</code>
| <code>TakeDamageEx(Vector, Vector, Vector, Vector, Vector, num, num)</code>
|
|-
| <code>ValidateScriptScope</code>
| <code>ValidateScriptScope()</code>
|
|}
 
 
=== CScriptEntityOutputs ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>AddOutput</code>
| <code>void AddOutput(handle, string, string, string, string, float, int)</code>
| Arguments: ( entity, outputName, targetName, inputName, parameter, delay, timesToFire ) - add a new output to the entity
|-
| <code>GetNumElements</code>
| <code>int GetNumElements(handle, string)</code>
| Arguments: ( entity, outputName ) - returns the number of array elements
|-
| <code>GetOutputTable</code>
| <code>void GetOutputTable(handle, string, handle, int)</code>
| Arguments: ( entity, outputName, table, arrayElement ) - returns a table of output information
|-
| <code>HasAction</code>
| <code>bool HasAction(handle, string)</code>
| Arguments: ( entity, outputName ) - returns true if an action exists for the output
|-
| <code>HasOutput</code>
| <code>bool HasOutput(handle, string)</code>
| Arguments: ( entity, outputName ) - returns true if the output exists
|-
| <code>IsValid</code>
| <code>IsValid()</code>
|
|-
| <code>RemoveOutput</code>
| <code>void RemoveOutput(handle, string, string, string, string)</code>
| Arguments: ( entity, outputName, targetName, inputName, parameter ) - remove an output from the entity
|}
 
 
=== CScriptKeyValues ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>constructor</code>
| <code>constructor()</code>
|
|-
| <code>FindKey</code>
| <code>handle FindKey(string)</code>
| Given a KeyValues object and a key name, find a KeyValues object associated with the key name
|-
| <code>GetFirstSubKey</code>
| <code>handle GetFirstSubKey()</code>
| Given a KeyValues object, return the first sub key object
|-
| <code>GetKeyBool</code>
| <code>bool GetKeyBool(string)</code>
| Given a KeyValues object and a key name, return associated bool value
|-
| <code>GetKeyFloat</code>
| <code>float GetKeyFloat(string)</code>
| Given a KeyValues object and a key name, return associated float value
|-
| <code>GetKeyInt</code>
| <code>int GetKeyInt(string)</code>
| Given a KeyValues object and a key name, return associated integer value
|-
| <code>GetKeyString</code>
| <code>string GetKeyString(string)</code>
| Given a KeyValues object and a key name, return associated string value
|-
| <code>GetNextKey</code>
| <code>handle GetNextKey()</code>
| Given a KeyValues object, return the next key object in a sub key group
|-
| <code>IsKeyEmpty</code>
| <code>bool IsKeyEmpty(string)</code>
| Given a KeyValues object and a key name, return true if key name has no value
|-
| <code>IsValid</code>
| <code>IsValid()</code>
|
|-
| <code>ReleaseKeyValues</code>
| <code>void ReleaseKeyValues()</code>
| Given a root KeyValues object, release its contents
|}
 
 
=== CSimpleCallChainer ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>Call</code>
| <code>Call()</code>
|
|-
| <code>chain</code>
| <code>chain()</code>
|
|-
| <code>constructor</code>
| <code>constructor()</code>
|
|-
| <code>PostScriptExecute</code>
| <code>PostScriptExecute()</code>
|
|-
| <code>prefix</code>
| <code>prefix()</code>
|
|-
| <code>scope</code>
| <code>scope()</code>
|
|}
 
 
=== CTFPlayer ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>__KeyValueFromFloat</code>
| <code>__KeyValueFromFloat(string, num)</code>
|
|-
| <code>__KeyValueFromInt</code>
| <code>__KeyValueFromInt(string, num)</code>
|
|-
| <code>__KeyValueFromString</code>
| <code>__KeyValueFromString(string, string)</code>
|
|-
| <code>__KeyValueFromVector</code>
| <code>__KeyValueFromVector(string, Vector)</code>
|
|-
| <code>AddCond</code>
| <code>void AddCond(string)</code>
|
|-
| <code>AddCondEx</code>
| <code>void AddCondEx(string, float, handle)</code>
|
|-
| <code>AddCustomAttribute</code>
| <code>void AddCustomAttribute(string, float, float)</code>
| Add a custom attribute to the player
|-
| <code>ApplyAbsVelocityImpulse</code>
| <code>void ApplyAbsVelocityImpulse(Vector)</code>
|
|-
| <code>ApplyLocalAngularVelocityImpulse</code>
| <code>ApplyLocalAngularVelocityImpulse(Vector)</code>
|
|-
| <code>ApplyPunchImpulseX</code>
| <code>bool ApplyPunchImpulseX(float)</code>
|
|-
| <code>CanAirDash</code>
| <code>bool CanAirDash()</code>
|
|-
| <code>CanBeDebuffed</code>
| <code>bool CanBeDebuffed()</code>
|
|-
| <code>CanBreatheUnderwater</code>
| <code>bool CanBreatheUnderwater()</code>
|
|-
| <code>CanDuck</code>
| <code>bool CanDuck()</code>
| Can the player duck?
|-
| <code>CanGetWet</code>
| <code>bool CanGetWet()</code>
|
|-
| <code>CanJump</code>
| <code>bool CanJump()</code>
| Can the player jump?
|-
| <code>CanPlayerMove</code>
| <code>bool CanPlayerMove()</code>
| Can the player move?
|-
| <code>ConnectOutput</code>
| <code>ConnectOutput(string, string)</code>
|
|-
| <code>Destroy</code>
| <code>Destroy()</code>
|
|-
| <code>DisableDraw</code>
| <code>DisableDraw()</code>
|
|-
| <code>DisconnectOutput</code>
| <code>DisconnectOutput(string, string)</code>
|
|-
| <code>DispatchSpawn</code>
| <code>DispatchSpawn()</code>
|
|-
| <code>DropFlag</code>
| <code>void DropFlag(bool)</code>
| Force player to drop the flag.
|-
| <code>DropRune</code>
| <code>void DropRune(bool, int)</code>
| Force player to drop the rune.
|-
| <code>EmitSound</code>
| <code>EmitSound(string)</code>
|
|-
| <code>EnableDraw</code>
| <code>EnableDraw()</code>
|
|-
| <code>entindex</code>
| <code>entindex()</code>
|
|-
| <code>EyePosition</code>
| <code>EyePosition()</code>
|
|-
| <code>FindBodygroupByName</code>
| <code>FindBodygroupByName(string)</code>
|
|-
| <code>FiringTalk</code>
| <code>void FiringTalk()</code>
| Makes eg. a heavy go AAAAAAAAAAaAaa like they are firing their minigun.
|-
| <code>FirstMoveChild</code>
| <code>FirstMoveChild()</code>
|
|-
| <code>ForceChangeTeam</code>
| <code>void ForceChangeTeam(int, bool)</code>
| Force player to change their team.
|-
| <code>GetAbsAngles</code>
| <code>GetAbsAngles()</code>
|
|-
| <code>GetAngles</code>
| <code>GetAngles()</code>
|
|-
| <code>GetAngularVelocity</code>
| <code>GetAngularVelocity()</code>
|
|-
| <code>GetAttachmentAngles</code>
| <code>GetAttachmentAngles(num)</code>
|
|-
| <code>GetAttachmentBone</code>
| <code>GetAttachmentBone(num)</code>
|
|-
| <code>GetAttachmentOrigin</code>
| <code>GetAttachmentOrigin(num)</code>
|
|-
| <code>GetBackstabs</code>
| <code>int GetBackstabs()</code>
|
|-
| <code>GetBaseVelocity</code>
| <code>GetBaseVelocity()</code>
|
|-
| <code>GetBodygroup</code>
| <code>GetBodygroup(num)</code>
|
|-
| <code>GetBodygroupName</code>
| <code>GetBodygroupName(num)</code>
|
|-
| <code>GetBodygroupPartName</code>
| <code>GetBodygroupPartName(num, num)</code>
|
|-
| <code>GetBoneAngles</code>
| <code>GetBoneAngles(num)</code>
|
|-
| <code>GetBoneOrigin</code>
| <code>GetBoneOrigin(num)</code>
|
|-
| <code>GetBonusPoints</code>
| <code>int GetBonusPoints()</code>
|
|-
| <code>GetBoundingMaxs</code>
| <code>GetBoundingMaxs()</code>
|
|-
| <code>GetBoundingMaxsOriented</code>
| <code>GetBoundingMaxsOriented()</code>
|
|-
| <code>GetBoundingMins</code>
| <code>GetBoundingMins()</code>
|
|-
| <code>GetBoundingMinsOriented</code>
| <code>GetBoundingMinsOriented()</code>
|
|-
| <code>GetBuildingsDestroyed</code>
| <code>int GetBuildingsDestroyed()</code>
|
|-
| <code>GetCaptures</code>
| <code>int GetCaptures()</code>
|
|-
| <code>GetCenter</code>
| <code>GetCenter()</code>
|
|-
| <code>GetClassEyeHeight</code>
| <code>Vector GetClassEyeHeight()</code>
| Gets the eye height of the player
|-
| <code>GetClassname</code>
| <code>GetClassname()</code>
|
|-
| <code>GetCondDuration</code>
| <code>float GetCondDuration(string)</code>
|
|-
| <code>GetCurrentTauntMoveSpeed</code>
| <code>float GetCurrentTauntMoveSpeed()</code>
|
|-
| <code>GetDefenses</code>
| <code>int GetDefenses()</code>
|
|-
| <code>GetDisguiseAmmoCount</code>
| <code>int GetDisguiseAmmoCount()</code>
|
|-
| <code>GetDisguiseTarget</code>
| <code>handle GetDisguiseTarget()</code>
|
|-
| <code>GetDisguiseTeam</code>
| <code>int GetDisguiseTeam()</code>
|
|-
| <code>GetDominations</code>
| <code>int GetDominations()</code>
|
|-
| <code>GetEntityHandle</code>
| <code>GetEntityHandle()</code>
|
|-
| <code>GetEntityIndex</code>
| <code>GetEntityIndex()</code>
|
|-
| <code>GetForwardVector</code>
| <code>GetForwardVector()</code>
|
|-
| <code>GetFriction</code>
| <code>GetFriction()</code>
|
|-
| <code>GetGrapplingHookTarget</code>
| <code>handle GetGrapplingHookTarget()</code>
| What entity is the player grappling?
|-
| <code>GetHeadshots</code>
| <code>int GetHeadshots()</code>
|
|-
| <code>GetHealPoints</code>
| <code>int GetHealPoints()</code>
|
|-
| <code>GetHealTarget</code>
| <code>handle GetHealTarget()</code>
| Who is the medic healing?
|-
| <code>GetHealth</code>
| <code>GetHealth()</code>
|
|-
| <code>GetInvulns</code>
| <code>int GetInvulns()</code>
|
|-
| <code>GetKillAssists</code>
| <code>int GetKillAssists()</code>
|
|-
| <code>GetLeftVector</code>
| <code>GetLeftVector()</code>
|
|-
| <code>GetLocalAngles</code>
| <code>GetLocalAngles()</code>
|
|-
| <code>GetLocalOrigin</code>
| <code>GetLocalOrigin()</code>
|
|-
| <code>GetLocalVelocity</code>
| <code>GetLocalVelocity()</code>
|
|-
| <code>GetMaxHealth</code>
| <code>GetMaxHealth()</code>
|
|-
| <code>GetModelKeyValues</code>
| <code>GetModelKeyValues()</code>
|
|-
| <code>GetModelName</code>
| <code>GetModelName()</code>
|
|-
| <code>GetModelScale</code>
| <code>GetModelScale()</code>
|
|-
| <code>GetMoveParent</code>
| <code>GetMoveParent()</code>
|
|-
| <code>GetName</code>
| <code>GetName()</code>
|
|-
| <code>GetNextChangeClassTime</code>
| <code>float GetNextChangeClassTime()</code>
| Get next change class time.
|-
| <code>GetNextChangeTeamTime</code>
| <code>float GetNextChangeTeamTime()</code>
| Get next change team time.
|-
| <code>GetNextRegenTime</code>
| <code>float GetNextRegenTime()</code>
| Get next health regen time.
|-
| <code>GetOrigin</code>
| <code>GetOrigin()</code>
|
|-
| <code>GetOwner</code>
| <code>GetOwner()</code>
|
|-
| <code>GetPreTemplateName</code>
| <code>GetPreTemplateName()</code>
|
|-
| <code>GetRageMeter</code>
| <code>float GetRageMeter()</code>
|
|-
| <code>GetResupplyPoints</code>
| <code>int GetResupplyPoints()</code>
|
|-
| <code>GetRevenge</code>
| <code>int GetRevenge()</code>
|
|-
| <code>GetRightVector</code>
| <code>GetRightVector()</code>
|
|-
| <code>GetRootMoveParent</code>
| <code>GetRootMoveParent()</code>
|
|-
| <code>GetScoutHypeMeter</code>
| <code>float GetScoutHypeMeter()</code>
|
|-
| <code>GetScriptId</code>
| <code>GetScriptId()</code>
|
|-
| <code>GetScriptScope</code>
| <code>GetScriptScope()</code>
|
|-
| <code>GetSequence</code>
| <code>GetSequence()</code>
|
|-
| <code>GetSequenceActivityName</code>
| <code>GetSequenceActivityName(num)</code>
|
|-
| <code>GetSequenceDuration</code>
| <code>GetSequenceDuration(num)</code>
|
|-
| <code>GetSequenceName</code>
| <code>GetSequenceName(num)</code>
|
|-
| <code>GetSkin</code>
| <code>GetSkin()</code>
|
|-
| <code>GetSoundDuration</code>
| <code>GetSoundDuration(string, string)</code>
|
|-
| <code>GetSpyCloakMeter</code>
| <code>float GetSpyCloakMeter()</code>
|
|-
| <code>GetTeam</code>
| <code>GetTeam()</code>
|
|-
| <code>GetTeleports</code>
| <code>int GetTeleports()</code>
|
|-
| <code>GetTimeSinceCalledForMedic</code>
| <code>float GetTimeSinceCalledForMedic()</code>
| When did the player last call medic
|-
| <code>GetUpVector</code>
| <code>GetUpVector()</code>
|
|-
| <code>GetVelocity</code>
| <code>GetVelocity()</code>
|
|-
| <code>HasItem</code>
| <code>bool HasItem()</code>
| Currently holding an item? Eg. capture flag
|-
| <code>InAirDueToExplosion</code>
| <code>bool InAirDueToExplosion()</code>
|
|-
| <code>InAirDueToKnockback</code>
| <code>bool InAirDueToKnockback()</code>
|
|-
| <code>InCond</code>
| <code>bool InCond(string)</code>
|
|-
| <code>IsAirDashing</code>
| <code>bool IsAirDashing()</code>
|
|-
| <code>IsAllowedToTaunt</code>
| <code>bool IsAllowedToTaunt()</code>
|
|-
| <code>IsCallingForMedic</code>
| <code>bool IsCallingForMedic()</code>
| Is this player calling for medic?
|-
| <code>IsCarryingRune</code>
| <code>bool IsCarryingRune()</code>
|
|-
| <code>IsControlStunned</code>
| <code>bool IsControlStunned()</code>
|
|-
| <code>IsCritBoosted</code>
| <code>bool IsCritBoosted()</code>
|
|-
| <code>IsFireproof</code>
| <code>bool IsFireproof()</code>
|
|-
| <code>IsFullyInvisible</code>
| <code>bool IsFullyInvisible()</code>
|
|-
| <code>IsHypeBuffed</code>
| <code>bool IsHypeBuffed()</code>
|
|-
| <code>IsImmuneToPushback</code>
| <code>bool IsImmuneToPushback()</code>
|
|-
| <code>IsInspecting</code>
| <code>bool IsInspecting()</code>
|
|-
| <code>IsInvulnerable</code>
| <code>bool IsInvulnerable()</code>
|
|-
| <code>IsJumping</code>
| <code>bool IsJumping()</code>
|
|-
| <code>IsMiniBoss</code>
| <code>bool IsMiniBoss()</code>
| Is this player an MvM mini-boss?
|-
| <code>IsNoclipping</code>
| <code>IsNoclipping()</code>
|
|-
| <code>IsParachuteEquipped</code>
| <code>bool IsParachuteEquipped()</code>
|
|-
| <code>IsPlacingSapper</code>
| <code>bool IsPlacingSapper()</code>
| Returns true if we placed a sapper in the last few moments
|-
| <code>IsPlayer</code>
| <code>IsPlayer()</code>
|
|-
| <code>IsRageDraining</code>
| <code>bool IsRageDraining()</code>
|
|-
| <code>IsRegenerating</code>
| <code>bool IsRegenerating()</code>
|
|-
| <code>IsSapping</code>
| <code>bool IsSapping()</code>
| Returns true if we are currently sapping
|-
| <code>IsSequenceFinished</code>
| <code>IsSequenceFinished()</code>
|
|-
| <code>IsSnared</code>
| <code>bool IsSnared()</code>
|
|-
| <code>IsStealthed</code>
| <code>bool IsStealthed()</code>
|
|-
| <code>IsUsingActionSlot</code>
| <code>bool IsUsingActionSlot()</code>
|
|-
| <code>IsValid</code>
| <code>IsValid()</code>
|
|-
| <code>IsViewingCYOAPDA</code>
| <code>bool IsViewingCYOAPDA()</code>
|
|-
| <code>KeyValueFromFloat</code>
| <code>KeyValueFromFloat(string, num)</code>
|
|-
| <code>KeyValueFromInt</code>
| <code>KeyValueFromInt(string, num)</code>
|
|-
| <code>KeyValueFromString</code>
| <code>KeyValueFromString(string, string)</code>
|
|-
| <code>KeyValueFromVector</code>
| <code>KeyValueFromVector(string, Vector)</code>
|
|-
| <code>Kill</code>
| <code>Kill()</code>
|
|-
| <code>LookupActivity</code>
| <code>LookupActivity(string)</code>
|
|-
| <code>LookupAttachment</code>
| <code>LookupAttachment(string)</code>
|
|-
| <code>LookupBone</code>
| <code>LookupBone(string)</code>
|
|-
| <code>LookupSequence</code>
| <code>LookupSequence(string)</code>
|
|-
| <code>NextMovePeer</code>
| <code>NextMovePeer()</code>
|
|-
| <code>PrecacheModel</code>
| <code>PrecacheModel(string)</code>
|
|-
| <code>PrecacheScriptSound</code>
| <code>PrecacheScriptSound(string)</code>
|
|-
| <code>PrecacheSoundScript</code>
| <code>PrecacheSoundScript(string)</code>
|
|-
| <code>RemoveAllCond</code>
| <code>void RemoveAllCond()</code>
|
|-
| <code>RemoveAllObjects</code>
| <code>void RemoveAllObjects(bool)</code>
| Remove all player objects. Eg. dispensers/sentries.
|-
| <code>RemoveCond</code>
| <code>void RemoveCond(string)</code>
|
|-
| <code>RemoveCondEx</code>
| <code>void RemoveCondEx(string, bool)</code>
|
|-
| <code>RemoveCustomAttribute</code>
| <code>void RemoveCustomAttribute(string)</code>
| Remove a custom attribute to the player
|-
| <code>RemoveDisguise</code>
| <code>void RemoveDisguise()</code>
| Undisguise a spy.
|-
| <code>RemoveInvisibility</code>
| <code>void RemoveInvisibility()</code>
| Un-invisible a spy.
|-
| <code>ResetScores</code>
| <code>void ResetScores()</code>
|
|-
| <code>ResetSequence</code>
| <code>ResetSequence(num)</code>
|
|-
| <code>SetAbsAngles</code>
| <code>SetAbsAngles(Vector)</code>
|
|-
| <code>SetAbsOrigin</code>
| <code>SetAbsOrigin(Vector)</code>
|
|-
| <code>SetAngles</code>
| <code>SetAngles(num, num, num)</code>
|
|-
| <code>SetAngularVelocity</code>
| <code>SetAngularVelocity(num, num, num)</code>
|
|-
| <code>SetBodygroup</code>
| <code>SetBodygroup(num, num)</code>
|
|-
| <code>SetCondDuration</code>
| <code>void SetCondDuration(string, float)</code>
|
|-
| <code>SetCurrentTauntMoveSpeed</code>
| <code>void SetCurrentTauntMoveSpeed(float)</code>
|
|-
| <code>SetDisguiseAmmoCount</code>
| <code>void SetDisguiseAmmoCount(int)</code>
|
|-
| <code>SetDrawEnabled</code>
| <code>SetDrawEnabled(bool)</code>
|
|-
| <code>SetForwardVector</code>
| <code>SetForwardVector(Vector)</code>
|
|-
| <code>SetFriction</code>
| <code>SetFriction(num)</code>
|
|-
| <code>SetGrapplingHookTarget</code>
| <code>void SetGrapplingHookTarget(handle, bool)</code>
| Set the player's target grapple entity
|-
| <code>SetGravity</code>
| <code>SetGravity(num)</code>
|
|-
| <code>SetHealth</code>
| <code>SetHealth(num)</code>
|
|-
| <code>SetIsMiniBoss</code>
| <code>void SetIsMiniBoss(bool)</code>
| Make this player an MvM mini-boss.
|-
| <code>SetLocalAngles</code>
| <code>SetLocalAngles(Vector)</code>
|
|-
| <code>SetLocalOrigin</code>
| <code>SetLocalOrigin(Vector)</code>
|
|-
| <code>SetMaxHealth</code>
| <code>SetMaxHealth(num)</code>
|
|-
| <code>SetModel</code>
| <code>SetModel(string)</code>
|
|-
| <code>SetModelScale</code>
| <code>SetModelScale(num, num)</code>
|
|-
| <code>SetNextChangeClassTime</code>
| <code>void SetNextChangeClassTime(float)</code>
| Set next change class time.
|-
| <code>SetNextChangeTeamTime</code>
| <code>void SetNextChangeTeamTime(float)</code>
| Set next change team time.
|-
| <code>SetNextRegenTime</code>
| <code>void SetNextRegenTime(float)</code>
| Set next health regen time.
|-
| <code>SetOrigin</code>
| <code>SetOrigin(Vector)</code>
|
|-
| <code>SetOwner</code>
| <code>SetOwner(Vector)</code>
|
|-
| <code>SetPoseParameter</code>
| <code>SetPoseParameter(num, num)</code>
|
|-
| <code>SetRageMeter</code>
| <code>void SetRageMeter(float)</code>
|
|-
| <code>SetScoutHypeMeter</code>
| <code>void SetScoutHypeMeter(float)</code>
|
|-
| <code>SetSequence</code>
| <code>SetSequence(num)</code>
|
|-
| <code>SetSize</code>
| <code>SetSize(Vector, Vector)</code>
|
|-
| <code>SetSkin</code>
| <code>SetSkin(num)</code>
|
|-
| <code>SetSpyCloakMeter</code>
| <code>void SetSpyCloakMeter(float)</code>
|
|-
| <code>SetTeam</code>
| <code>SetTeam(num)</code>
|
|-
| <code>SetUseBossHealthBar</code>
| <code>void SetUseBossHealthBar(bool)</code>
|
|-
| <code>SetVelocity</code>
| <code>SetVelocity(Vector)</code>
|
|-
| <code>StopSound</code>
| <code>StopSound(string)</code>
|
|-
| <code>TakeDamage</code>
| <code>TakeDamage(num, num, Vector)</code>
|
|-
| <code>TakeDamageEx</code>
| <code>TakeDamageEx(Vector, Vector, Vector, Vector, Vector, num, num)</code>
|
|-
| <code>TryToPickupBuilding</code>
| <code>bool TryToPickupBuilding()</code>
| Make the player attempt to pick up a building in front of them
|-
| <code>ValidateScriptScope</code>
| <code>ValidateScriptScope()</code>
|
|-
| <code>WasInCond</code>
| <code>bool WasInCond(string)</code>
|
|}
 
=== LateBinder ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>Begin</code>
| <code>Begin()</code>
|
|-
| <code>End</code>
| <code>End()</code>
|
|-
| <code>EstablishDelegation</code>
| <code>EstablishDelegation()</code>
|
|-
| <code>HookRootMetamethod</code>
| <code>HookRootMetamethod()</code>
|
|-
| <code>Log</code>
| <code>Log()</code>
|
|-
| <code>m_bindNamesStack</code>
| <code>m_bindNamesStack()</code>
|
|-
| <code>m_fixupSet</code>
| <code>m_fixupSet()</code>
|
|-
| <code>m_targetTable</code>
| <code>m_targetTable()</code>
|
|-
| <code>RemoveDelegation</code>
| <code>RemoveDelegation()</code>
|
|-
| <code>Resolve</code>
| <code>Resolve()</code>
|
|-
| <code>UnhookRootMetamethod</code>
| <code>UnhookRootMetamethod()</code>
|
|}
 
 
=== QAngle ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>constructor</code>
| <code>constructor()</code>
|
|-
| <code>Forward</code>
| <code>Forward()</code>
|
|-
| <code>Left</code>
| <code>Left()</code>
|
|-
| <code>Pitch</code>
| <code>Pitch()</code>
|
|-
| <code>Roll</code>
| <code>Roll()</code>
|
|-
| <code>ToKVString</code>
| <code>ToKVString()</code>
|
|-
| <code>ToQuat</code>
| <code>ToQuat()</code>
|
|-
| <code>Up</code>
| <code>Up()</code>
|
|-
| <code>Yaw</code>
| <code>Yaw()</code>
|
|}
 
 
=== Quaternion ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>constructor</code>
| <code>constructor()</code>
|
|-
| <code>Dot</code>
| <code>Dot()</code>
|
|-
| <code>Invert</code>
| <code>Invert()</code>
|
|-
| <code>Norm</code>
| <code>Norm()</code>
|
|-
| <code>SetPitchYawRoll</code>
| <code>SetPitchYawRoll(num, num, num)</code>
|
|-
| <code>ToKVString</code>
| <code>ToKVString()</code>
|
|-
| <code>ToQAngle</code>
| <code>ToQAngle()</code>
|
|}
 
 
=== regexp ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>capture</code>
| <code>capture(string, num)</code>
|
|-
| <code>constructor</code>
| <code>constructor(string)</code>
|
|-
| <code>match</code>
| <code>match(string)</code>
|
|-
| <code>search</code>
| <code>search(string, num)</code>
|
|-
| <code>subexpcount</code>
| <code>subexpcount()</code>
|
|}
 
 
=== Vector ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>constructor</code>
| <code>constructor()</code>
|
|-
| <code>Cross</code>
| <code>Cross()</code>
|
|-
| <code>Dot</code>
| <code>Dot()</code>
|
|-
| <code>Length</code>
| <code>Length()</code>
|
|-
| <code>Length2D</code>
| <code>Length2D()</code>
|
|-
| <code>Length2DSqr</code>
| <code>Length2DSqr()</code>
|
|-
| <code>LengthSqr</code>
| <code>LengthSqr()</code>
|
|-
| <code>Norm</code>
| <code>Norm()</code>
|
|-
| <code>Scale</code>
| <code>Scale()</code>
|
|-
| <code>ToKVString</code>
| <code>ToKVString()</code>
|
|-
| <code>tostring</code>
| <code>tostring()</code>
|
|}
 
 
=== Vector2D ===
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>constructor</code>
| <code>constructor()</code>
|
|-
| <code>Dot</code>
| <code>Dot()</code>
|
|-
| <code>Length</code>
| <code>Length()</code>
|
|-
| <code>LengthSqr</code>
| <code>LengthSqr()</code>
|
|-
| <code>Norm</code>
| <code>Norm()</code>
|
|-
| <code>ToKVString</code>
| <code>ToKVString()</code>
|  
|  
|}
|}


=== Squirrel Standard Library ===


=== Vector4D ===
{{todo}}
 
{| class = "standard-table" style = "width: 85%;"
! Function
! Signature
! Description
|-
| <code>constructor</code>
| <code>constructor()</code>
|
|-
| <code>Dot</code>
| <code>Dot()</code>
|
|-
| <code>Length</code>
| <code>Length()</code>
|
|-
| <code>LengthSqr</code>
| <code>LengthSqr()</code>
|
|-
| <code>Norm</code>
| <code>Norm()</code>
|
|-
| <code>ToKVString</code>
| <code>ToKVString()</code>
|
|}


== See also ==
== See also ==
Line 5,512: Line 2,591:
* [[VScript Fundamentals]]
* [[VScript Fundamentals]]
* {{sq}} [[Squirrel]]
* {{sq}} [[Squirrel]]
* {{csgo}} [[CSGO Vscript Examples|VScript Examples]]
* {{tf2}} [[TF2 Vscript Examples|VScript Examples]]
* {{csgo}} [[CSGO Vscript Examples|VScript Examples (CSGO)]]
* {{l4d2}} [[List of L4D2 Script Functions]]
* {{l4d2}} [[List of L4D2 Script Functions]]
* {{portal2}} [[List of Portal 2 Script Functions]]
* {{portal2}} [[List of Portal 2 Script Functions]]

Revision as of 03:24, 7 November 2022

Stub

This article or section is a stub. You can help by expanding it.

Squirrel This list contains the engine-related Squirrel classes, functions and variables available for VScript in Template:Game name.

The official documentation can be printed in the console by setting developer to non-zero, loading a map, and executing script_help. However, this documentation is very incomplete and most methods are not listed, requiring them to be found by other means instead.

Warning.pngWarning:This page is still work-in-progress, many functions lack documentation and testing.
Note.pngNote:Most of these functions were dumped externally as they are not exposed by normal means. For these functions, the return is unknown and the arguments may not be fully correct.
Todo: Copy over documentation from the L4D2 page, since Team Fortress 2 is derived from the VScript version as Left 4 Dead 2.
Todo: Constants and variables (e.g. PI)
Todo: Figure out inheritance, currently some methods are listed redundantly on each derived child
Todo: Format the constructors more nicely


























Classes

CBaseEntity

This is a script handle class for entities. All entities have a script handle using this class, sometimes as one of its subclasses.

An entity's own handle are accessed with:

Function Signature Description
__KeyValueFromFloat __KeyValueFromFloat(string, num)
__KeyValueFromInt __KeyValueFromInt(string, num)
__KeyValueFromString __KeyValueFromString(string, string)
__KeyValueFromVector __KeyValueFromVector(string, Vector)
ApplyAbsVelocityImpulse void ApplyAbsVelocityImpulse(Vector) Apply a Velocity Impulse
ApplyLocalAngularVelocityImpulse void ApplyLocalAngularVelocityImpulse(Vector) Apply an Ang Velocity Impulse
ConnectOutput void ConnectOutput(string, string) Adds an I/O connection that will call the named function when the specified output fires
Destroy void Destroy()
DisableDraw void DisableDraw() Enable drawing (removes EF_NODRAW)
DisconnectOutput void DisconnectOutput(string, string) Removes a connected script function from an I/O event.
DispatchSpawn void DispatchSpawn() Alternative dispatch spawn, same as the one in CEntities, for convenience.
EmitSound void EmitSound(string) Plays a sound from this entity.
EnableDraw void EnableDraw() Disable drawing (sets EF_NODRAW)
entindex int entindex()
EyePosition Vector EyePosition() Get vector to eye position - absolute coords
FirstMoveChild handle FirstMoveChild()
GetAbsAngles QAngle GetAbsAngles() Get entity pitch, yaw, roll as QAngles
GetAngles Vector GetAngles() !!!LEGACY FOR COMPAT!!! DO NOT USE ME. Get entity pitch, yaw, roll as a vector
GetAngularVelocity Vector GetAngularVelocity() Get the local angular velocity - returns a vector of pitch,yaw,roll
GetBaseVelocity Vector GetBaseVelocity() Get Base? velocity
GetBoundingMaxs Vector GetBoundingMaxs() Get a vector containing max bounds, centered on object
GetBoundingMaxsOriented Vector GetBoundingMaxsOriented() Get a vector containing max bounds, centered on object, taking the object's orientation into account
GetBoundingMins Vector GetBoundingMins() Get a vector containing min bounds, centered on object
GetBoundingMinsOriented Vector GetBoundingMinsOriented() Get a vector containing min bounds, centered on object, taking the object's orientation into account
GetCenter Vector GetCenter() Get vector to center of object - absolute coords
GetClassname string GetClassname()
GetEntityHandle <unknown> GetEntityHandle() Get the entity as an EHANDLE
GetEntityIndex int GetEntityIndex()
GetForwardVector Vector GetForwardVector() Get the forward vector of the entity
GetFriction float GetFriction() Get PLAYER friction, ignored for objects
GetHealth int GetHealth()
GetLeftVector Vector GetLeftVector() !!!LEGACY FOR COMPAT!!! Get the **right** vector of the entity. This is purely for compatibility. DO NOT USE ME. Use GetRightVector!
GetLocalAngles QAngle GetLocalAngles()
GetLocalOrigin Vector GetLocalOrigin()
GetLocalVelocity Vector GetLocalVelocity() Get Entity relative velocity
GetMaxHealth int GetMaxHealth()
GetModelKeyValues handle GetModelKeyValues() Get a KeyValue class instance on this entity's model
GetModelName string GetModelName() Returns the name of the model
GetMoveParent handle GetMoveParent() If in hierarchy, retrieves the entity's parent
GetName string GetName()
GetOrigin Vector GetOrigin() This is GetAbsOrigin with a funny script name for some reason. Not changing it for legacy compat though.
GetOwner handle GetOwner() Gets this entity's owner
GetPreTemplateName string GetPreTemplateName() Get the entity name stripped of template unique decoration
GetRightVector Vector GetRightVector() Get the right vector of the entity
GetRootMoveParent handle GetRootMoveParent() If in hierarchy, walks up the hierarchy to find the root parent
GetScriptId string GetScriptId() Retrieve the unique identifier used to refer to the entity within the scripting system
GetScriptScope handle GetScriptScope() Retrieve the script-side data associated with an entity
GetSoundDuration float GetSoundDuration(string, string) Returns float duration of the sound. Takes soundname and optional actormodelname.
GetTeam int GetTeam()
GetUpVector Vector GetUpVector() Get the up vector of the entity
GetVelocity Vector GetVelocity()
IsPlayer bool IsPlayer()
IsValid IsValid()
KeyValueFromFloat bool KeyValueFromFloat(string, float) Executes KeyValue with a float
KeyValueFromInt bool KeyValueFromInt(string, int) Executes KeyValue with an int
KeyValueFromString bool KeyValueFromString(string, string) Executes KeyValue with a string
KeyValueFromVector bool KeyValueFromVector(string, Vector) Executes KeyValue with a vector
Kill void Kill()
NextMovePeer handle NextMovePeer()
PrecacheModel void PrecacheModel(string)
PrecacheScriptSound void PrecacheScriptSound(string)
PrecacheSoundScript void PrecacheSoundScript(string) Precache a sound for later playing.
SetAbsAngles void SetAbsAngles(QAngle) Set entity pitch, yaw, roll as QAngles
SetAbsOrigin void SetAbsOrigin(Vector) SetAbsOrigin
SetAngles void SetAngles(float, float, float) !!!LEGACY FOR COMPAT!!! DO NOT USE ME. Set entity pitch, yaw, roll
SetAngularVelocity void SetAngularVelocity(float, float, float) Set the local angular velocity - takes float pitch,yaw,roll velocities
SetDrawEnabled void SetDrawEnabled(bool) Enables drawing if you pass true, disables drawing if you pass false.
SetForwardVector void SetForwardVector(Vector) Set the orientation of the entity to have this forward vector
SetFriction void SetFriction(float) Set PLAYER friction, ignored for objects
SetGravity void SetGravity(float) Set PLAYER gravity, ignored for objects
SetHealth void SetHealth(int)
SetLocalAngles void SetLocalAngles(QAngle)
SetLocalOrigin void SetLocalOrigin(Vector)
SetMaxHealth void SetMaxHealth(int)
SetModel void SetModel(string) Set a model for this entity
SetOrigin void SetOrigin(Vector) THIS DOESNT CALL SetAbsOrigin IT CALLS Teleport
SetOwner void SetOwner(handle) Sets this entity's owner
SetSize void SetSize(Vector, Vector)
SetTeam void SetTeam(int)
SetVelocity void SetVelocity(Vector)
StopSound void StopSound(string) Stops a sound on this entity.
TakeDamage void TakeDamage(float, int, handle) (flDamage, nDamageType, hAttacker)
TakeDamageEx void TakeDamageEx(handle, handle, handle, Vector, Vector, float, int) (hInflictor, hAttacker, hWeapon, vecDamageForce, vecDamagePosition, flDamage, nDamageType)
ValidateScriptScope bool ValidateScriptScope() Ensure that an entity's script scope has been created

CBaseAnimating

Extends CBaseEntity

Script handle class for animatable entities, such as props.

Function Signature Description
FindBodygroupByName int FindBodygroupByName(string) Find a bodygroup id by name
GetAttachmentAngles QAngle GetAttachmentAngles(int) Get the attachement id's angles as a p,y,r vector
GetAttachmentBone int GetAttachmentBone(int) Get the named attachement's parent bone index
GetAttachmentOrigin Vector GetAttachmentOrigin(int) Get the attachement id's origin vector
GetBodygroup int GetBodygroup(int) Get a bodygroup by id
GetBodygroupName string GetBodygroupName(int) Get the bodygroup id's name
GetBodygroupPartName string GetBodygroupPartName(int, int) Get name by group and part
GetBoneAngles QAngle GetBoneAngles(int) Get the bone id's angles as a p,y,r vector
GetBoneOrigin Vector GetBoneOrigin(int) Get the bone id's origin vector
GetModelScale float GetModelScale()
GetSequence int GetSequence() Get the current sequence id
GetSequenceActivityName string GetSequenceActivityName(int) Get the activity name for a sequence by id
GetSequenceDuration float GetSequenceDuration(int) Get a sequence duration by id
GetSequenceName string GetSequenceName(int) Get a sequence name by id
GetSkin int GetSkin() Gets the current skin index.
IsSequenceFinished bool IsSequenceFinished() Ask whether the main sequence is done playing
LookupActivity int LookupActivity(string) Get the named activity index
LookupAttachment int LookupAttachment(string) Get the named attachement id
LookupBone int LookupBone(string) Get the named bone index
LookupSequence int LookupSequence(string) Looks up a sequence by sequence name or activity name
ResetSequence void ResetSequence(int) Reset a sequence by id. If the id is different than the current sequence, switch to the new sequence
SetBodygroup void SetBodygroup(int, int) Sets a bodygroup
SetModelScale void SetModelScale(float, float) (scale, change_duration) Changes a model's scale over time
SetPoseParameter float SetPoseParameter(int, float) (id, value) Sets a pose parameter value
SetSequence void SetSequence(int) Set a sequence by id
SetSkin void SetSkin(int) Sets the skin.


CBasePlayer

Extends CBaseAnimating

Script handle class for player entities.

Function Signature Description
IsNoclipping bool IsNoclipping() Returns true if the player is in noclip mode.


CBaseMultiplayerPlayer

Extends CBasePlayer

Script handle sub-classes for player entities in multiplayer games. No additional methods.


CTFPlayer

Extends CBaseMultiplayerPlayer

Script handle class for TF2s player entities.

Function Signature Description
AddCond void AddCond(string)
AddCondEx void AddCondEx(string, float, handle)
AddCustomAttribute void AddCustomAttribute(string, float, float) Add a custom attribute to the player
ApplyPunchImpulseX bool ApplyPunchImpulseX(float)
CanAirDash bool CanAirDash()
CanBeDebuffed bool CanBeDebuffed()
CanBreatheUnderwater bool CanBreatheUnderwater()
CanDuck bool CanDuck() Can the player duck?
CanGetWet bool CanGetWet()
CanJump bool CanJump() Can the player jump?
CanPlayerMove bool CanPlayerMove() Can the player move?
DropFlag void DropFlag(bool) Force player to drop the flag.
DropRune void DropRune(bool, int) Force player to drop the rune.
FiringTalk void FiringTalk() Makes eg. a heavy go AAAAAAAAAAaAaa like they are firing their minigun.
FirstMoveChild FirstMoveChild()
ForceChangeTeam void ForceChangeTeam(int, bool) Force player to change their team.
GetBackstabs int GetBackstabs()
GetBuildingsDestroyed int GetBuildingsDestroyed()
GetCaptures int GetCaptures()
GetClassEyeHeight Vector GetClassEyeHeight() Gets the eye height of the player
GetCondDuration float GetCondDuration(string)
GetCurrentTauntMoveSpeed float GetCurrentTauntMoveSpeed()
GetDefenses int GetDefenses()
GetDisguiseAmmoCount int GetDisguiseAmmoCount()
GetDisguiseTarget handle GetDisguiseTarget()
GetDisguiseTeam int GetDisguiseTeam()
GetDominations int GetDominations()
GetGrapplingHookTarget handle GetGrapplingHookTarget() What entity is the player grappling?
GetHeadshots int GetHeadshots()
GetHealPoints int GetHealPoints()
GetHealTarget handle GetHealTarget() Who is the medic healing?
GetInvulns int GetInvulns()
GetKillAssists int GetKillAssists()
GetNextChangeClassTime float GetNextChangeClassTime() Get next change class time.
GetNextChangeTeamTime float GetNextChangeTeamTime() Get next change team time.
GetNextRegenTime float GetNextRegenTime() Get next health regen time.
GetRageMeter float GetRageMeter()
GetResupplyPoints int GetResupplyPoints()
GetRevenge int GetRevenge()
GetScoutHypeMeter float GetScoutHypeMeter()
GetSpyCloakMeter float GetSpyCloakMeter()
GetTeleports int GetTeleports()
GetTimeSinceCalledForMedic float GetTimeSinceCalledForMedic() When did the player last call medic
HasItem bool HasItem() Currently holding an item? Eg. capture flag
InAirDueToExplosion bool InAirDueToExplosion()
InAirDueToKnockback bool InAirDueToKnockback()
InCond bool InCond(string)
IsAirDashing bool IsAirDashing()
IsAllowedToTaunt bool IsAllowedToTaunt()
IsCallingForMedic bool IsCallingForMedic() Is this player calling for medic?
IsCarryingRune bool IsCarryingRune()
IsControlStunned bool IsControlStunned()
IsCritBoosted bool IsCritBoosted()
IsFireproof bool IsFireproof()
IsFullyInvisible bool IsFullyInvisible()
IsHypeBuffed bool IsHypeBuffed()
IsImmuneToPushback bool IsImmuneToPushback()
IsInspecting bool IsInspecting()
IsInvulnerable bool IsInvulnerable()
IsJumping bool IsJumping()
IsMiniBoss bool IsMiniBoss() Is this player an MvM mini-boss?
IsParachuteEquipped bool IsParachuteEquipped()
IsPlacingSapper bool IsPlacingSapper() Returns true if we placed a sapper in the last few moments
IsPlayer IsPlayer()
IsRageDraining bool IsRageDraining()
IsRegenerating bool IsRegenerating()
IsSapping bool IsSapping() Returns true if we are currently sapping
IsSnared bool IsSnared()
IsStealthed bool IsStealthed()
IsUsingActionSlot bool IsUsingActionSlot()
IsViewingCYOAPDA bool IsViewingCYOAPDA()
RemoveAllCond void RemoveAllCond()
RemoveAllObjects void RemoveAllObjects(bool) Remove all player objects. Eg. dispensers/sentries.
RemoveCond void RemoveCond(string)
RemoveCondEx void RemoveCondEx(string, bool)
RemoveCustomAttribute void RemoveCustomAttribute(string) Remove a custom attribute to the player
RemoveDisguise void RemoveDisguise() Undisguise a spy.
RemoveInvisibility void RemoveInvisibility() Un-invisible a spy.
ResetScores void ResetScores()
SetCondDuration void SetCondDuration(string, float)
SetCurrentTauntMoveSpeed void SetCurrentTauntMoveSpeed(float)
SetDisguiseAmmoCount void SetDisguiseAmmoCount(int)
SetGrapplingHookTarget void SetGrapplingHookTarget(handle, bool) Set the player's target grapple entity
SetIsMiniBoss void SetIsMiniBoss(bool) Make this player an MvM mini-boss.
SetNextChangeClassTime void SetNextChangeClassTime(float) Set next change class time.
SetNextChangeTeamTime void SetNextChangeTeamTime(float) Set next change team time.
SetNextRegenTime void SetNextRegenTime(float) Set next health regen time.
SetRageMeter void SetRageMeter(float)
SetScoutHypeMeter void SetScoutHypeMeter(float)
SetSpyCloakMeter void SetSpyCloakMeter(float)
SetUseBossHealthBar void SetUseBossHealthBar(bool)
TryToPickupBuilding bool TryToPickupBuilding() Make the player attempt to pick up a building in front of them
WasInCond bool WasInCond(string)


Convars

Game Instance: Convars

Provides an interface for getting and setting convars on the server.

Todo: The class for this doesn't seem to be directly available.

Methods

Function Signature Description
GetClientConvarValue string GetClientConvarValue(string name, int entindex) Returns the convar value for the entindex as a string. Only works on client convars with the FCVAR_USERINFO flag.
GetStr string GetStr(string name) Returns the convar as a string. May return null if no such convar.
GetFloat float GetFloat(string name) Returns the convar as a float. May return null if no such convar.
SetValue void SetValue(string name, value) Sets the value of the convar. Supported types are bool, int, float, string.

CEntities

Game Instance: Entities

An interface to find and iterate over the script handles for the entities in play. To iterate over a set of entities, pass null to the previous parameter in the appropriate method to start an iteration. A reference to a previously-found entity can be used instead to continue a search.

The following are two equivalent examples and iterate over all weapons on the map:

local ent = null;
while ( ent = Entities.FindByClassname(ent, "weapon_*") )
{
  // ...
}
for (local ent; ent = Entities.FindByName(ent, "weapon_*"); )
{
  // ...
}
Note.pngNote:
  • The variable name ent is arbitrary.
  • Indeed, we mean "=" and not "==" in the loop conditions! The loops end if ent becomes null, which happens when no matching entities have an entity index higher to the one in previous parameter.
  • Semicolons are optional, except in the header of the for statement.
  • The string parameters of the FindBy... functions support the wildcard star *. In the above example, FindByClassname only returns either a handle of an entity whose classname begins with "weapon_" or it returns null.
Function Signature Description
CreateByClassname handle CreateByClassname(string) Creates an entity by classname
DispatchSpawn void DispatchSpawn(handle) Dispatches spawn of an entity!
FindByClassname handle FindByClassname(handle, string) Find entities by class name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
FindByClassnameNearest handle FindByClassnameNearest(string, Vector, float) Find entities by class name nearest to a point.
FindByClassnameWithin handle FindByClassnameWithin(handle, string, Vector, float) 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
FindByModel handle FindByModel(handle, string) Find entities by model name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
FindByName handle FindByName(handle, string) Find entities by name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
FindByNameNearest handle FindByNameNearest(string, Vector, float) Find entities by name nearest to a point.
FindByNameWithin handle FindByNameWithin(handle, string, Vector, float) Find entities by name within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
FindByTarget handle FindByTarget(handle, string) Find entities by targetname. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
FindInSphere handle FindInSphere(handle, Vector, float) Find entities within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
First handle First() Begin an iteration over the list of entities
Next handle Next(handle) At the given reference of a previously-found entity, returns the next one after it in the list.


CNetPropManager

Game Instance: NetProps

Allows reading and updating the network properties and datamaps of an entity.

If the entity has multiple netprops with the same name, the data table name can be prepended with a dot to specify which one to use (e.g. "m_itTimer.m_timestamp").

Tip.pngTip:List of netprops and datamaps can be found here: https://www.invalidvertex.com/tf2dump.php
Warning.pngWarning:Each netprop has a set size in bits, exceeding the size may desync the clients from the server causing unpredictable behavior.

Methods

Function Signature Description
GetPropArraySize int GetPropArraySize(CBaseEntity entity, string propertyName) Returns the size of an netprop array, or -1.
GetPropEntity CBaseEntity GetPropEntity(CBaseEntity entity, string propertyName) Reads an EHANDLE-valued netprop (21 bit integer). Returns the script handle of the entity.
GetPropEntityArray CBaseEntity GetPropEntityArray(CBaseEntity entity, string propertyName, int arrayElement) Reads an EHANDLE-valued netprop (21 bit integer) from an array. Returns the script handle of the entity.
GetPropFloat float GetPropFloat(CBaseEntity entity, string propertyName) Reads a float-valued netprop.
GetPropFloatArray float GetPropFloatArray(CBaseEntity entity, string propertyName, int arrayElement) Reads a float-valued netprop from an array.
GetPropInt int GetPropInt(CBaseEntity entity, string propertyName) Reads an integer-valued netprop.
GetPropIntArray int GetPropIntArray(CBaseEntity entity, string propertyName, int arrayElement) Reads an integer-valued netprop from an array.
GetPropString string GetPropString(CBaseEntity entity, string propertyName) Reads an string-valued netprop.
GetPropStringArray string GetPropStringArray(CBaseEntity entity, string propertyName, int arrayElement) Reads an string-valued netprop from an array.
GetPropType string GetPropType(CBaseEntity entity, string propertyName) Returns the name of the netprop type as a string.
GetPropVector Vector GetPropVector(CBaseEntity entity, string propertyName) Reads a 3D vector-valued netprop.
Todo:  Does it work for other dimensions too?
GetPropVectorArray Vector GetPropVectorArray(CBaseEntity entity, string propertyName, int arrayElement) Reads a 3D vector-valued netprop from an array.
HasProp bool HasProp(CBaseEntity entity, string propertyName) Checks if a netprop exists.
SetPropEntity void SetPropEntity(CBaseEntity entity, string propertyName, CBaseEntity value) Sets an EHANDLE-valued netprop (21 bit integer) to reference the specified entity.
SetPropEntityArray void SetPropEntityArray(CBaseEntity entity, string propertyName, CBaseEntity value, int arrayElement) Sets an EHANDLE-valued netprop (21 bit integer) from an array to reference the specified entity.
SetPropFloat void SetPropFloat(CBaseEntity entity, string propertyName, float value) Sets a netprop to the specified float.
SetPropFloatArray void SetPropFloatArray(CBaseEntity entity, string propertyName, float value, int arrayElement) Sets a netprop from an array to the specified float.
SetPropInt void SetPropInt(CBaseEntity entity, string propertyName, int value) Sets a netprop to the specified integer.
SetPropIntArray void SetPropInt(CBaseEntity entity, string propertyName, int value, int arrayElement) Sets a netprop from an array to the specified integer.
SetPropString void SetPropString(CBaseEntity entity, string propertyName, string value) Sets a netprop to the specified string.
SetPropStringArray void SetPropStringArray(CBaseEntity entity, string propertyName, string value, int arrayElement) Sets a netprop from an array to the specified string.
SetPropVector void SetPropVector(CBaseEntity entity, string propertyName, Vector value) Sets a netprop to the specified vector.
SetPropVectorArray void SetPropVectorArray(CBaseEntity entity, string propertyName, Vector value, int arrayElement) Sets a netprop from an array to the specified vector.


CScriptEntityOutputs

Game Instance: EntityOutputs

Allows reading and manipulation of entity output data.

Methods

Function Signature Description
AddOutput void AddOutput(CBaseEntity entity, string outputName, string targetName, string inputName, string parameter, float delay, int timesToFire) Adds a new output to the entity.
GetNumElements int GetNumElements(CBaseEntity entity, string outputName) Returns the number of array elements.
GetOutputTable void GetOutputTable(CBaseEntity entity, string outputName, table, int arrayElement) Fills the passed table with output information.
HasAction bool HasAction(CBaseEntity entity, string outputName) Returns true if an action exists for the output.
HasOutput bool HasOutput(CBaseEntity entity, string outputName) Returns true if the output exists.
RemoveOutput void RemoveOutput(CBaseEntity entity, string outputName, string targetName, string inputName, string parameter) Removes an output from the entity.


CScriptKeyValues

Script handle representation of a model's $keyvalues block. All sub-keys are instances of the same class.

Methods

Function Signature Description
constructor
FindKey CScriptKeyValues FindKey(string key) Find a sub key by the key name.
GetFirstSubKey CScriptKeyValues GetFirstSubKey() Return the first sub key object.
GetKeyBool bool GetKeyBool(string key) Return the key value as a bool.
GetKeyFloat float GetKeyFloat(string key) Return the key value as a float.
GetKeyInt int GetKeyInt(string key) Return the key value as an integer.
GetKeyString string GetKeyString(string key) Return the key value as a string.
GetNextKey CScriptKeyValues GetNextKey() Return the next neighbor key object to the one the method is called on.
IsKeyEmpty bool IsKeyEmpty(string key) Returns true if the named key has no value.
IsValid bool IsValid() Whether the handle belongs to a valid key.
ReleaseKeyValues void ReleaseKeyValues() Releases the contents of the instance.


CPlayerVoiceListener

Todo: What instances use this class?
Function Signature Description
GetPlayerSpeechDuration float GetPlayerSpeechDuration(int) Returns the number of seconds the player has been continuously speaking.
IsPlayerSpeaking bool IsPlayerSpeaking(int) Returns whether the player specified is speaking.


CEnvEntityMaker

Extends CBaseEntity

Script handle class for env_entity_maker.

Function Signature Description SpawnEntity void SpawnEntity() Create an entity at the location of the maker
SpawnEntityAtEntityOrigin void SpawnEntityAtEntityOrigin(handle) Create an entity at the location of a specified entity instance
SpawnEntityAtLocation void SpawnEntityAtLocation(Vector, Vector) Create an entity at a specified location and orientaton, orientation is Euler angle in degrees (pitch, yaw, roll)
SpawnEntityAtNamedEntityOrigin void SpawnEntityAtNamedEntityOrigin(string) Create an entity at the location of a named entity


CFuncTrackTrain

Extends CBaseEntity

Script handle class for func_tracktrain.

Function Signature Description
GetFuturePosition Vector GetFuturePosition(float, float) Get a position on the track x seconds in the future


CPointScriptTemplate

Extends CBaseEntity

Script handle class for point_script_template.

Function Signature Description
AddTemplate void AddTemplate(string, handle) Add an entity to the template spawner
SetGroupSpawnTables void SetGroupSpawnTables(handle, handle) Cache the group spawn tables


CSceneEntity

Extends CBaseEntity

Script handle class for scripted_scene, which make use of VCD data.

Function Signature Description
AddBroadcastTeamTarget void AddBroadcastTeamTarget(int) Adds a team (by index) to the broadcast list
EstimateLength float EstimateLength() Returns length of this scene in seconds.
FindNamedEntity handle FindNamedEntity(string) given an entity reference, such as !target, get actual entity from scene object
IsPaused bool IsPaused() If this scene is currently paused.
IsPlayingBack bool IsPlayingBack() If this scene is currently playing.
LoadSceneFromString bool LoadSceneFromString(string, string) given a dummy scene name and a vcd string, load the scene
RemoveBroadcastTeamTarget void RemoveBroadcastTeamTarget(int) Removes a team (by index) from the broadcast list


CSimpleCallChainer

Has the same members as CCallChainer. [Todo]

Function Signature Description
Call Call()
chain chain()
constructor constructor()
PostScriptExecute PostScriptExecute()
prefix prefix()
scope scope()

CCallChainer

Function Signature Description
Call Call()
chains chains()
constructor constructor()
PostScriptExecute PostScriptExecute()
prefix prefix()
scope scope()

LateBinder

[Todo]

Function Signature Description
Begin Begin()
End End()
EstablishDelegation EstablishDelegation()
HookRootMetamethod HookRootMetamethod()
Log Log()
m_bindNamesStack m_bindNamesStack()
m_fixupSet m_fixupSet()
m_targetTable m_targetTable()
RemoveDelegation RemoveDelegation()
Resolve Resolve()
UnhookRootMetamethod UnhookRootMetamethod()

regexp

The built-in Squirrel class for regular expressions.

Methods

Function Signature Description
constructor regexp()
capture table capture(str, [start]) Returns an array of tables containing two indexes ("begin" and "end") of the first match of the regular expression in the string str. An array entry is created for each captured sub expressions. If no match occurs returns null. The search starts from the index start of the string, if start is omitted the search starts from the beginning of the string.
match bool match(str) Returns a true if the regular expression matches the string str, otherwise returns false.
search table search(str, [start]) Returns a table containing two indexes ("begin" and "end") of the first match of the regular expression in the string str, otherwise if no match occurs returns null. The search starts from the index start of the string, if start is omitted the search starts from the beginning of the string.
subexpcount subexpcount()

Data Types

Vector

Squirrel equivalent of the C++ Vector class. A three-dimensional vector with overloaded arithmetic operations for both Vectors and scalar values. [Todo]

Methods

Function Signature Description
constructor Vector() Creates a new null vector.
constructor Vector(float x, float y, float z) Creates a new vector with the specified Cartesian coordiantes.
Cross float Cross(Vector factor) The vector product of two vectors. Returns a vector orthogonal to the input vectors.
Dot float Dot(Vector factor) The scalar product of two vectors.
Length float Length() Magnitude of the vector.
LengthSqr float LengthSqr() The magnitude of the vector squared. Faster than the above method.
Length2D float Length2D() Returns the magnitude of the vector on the x-y plane. Meant to be used when working with the client's HUD.
Length2DSqr float Length2DSqr() Returns the square of the magnitude of the vector on the x-y plane. Faster than the above method.
Norm float Norm() Seems to also return the vector length.
Scale Vector Scale(float factor) Scales the vector magnitude.
ToKVString string ToKVString() Returns a string without separations commas.
tostring string tostring() Returns a human-readable string.


Members

Instance Type Description
x float Cartesian X axis.
y float Cartesian Y axis.
z float Cartesian Z axis.

Operations

Operation Description
Vector + Vector Returns the sum of two Vectors.
Vector - Vector Returns the subtraction of two Vectors.
Vector * Vector Returns the multiplication of two Vectors.
Vector / Vector Returns the division of two Vectors.

QAngle

Squirrel equivalent of the C++ QAngle class. Represents a three-dimensional orientation as Euler angles.

Has overloaded arithmetic operations with both QAngles and scalar values. [Todo]

Function Signature Description
constructor constructor()
Forward Forward()
Left Left()
Pitch Pitch()
Roll Roll()
ToKVString ToKVString()
ToQuat ToQuat()
Up Up()
Yaw Yaw()


Vector2D, Vector4D

Two and four-dimensional equivalents to Vector.

Methods

Function Signature Description
constructor VectorXD(float x, float y, ...) Creates a new vector with the specified Cartesian coordiantes.
Dot float Dot(VectorXD factor) The scalar product of two vectors.
Length float Length() Magnitude of the vector.
LengthSqr float LengthSqr() The magnitude of the vector squared. Faster than the above method.
Norm float Norm() Seems to also return the vector length.
ToKVString string ToKVString() Returns a string without separations commas.


Quaternion

Function Signature Description
constructor constructor()
Dot Dot()
Invert Invert()
Norm Norm()
SetPitchYawRoll SetPitchYawRoll(num, num, num)
ToKVString ToKVString()
ToQAngle ToQAngle()

Globals

Todo: Split this section up (especially the built-in Squirrel functions)
Function Signature Description
__CollectEventCallbacks __CollectEventCallbacks()
__CollectGameEventCallbacks __CollectGameEventCallbacks()
__DumpScope __DumpScope()
__ReplaceClosures __ReplaceClosures()
__RunEventCallbacks __RunEventCallbacks()
__RunGameEventCallbacks __RunGameEventCallbacks()
__VScriptServerDebugHook __VScriptServerDebugHook()
abs abs(num)
acos acos(num)
AddThinkToEnt void AddThinkToEnt(handle, string) Adds a late bound think function to the C++ think tables for the obj
AddToScriptHelp AddToScriptHelp()
AllowThirdPersonCamera bool AllowThirdPersonCamera()
ArePlayersInHell bool ArePlayersInHell()
array array(num)
asin asin(num)
assert assert()
Assert Assert()
atan atan(num)
atan2 atan2(num, num)
BeginScriptDebug BeginScriptDebug()
callee callee()
ceil ceil(num)
ClearGameEventCallbacks ClearGameEventCallbacks()
ClientPrint void ClientPrint(handle, int, string) Print a client message
collectgarbage collectgarbage()
compilestring compilestring(string, string)
cos cos(num)
CreateProp handle CreateProp(string, Vector, string, int) Create a physics prop
CreateSceneEntity handle CreateSceneEntity(string) Create a scene entity to play the specified scene.
DebugDrawBox void DebugDrawBox(Vector, Vector, int, int, int, int, float) Draw a debug overlay box
DebugDrawBoxAngles void DebugDrawBoxAngles(Vector, Vector, Vector, QAngle, Vector, float, float) Draw a debug oriented box (cent, min, max, angles(p,y,r), vRgb, a, duration)
DebugDrawBoxDirection void DebugDrawBoxDirection(Vector, Vector, Vector, Vector, Vector, float, float) Draw a debug forward box (cent, min, max, forward, vRgb, a, duration)
DebugDrawCircle void DebugDrawCircle(Vector, Vector, float, float, bool, float) Draw a debug circle (center, rad, vRgb, a, ztest, duration)
DebugDrawClear void DebugDrawClear() Try to clear all the debug overlay info
DebugDrawLine void DebugDrawLine(Vector, Vector, int, int, int, bool, float) Draw a debug overlay line
DebugDrawLine_vCol void DebugDrawLine_vCol(Vector, Vector, Vector, bool, float) Draw a debug line using color vec (start, end, vRgb, a, ztest, duration)
DebugDrawScreenTextLine void DebugDrawScreenTextLine(float, float, int, string, int, int, int, int, float) Draw text with a line offset
DebugDrawText void DebugDrawText(Vector, string, bool, float) Draw text in 3d (origin, text, bViewCheck, duration)
developer developer()
DispatchParticleEffect void DispatchParticleEffect(string, Vector, Vector) Dispatches a one-off particle system
Document Document()
DoEntFire DoEntFire(string, string, string, num, Vector, Vector)
DoIncludeScript bool DoIncludeScript(string, handle) Execute a script (internal)
DoUniqueString DoUniqueString(string)
dummy dummy()
DumpObject DumpObject()
EmitAmbientSoundOn void EmitAmbientSoundOn(string, float, int, int, handle) Play named ambient sound on an entity.
EmitSoundOn void EmitSoundOn(string, handle) Play named sound on Entity
EmitSoundOnClient void EmitSoundOnClient(string, handle) Play named sound only on the client for the passed in player
enabledebuginfo enabledebuginfo()
EndScriptDebug EndScriptDebug()
EntFire function EntFire(target, action, value, delay, activator) Generate and entity i/o event
EntFireByHandle void EntFireByHandle(handle, string, string, float, handle, handle) Generate and entity i/o event. First parameter is an entity instance.
EntIndexToHScript handle EntIndexToHScript(int) Turn an entity index integer to an HScript representing that entity's script instance.
error error()
exp exp(num)
fabs fabs(num)
FileToString string FileToString(string) Reads a string from a file to send to script
FindCircularReference FindCircularReference()
FindCircularReferences FindCircularReferences()
FireGameEvent bool FireGameEvent(string, handle) Fire a game event to a listening callback function in script. Parameters are passed in a squirrel table.
FireScriptEvent FireScriptEvent()
FlagsMayBeCapped bool FlagsMayBeCapped() May a flag be captured?
floor floor(num)
format format(string)
FrameTime float FrameTime() Get the time spent on the server in the last frame
GameModeUsesCurrency bool GameModeUsesCurrency() Does the current gamemode have currency?
GameModeUsesMiniBosses bool GameModeUsesMiniBosses() Does the current gamemode have minibosses?
GameModeUsesUpgrades bool GameModeUsesUpgrades() Does the current gamemode have upgrades?
GetClassLimit int GetClassLimit(int) Get class limit for class. Indices:
getconsttable getconsttable()
GetDeveloperLevel int GetDeveloperLevel() Gets the level of 'developer'
GetFrameCount int GetFrameCount() Returns the engines current frame count
GetFriction float GetFriction(handle) Returns the Friction on a player entity, meaningless if not a player
GetFunctionSignature GetFunctionSignature()
GetGravityMultiplier float GetGravityMultiplier()
GetListenServerHost handle GetListenServerHost() Get the local player on a listen server.
GetMannVsMachineAlarmStatus bool GetMannVsMachineAlarmStatus()
GetMapName string GetMapName() Get the name of the map.
GetModelIndex int GetModelIndex(string) Returns the index of the named model.
GetOvertimeAllowedForCTF bool GetOvertimeAllowedForCTF()
GetPhysAngularVelocity Vector GetPhysAngularVelocity(handle) Get Angular Velocity for VPHYS or normal object
GetPhysVelocity Vector GetPhysVelocity(handle) Get Velocity for VPHYS or normal object
GetPlayerFromUserID handle GetPlayerFromUserID(int) Given a user id, return the entity, or null
getroottable getroottable()
GetRoundState int GetRoundState() Get current round state. Indices:
GetSoundDuration float GetSoundDuration(string, string) Returns float duration of the sound. Takes soundname and optional actormodelname.
getstackinfos getstackinfos(num)
GetStopWatchState int GetStopWatchState() Get the current stopwatch state. Indices:
GetWinningTeam int GetWinningTeam() Who won!
HaveStopWatchWinner bool HaveStopWatchWinner()
IncludeScript IncludeScript()
InMatchStartCountdown bool InMatchStartCountdown() Are we in the pre-match state?
InOvertime bool InOvertime() Currently in overtime?
IsAttackDefenseMode bool IsAttackDefenseMode()
IsBirthday bool IsBirthday() Are we in birthday mode?
IsCompetitiveMode bool IsCompetitiveMode() Playing competitive?
IsDedicatedServer bool IsDedicatedServer() Returns true if this server is a dedicated server.
IsDefaultGameMode bool IsDefaultGameMode() The absence of arena, mvm, tournament mode, etc
IsHolidayActive bool IsHolidayActive(int) Is the given holiday active? Indices:
IsHolidayMap bool IsHolidayMap(int) Playing a holiday map? Indices:
IsInArenaMode bool IsInArenaMode() Playing arena mode?
IsInKothMode bool IsInKothMode() Playing king of the hill mode?
IsInMedievalMode bool IsInMedievalMode() Playing medieval mode?
IsInWaitingForPlayers bool IsInWaitingForPlayers() Are we waiting for some stragglers?
IsMannVsMachineMode bool IsMannVsMachineMode() Playing MvM? Beep boop
IsMannVsMachineRespecEnabled bool IsMannVsMachineRespecEnabled() Are players allowed to refund their upgrades?
IsMatchTypeCasual bool IsMatchTypeCasual() Playing casual?
IsMatchTypeCompetitive bool IsMatchTypeCompetitive() Playing competitive?
IsModelPrecached bool IsModelPrecached(string) Checks if the modelname is precached.
IsPasstimeMode bool IsPasstimeMode() No ball games.
IsPlayerABot bool IsPlayerABot(handle) Is this player/entity a bot
IsPowerupMode bool IsPowerupMode() Playing powerup mode? Not compatible with MvM
IsPVEModeActive bool IsPVEModeActive()
IsQuickBuildTime bool IsQuickBuildTime() If an engie places a building, will it immediately upgrade? Eg. MvM pre-round etc.
IsSoundPrecached bool IsSoundPrecached(string) Takes a sound name
IsTruceActive bool IsTruceActive()
IsUsingGrapplingHook bool IsUsingGrapplingHook()
IsUsingSpells bool IsUsingSpells()
IsWeakref IsWeakref()
LocalTime void LocalTime(handle) Fills out a table with the local time (second, minute, hour, day, month, year, dayofweek, dayofyear, daylightsavings)
log log(num)
log10 log10(num)
lstrip lstrip(string)
MakeNamespace MakeNamespace()
MapHasMatchSummaryStage bool MapHasMatchSummaryStage()
MatchmakingShouldUseStopwatchMode bool MatchmakingShouldUseStopwatchMode()
Msg Msg()
newthread newthread(Vector)
PickupObject void PickupObject(handle, handle) Have a player pickup a nearby named entity
PlayerInstanceFromIndex handle PlayerInstanceFromIndex(int) Get a script instance of a player by index.
PlayerReadyStatus_ArePlayersOnTeamReady bool PlayerReadyStatus_ArePlayersOnTeamReady(int)
PlayerReadyStatus_HaveMinPlayersToEnable bool PlayerReadyStatus_HaveMinPlayersToEnable()
PlayerReadyStatus_ResetState void PlayerReadyStatus_ResetState()
PlayersAreOnMatchSummaryStage bool PlayersAreOnMatchSummaryStage()
PointsMayBeCaptured bool PointsMayBeCaptured() Are points able to be captured?
pow pow(num, num)
PrecacheEntityFromTable bool PrecacheEntityFromTable(handle) Precache an entity from KeyValues in table
PrecacheModel void PrecacheModel(string) Precache a model.
PrecacheSound void PrecacheSound(string) Precache a sound.
print print()
PrintHelp PrintHelp()
printl printl()
rand rand()
RandomFloat float RandomFloat(float, float) Generate a random floating point number within a range, inclusive
RandomInt int RandomInt(int, int) Generate a random integer within a range, inclusive
realPrint realPrint()
RegisterFunctionDocumentation RegisterFunctionDocumentation()
RegisterScriptGameEventListener void RegisterScriptGameEventListener(string) Register as a listener for a game event from script.
resurrectunreachable resurrectunreachable()
RetrieveNativeSignature RetrieveNativeSignature()
RotateOrientation QAngle RotateOrientation(QAngle, QAngle) Rotate a QAngle by another QAngle.
RotatePosition Vector RotatePosition(Vector, QAngle, Vector) Rotate a Vector around a point.
rstrip rstrip(string)
Say void Say(handle, string, bool) Have Entity say string, and teamOnly or not
ScreenFade void ScreenFade(handle, int, int, int, int, float, float, int) Start a screenfade with the following parameters. player, red, green, blue, alpha, flFadeTime, flFadeHold, flags
ScreenShake void ScreenShake(Vector, float, float, float, float, int, bool) Start a screenshake with the following parameters. vecCenter, flAmplitude, flFrequency, flDuration, flRadius, eCommand( SHAKE_START = 0, SHAKE_STOP = 1 ), bAirShake
ScriptDebugAddTextFilter ScriptDebugAddTextFilter()
ScriptDebugAddTrace ScriptDebugAddTrace()
ScriptDebugAddWatch ScriptDebugAddWatch()
ScriptDebugAddWatches ScriptDebugAddWatches()
ScriptDebugAddWatchPattern ScriptDebugAddWatchPattern()
ScriptDebugClearTraces ScriptDebugClearTraces()
ScriptDebugClearWatches ScriptDebugClearWatches()
ScriptDebugDefaultWatchColor ScriptDebugDefaultWatchColor()
ScriptDebugDraw ScriptDebugDraw()
ScriptDebugDrawWatches ScriptDebugDrawWatches()
ScriptDebugDumpKeys ScriptDebugDumpKeys()
ScriptDebugHook ScriptDebugHook()
ScriptDebugIterateKeys ScriptDebugIterateKeys()
ScriptDebugIterateKeysRecursive ScriptDebugIterateKeysRecursive()
ScriptDebugRemoveTextFilter ScriptDebugRemoveTextFilter()
ScriptDebugRemoveTrace ScriptDebugRemoveTrace()
ScriptDebugRemoveWatch ScriptDebugRemoveWatch()
ScriptDebugRemoveWatches ScriptDebugRemoveWatches()
ScriptDebugRemoveWatchPattern ScriptDebugRemoveWatchPattern()
ScriptDebugText ScriptDebugText()
ScriptDebugTextDraw ScriptDebugTextDraw()
ScriptDebugTextPrint ScriptDebugTextPrint()
ScriptDebugTextTrace ScriptDebugTextTrace()
ScriptDebugTraceAll ScriptDebugTraceAll()
ScriptDebugWatches ScriptDebugWatches()
SendToConsole void SendToConsole(string) Send a string to the console as a command
SendToConsoleServer void SendToConsoleServer(string) Copy of SendToServerConsole with another name for compat.
SendToServerConsole void SendToServerConsole(string) Send a string that gets executed on the server as a ServerCommand
setconsttable setconsttable()
setdebughook setdebughook()
seterrorhandler seterrorhandler()
SetFakeClientConVarValue void SetFakeClientConVarValue(handle, string, string) Sets a USERINFO client ConVar for a fakeclient
SetGravityMultiplier void SetGravityMultiplier(float)
SetMannVsMachineAlarmStatus void SetMannVsMachineAlarmStatus(bool)
SetOvertimeAllowedForCTF void SetOvertimeAllowedForCTF(bool)
SetPlayersInHell void SetPlayersInHell(bool)
setroottable setroottable()
SetUsingSpells void SetUsingSpells(bool)
ShowMessage void ShowMessage(string) Print a hud message on all clients
sin sin(num)
SpawnEntityFromTable handle SpawnEntityFromTable(string, handle) Spawn entity from KeyValues in table - 'name' is entity name, rest are KeyValues for spawn.
SpawnEntityGroupFromTable bool SpawnEntityGroupFromTable(handle) Hierarchically spawn an entity group from a set of spawn tables.
split split(string, string)
sqrt sqrt(num)
srand srand(num)
StopAmbientSoundOn void StopAmbientSoundOn(string, handle) Stop named ambient sound on an entity.
StopSoundOn void StopSoundOn(string, handle) Stop named sound on Entity
StringToFile bool StringToFile(string, string) Store a string to a file for later reading
strip strip(string)
suspend suspend()
tan tan(num)
Time float Time() Get the current server time
TraceLine float TraceLine(Vector, Vector, handle) given 2 points & ent to ignore, return fraction along line that hits world or models
TraceLineEx bool TraceLineEx(handle) Pass table - Inputs: start, end, mask, ignore -- outputs: pos, fraction, hit, enthit, startsolid
TraceLinePlayersIncluded float TraceLinePlayersIncluded(Vector, Vector, handle) given 2 points & ent to ignore, return fraction along line that hits world, models, players or npcs
type type()
UniqueString function UniqueString(string) Generate a string guaranteed to be unique across the life of the script VM, with an optional root string. Useful for adding data to tables when not sure what keys are already in use in that table.
UsePlayerReadyStatusMode bool UsePlayerReadyStatusMode()
VSquirrel_OnCreateScope VSquirrel_OnCreateScope()
VSquirrel_OnReleaseScope VSquirrel_OnReleaseScope()

Squirrel Standard Library

[Todo]

See also