List of ND Script Functions: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added more functions)
(Make the script functions list for Nuclear Dawn be accurate to the game. Previous page before this edit previously noted functions that didn't exist and that the page may contain invalid functions. I don't think that's going to happen any day soon)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{sq}} This list contains all engine-related Squirrel variables, functions, and constants currently available for [[VScript]] in {{game link|Nuclear Dawn}}. Some are not available yet but guaranteed to be in the next update. More not yet listed are also being added to the game and not yet listed.
Automatically generated Squirrel functions list for {{nd|4}}.
 
== Variables ==


== Classes ==
== Classes ==
=== CEntities ===
=== :: (Global functions) ===
==== Methods ====
{| class="standard-table" style="width: 100%;"
{| class="standard-table" style="width: 100%;"
! Function
! Function
Line 10: Line 9:
! Description
! Description
|-
|-
| <code>CreateByClassname</code>
| <code>DebugDrawBox</code>
| <code>handle CEntities::CreateByClassname(string)</code>
| <code>void DebugDrawBox(Vector, Vector, Vector, int, int, int, int, float)</code>
| Creates entity by class name.
| Draw a debug overlay box
|-
| <code>DebugDrawLine</code>
| <code>void DebugDrawLine(Vector, Vector, int, int, int, bool, float)</code>
| Draw a debug overlay box
|-
| <code>DoIncludeScript</code>
| <code>bool DoIncludeScript(string, handle)</code>
| Execute a script (internal)
|-
| <code>GetConVarFloat</code>
| <code>float GetConVarFloat(string)</code>
| Retrieves a ConVar's value as a float
|-
| <code>GetConVarInt</code>
| <code>int GetConVarInt(string)</code>
| Retrieves a ConVar's value as an integer
|-
|-
| <code>FindByClassname</code>
| <code>GetConVarString</code>
| <code>handle CEntities::FindByClassname(handle, string)</code>
| <code>string GetConVarString(string)</code>
| Find entities by class name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
| Retrieves a ConVar's value as a string
|-
|-
| <code>FindByClassnameNearest</code>
| <code>GetMapName</code>
| <code>handle CEntities::FindByClassnameNearest(string, Vector, float)</code>
| <code>string GetMapName()</code>
| Find entities by class name nearest to a point.
| Get the name of the map.
|-
|-
| <code>FindByClassnameWithin</code>
| <code>GetTeam</code>
| <code>handle CEntities::FindByClassnameWithin(handle, string, Vector, float)</code>
| <code>handle GetTeam(int)</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
| Returns a team's handle.
|-
|-
| <code>FindByModel</code>
| <code>RandomFloat</code>
| <code>handle CEntities::FindByModel(handle, string)</code>
| <code>float RandomFloat(float, float)</code>
| Find entities by model name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
| Generate a random floating point number within a range, inclusive
|-
|-
| <code>FindByName</code>
| <code>RandomInt</code>
| <code>handle CEntities::FindByName(handle, string)</code>
| <code>int RandomInt(int, int)</code>
| Find entities by name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
| Generate a random integer within a range, inclusive
|-
|-
| <code>FindByNameNearest</code>
| <code>SendToConsole</code>
| <code>handle CEntities::FindByNameNearest(string, Vector, float)</code>
| <code>void SendToConsole(string)</code>
| Find entities by name nearest to a point.
| Send a string to the console as a command
|-
|-
| <code>FindByNameWithin</code>
| <code>SetConVarFloat</code>
| <code>handle CEntities::FindByNameWithin(handle, string, Vector, float)</code>
| <code>void SetConVarFloat(string, float)</code>
| Find entities by name within a radius. Pass 'null' to start an iteration, or reference to a previously found continue a search
| Sets a ConVar's value from a float
|-
|-
| <code>FindByTarget</code>
| <code>SetConVarInt</code>
| <code>handle CEntities::FindByTarget(handle, string)</code>
| <code>void SetConVarInt(string, int)</code>
| Find entities by targetname. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
| Sets a ConVar's value from an integer
|-
|-
| <code>FindInSphere</code>
| <code>SetConVarString</code>
| <code>handle CEntities::FindInSphere(handle, Vector, float)</code>
| <code>void SetConVarString(string, string)</code>
| Find entities within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
| Sets a ConVar's value from a string
|-
|-
| <code>First</code>
| <code>ShowMessage</code>
| <code>handle CEntities::First()</code>
| <code>void ShowMessage(string)</code>
| Begin an iteration over the list of entities
| Print a hud message on all clients
|-
|-
| <code>Next</code>
| <code>Time</code>
| <code>handle CEntities::Next(handle)</code>
| <code>float Time()</code>
| Continue an iteration over the list of entities, providing reference to a previously found entity
| Get the current server time
|}
|}
=== CBaseEntity ===
=== CBaseEntity ===
==== Methods ====
{| class="standard-table" style="width: 100%;"
{| class="standard-table" style="width: 100%;"
! Function
! Function
Line 65: Line 80:
! Description
! Description
|-
|-
| <code>ConnectOutput</code>
| <code>CBaseEntity::ConnectOutput</code>
| <code>void ConnectOutput(string, string)</code>
| <code>void CBaseEntity::ConnectOutput(string, string)</code>
| Adds an I/O connection that will call the named function when the specified output fires
| Adds an I/O connection that will call the named function when the specified output fires
|-
|-
| <code>DisconnectOutput</code>
| <code>CBaseEntity::DisconnectOutput</code>
| <code>void DisconnectOutput(string, string)</code>
| <code>void CBaseEntity::DisconnectOutput(string, string)</code>
| Removes a connected script function from an I/O event.
| Removes a connected script function from an I/O event.
|-
|-
| <code>GetHealth</code>
| <code>CBaseEntity::FirstMoveChild</code>
| <code>int GetHealth()</code>
| <code>handle CBaseEntity::FirstMoveChild()</code>
| Returns health of the entity.
|  
|-
|-
| <code>SetHealth</code>
| <code>CBaseEntity::GetClassname</code>
| <code>void SetHealth(int)</code>
| <code>string CBaseEntity::GetClassname()</code>
| Sets health of the entity.
|  
|-
| <code>GetMaxHealth</code>
| <code>int GetMaxHealth()</code>
| Returns maximum health amount of the entity.
|-
| <code>GetTeam</code>
| <code>handle GetTeam()</code>
| Returns handle to the entity's team.
|-
|-
| <code>GetTeamNumber</code>
| <code>CBaseEntity::GetForwardVector</code>
| <code>int GetTeamNumber()</code>
| <code>Vector CBaseEntity::GetForwardVector()</code>
| Returns team index of the entity (0 - Unassigned, 1 - Spectator, 2 - Consortium, 3 - Empire).
| Get the forward vector of the entity
|-
|-
| <code>GetLifeState</code>
| <code>CBaseEntity::GetHealth</code>
| <code>int GetLifeState()</code>
| <code>int CBaseEntity::GetHealth()</code>
| Returns life state of the entity (0 - alive, 1 - dying, 2 - dead).
|  
|-
|-
| <code>GetClassname</code>
| <code>CBaseEntity::GetLifeState</code>
| <code>string GetClassname()</code>
| <code>int CBaseEntity::GetLifeState()</code>
| Returns classname of the entity.
|  
|-
|-
| <code>GetName</code>
| <code>CBaseEntity::GetMaxHealth</code>
| <code>string GetName()</code>
| <code>int CBaseEntity::GetMaxHealth()</code>
| Returns target name of the entity.
|  
|-
|-
| <code>GetPreTemplateName</code>
| <code>CBaseEntity::GetMoveParent</code>
| <code>string GetPreTemplateName()</code>
| <code>handle CBaseEntity::GetMoveParent()</code>
| Get the entity name stripped of template unique decoration.
| If in hierarchy, retrieves the entity's parent
|-
|-
| <code>GetOrigin</code>
| <code>CBaseEntity::GetName</code>
| <code>vector GetOrigin()</code>
| <code>string CBaseEntity::GetName()</code>
| Returns absolute origin of the entity.
|  
|-
|-
| <code>SetOrigin</code>
| <code>CBaseEntity::GetOrigin</code>
| <code>void SetOrigin(vector)</code>
| <code>Vector CBaseEntity::GetOrigin()</code>
| Sets absolute origin of the entity.
|  
|-
|-
| <code>GetForwardVector</code>
| <code>CBaseEntity::GetPreTemplateName</code>
| <code>vector GetForwardVector()</code>
| <code>string CBaseEntity::GetPreTemplateName()</code>
| Get the forward vector of the entity.
| Get the entity name stripped of template unique decoration
|-
|-
| <code>SetForwardVector</code>
| <code>CBaseEntity::GetRootMoveParent</code>
| <code>void SetForwardVector(vector)</code>
| <code>handle CBaseEntity::GetRootMoveParent()</code>
| Set the orientation of the entity to have this forward vector.
| If in hierarchy, walks up the hierarchy to find the root parent
|-
|-
| <code>GetVelocity</code>
| <code>CBaseEntity::GetScriptId</code>
| <code>vector GetVelocity()</code>
| <code>string CBaseEntity::GetScriptId()</code>
| Get the velocity of the entity.
| Retrieve the unique identifier used to refer to the entity within the scripting system
|-
|-
| <code>SetVelocity</code>
| <code>CBaseEntity::GetScriptScope</code>
| <code>void SetVelocity(vector)</code>
| <code>handle CBaseEntity::GetScriptScope()</code>
| Set the velocity of the entity.
| Retrieve the script-side data associated with an entity
|-
|-
| <code>GetMoveParent</code>
| <code>CBaseEntity::GetTeam</code>
| <code>handle GetMoveParent()</code>
| <code>handle CBaseEntity::GetTeam()</code>
| Get handle to the move parent of the entity.
|  
|-
|-
| <code>GetRootMoveParent</code>
| <code>CBaseEntity::GetTeamNumber</code>
| <code>handle GetRootMoveParent()</code>
| <code>int CBaseEntity::GetTeamNumber()</code>
| Get handle to the root move parent of the entity.
|  
|-
|-
| <code>FirstMoveChild</code>
| <code>CBaseEntity::GetVelocity</code>
| <code>handle FirstMoveChild()</code>
| <code>Vector CBaseEntity::GetVelocity()</code>
| Get handle to the first move child of the entity.
|  
|-
|-
| <code>NextMovePeer</code>
| <code>CBaseEntity::NextMovePeer</code>
| <code>handle NextMovePeer()</code>
| <code>handle CBaseEntity::NextMovePeer()</code>
| Get handle to the next move peer of the entity.
|  
|-
|-
| <code>__KeyValueFromString</code>
| <code>CBaseEntity::SetAbsOrigin</code>
| <code>void __KeyValueFromString(string, string)</code>
| <code>void CBaseEntity::SetAbsOrigin(Vector)</code>
| Sets string value for key name on the entity.
| SetAbsOrigin
|-
|-
| <code>__KeyValueFromInt</code>
| <code>CBaseEntity::SetForwardVector</code>
| <code>void __KeyValueFromInt(string, int)</code>
| <code>void CBaseEntity::SetForwardVector(Vector)</code>
| Sets int value for key name on the entity.
| Set the orientation of the entity to have this forward vector
|-
|-
| <code>__KeyValueFromVector</code>
| <code>CBaseEntity::SetHealth</code>
| <code>void __KeyValueFromVector(string, vector)</code>
| <code>void CBaseEntity::SetHealth(int)</code>
| Sets vector value for key name on the entity.
|  
|-
|-
| <code>ValidateScriptScope</code>
| <code>CBaseEntity::SetOrigin</code>
| <code>bool ValidateScriptScope()</code>
| <code>void CBaseEntity::SetOrigin(Vector)</code>
| Ensure that an entity's script scope has been created.
|  
|-
|-
| <code>GetScriptScope</code>
| <code>CBaseEntity::SetVelocity</code>
| <code>handle GetScriptScope()</code>
| <code>void CBaseEntity::SetVelocity(Vector)</code>
| Retrieve the script-side data associated with an entity.
|  
|-
|-
| <code>GetScriptId</code>
| <code>CBaseEntity::ValidateScriptScope</code>
| <code>int GetScriptId()</code>
| <code>bool CBaseEntity::ValidateScriptScope()</code>
| Retrieve the unique identifier used to refer to the entity within the scripting system.
| Ensure that an entity's script scope has been created
|}
|}
 
=== CEntities ===
=== CNDPlayer ===
==== Methods ====
{| class="standard-table" style="width: 100%;"
{| class="standard-table" style="width: 100%;"
! Function
! Function
Line 180: Line 187:
! Description
! Description
|-
|-
| <code>IsCommander</code>
| <code>CEntities::CreateByClassname</code>
| <code>bool IsCommander()</code>
| <code>handle CEntities::CreateByClassname(string)</code>
| Get whether or not the player is the commander for their team.
| Creates an entity by classname
|-
|-
| <code>IsCommanding</code>
| <code>CEntities::FindByClassname</code>
| <code>bool IsCommanding()</code>
| <code>handle CEntities::FindByClassname(handle, string)</code>
| Get whether or not the player is currently in RTS mode.
| Find entities by class name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
|-
| <code>GetSquad</code>
| <code>CEntities::FindByClassnameNearest</code>
| <code>handle GetSquad()</code>
| <code>handle CEntities::FindByClassnameNearest(string, Vector, float)</code>
| Returns handle to the player's squad.
| Find entities by class name nearest to a point.
|-
|-
| <code>GetSquadNumber</code>
| <code>CEntities::FindByClassnameWithin</code>
| <code>int GetSquadNumber()</code>
| <code>handle CEntities::FindByClassnameWithin(handle, string, Vector, float)</code>
| Returns squad index of the player (0 - Alpha, 1 - Bravo, 2 - Charlie, 3 - Delta).
| 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>GetClass</code>
| <code>CEntities::FindByModel</code>
| <code>int GetClass()</code>
| <code>handle CEntities::FindByModel(handle, string)</code>
| Returns class index of the player.
| Find entities by model name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
|-
| <code>GetKit</code>
| <code>CEntities::FindByName</code>
| <code>int GetKit()</code>
| <code>handle CEntities::FindByName(handle, string)</code>
| Returns kit index of the player.
| Find entities by name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
|-
| <code>GetActiveGizmo</code>
| <code>CEntities::FindByNameNearest</code>
| <code>int GetActiveGizmo()</code>
| <code>handle CEntities::FindByNameNearest(string, Vector, float)</code>
| Returns index of the player's currently selected gizmo.
| Find entities by name nearest to a point.
|-
|-
| <code>IsGizmoActive</code>
| <code>CEntities::FindByNameWithin</code>
| <code>bool IsGizmoActive(int)</code>
| <code>handle CEntities::FindByNameWithin(handle, string, Vector, float)</code>
| Returns whether effect of gizmo is active, either from equipped on player or active gizmo for player's squad.
| 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>IsInCondition</code>
| <code>CEntities::FindByTarget</code>
| <code>bool IsInCondition(int)</code>
| <code>handle CEntities::FindByTarget(handle, string)</code>
| Returns whether given condition is currently applied to the player.
| Find entities by targetname. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
|-
| <code>GetWeaponByName</code>
| <code>CEntities::FindInSphere</code>
| <code>handle GetWeaponByName(string)</code>
| <code>handle CEntities::FindInSphere(handle, Vector, float)</code>
| Returns handle to weapon owned by player of specified classname or null if unowned.
| Find entities within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
|-
| <code>GetAmmoCount</code>
| <code>CEntities::First</code>
| <code>int GetAmmoCount(int)</code>
| <code>handle CEntities::First()</code>
| Returns reserve ammo count of the player of specificed ammo type.
| Begin an iteration over the list of entities
|-
|-
| <code>GiveAmmo</code>
| <code>CEntities::Next</code>
| <code>void GiveAmmo(int, int)</code>
| <code>handle CEntities::Next(handle)</code>
| Gives the player ammo of specified type.
| Continue an iteration over the list of entities, providing reference to a previously found entity
|}
 
=== CNDTeam ===
{| class="standard-table" style="width: 100%;"
! Function
! Signature
! Description
|-
| <code>GetTeamName</code>
| <code>string GetTeamName()</code>
| Returns name of the team.
|-
| <code>GetResources</code>
| <code>int GetResources()</code>
| Returns resource count of the team.
|-
| <code>SetResources</code>
| <code>void SetResources(int)</code>
| Sets resource count of the team.
|-
| <code>GetCommander</code>
| <code>handle GetCommander()</code>
| Returns handle to team's commander player.
|-
| <code>GetSquad</code>
| <code>handle GetSquad(int)</code>
| Returns handle to indexed squad for the team.
|-
| <code>GetPlayerCount</code>
| <code>int GetPlayerCount()</code>
| Returns the number of players in the team.
|-
| <code>GetPlayer</code>
| <code>handle GetPlayer(int)</code>
| Returns handle to player at specified index of team players (0-based).
|}
 
=== CNDSquad ===
{| class="standard-table" style="width: 100%;"
! Function
! Signature
! Description
|-
| <code>GetActiveGizmo</code>
| <code>int GetActiveGizmo</code>
| Returns the active gizmo for the squad.
|-
| <code>AddPlayer</code>
| <code>void AddPlayer(handle)</code>
| Adds player to the squad.
|-
| <code>RemovePlayer</code>
| <code>void RemovePlayer(handle)</code>
| Removes player from the squad.
|-
| <code>HasPlayer</code>
| <code>bool HasPlayer(handle)</code>
| Returns whether or not the player is in the squad.
|}
 
=== CNDBaseWeapon ===
{| class="standard-table" style="width: 100%;"
! Function
! Signature
! Description
|-
| <code>GetClipAmmoCount</code>
| <code>int GetClipAmmoCount()</code>
| Returns the current ammo count inside the clip of the weapon.
|-
| <code>SetClipAmmoCount</code>
| <code>void SetClipAmmoCount(int)</code>
| Sets the current ammo count inside the clip of the weapon.
|-
| <code>GetAmmoType</code>
| <code>int GetAmmoType()</code>
| Returns the ammo type used by the weapon.
|-
| <code>GetMaxClipAmmoCount</code>
| <code>int GetMaxClipAmmoCount()</code>
| Returns the maximum amount of ammo that the clip of the weapon can hold.
|-
| <code>GetDefaultClipAmmoCount</code>
| <code>int GetDefaultClipAmmoCount()</code>
| Returns the default amount of ammo that the clip of the weapon holds.
}
 
=== CEnvEntityMaker ===
 
=== CCallChainer ===
 
=== CSimpleCallChainer ===
 
=== regxp ===
 
=== Vector ===
 
== Other functions ==
=== Engine specific ===
{| class="standard-table" style="width: 100%;"
! Function
! Signature
! Description
|-
| <code>DebugDrawBox</code>
| <code>void DebugDrawBox(Vector, Vector, Vector, int, int, int, int, float)</code>
| Draw a debug overlay box
|-
| <code>DebugDrawLine</code>
| <code>void DebugDrawLine(Vector, Vector, int, int, int, bool, float)</code>
| Draw a debug overlay box
|-
| <code>DoIncludeScript</code>
| <code>bool DoIncludeScript(string, handle)</code>
| Execute a script (internal)
|-
| <code>EntFire</code>
| <code>function EntFire(target, action, value, delay, activator)</code>
| Generate and entity i/o event
|-
| <code>GetTeam</code>
| <code>function GetTeam( int )</code>
| Returns handle to a team by index. (0 - Unassigned, 1 - Spectators, 2 - Consortium, 3 - Empire)
|-
| <code>RandomFloat</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>SendToConsole</code>
| <code>void SendToConsole(string)</code>
| Send a string to the console as a command
|-
| <code>ShowMessage</code>
| <code>void ShowMessage(string)</code>
| Print a hud message on all clients
|-
| <code>Time</code>
| <code>float Time()</code>
| Get the current server time
|-
| <code>UniqueString</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.
|}
|}
=== Standard Squirrel libary ===
== Constants ==


== See also ==
== See also ==
* [[L4D2 Vscripts]]
* [[VScript]]
* [[L4D2 Vscript Examples]]
* [[VScript Fundamentals]]
* {{portal2}} [[List of Portal 2 Script Functions]]
* {{sq}} [[Squirrel]]
 
[[Category:Nuclear Dawn]]
[[Category:Scripting]]

Latest revision as of 09:08, 7 August 2025

Automatically generated Squirrel functions list for Nuclear Dawn Nuclear Dawn.

Classes

:: (Global functions)

Methods

Function Signature Description
DebugDrawBox void DebugDrawBox(Vector, Vector, Vector, int, int, int, int, float) Draw a debug overlay box
DebugDrawLine void DebugDrawLine(Vector, Vector, int, int, int, bool, float) Draw a debug overlay box
DoIncludeScript bool DoIncludeScript(string, handle) Execute a script (internal)
GetConVarFloat float GetConVarFloat(string) Retrieves a ConVar's value as a float
GetConVarInt int GetConVarInt(string) Retrieves a ConVar's value as an integer
GetConVarString string GetConVarString(string) Retrieves a ConVar's value as a string
GetMapName string GetMapName() Get the name of the map.
GetTeam handle GetTeam(int) Returns a team's handle.
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
SendToConsole void SendToConsole(string) Send a string to the console as a command
SetConVarFloat void SetConVarFloat(string, float) Sets a ConVar's value from a float
SetConVarInt void SetConVarInt(string, int) Sets a ConVar's value from an integer
SetConVarString void SetConVarString(string, string) Sets a ConVar's value from a string
ShowMessage void ShowMessage(string) Print a hud message on all clients
Time float Time() Get the current server time

CBaseEntity

Methods

Function Signature Description
CBaseEntity::ConnectOutput void CBaseEntity::ConnectOutput(string, string) Adds an I/O connection that will call the named function when the specified output fires
CBaseEntity::DisconnectOutput void CBaseEntity::DisconnectOutput(string, string) Removes a connected script function from an I/O event.
CBaseEntity::FirstMoveChild handle CBaseEntity::FirstMoveChild()
CBaseEntity::GetClassname string CBaseEntity::GetClassname()
CBaseEntity::GetForwardVector Vector CBaseEntity::GetForwardVector() Get the forward vector of the entity
CBaseEntity::GetHealth int CBaseEntity::GetHealth()
CBaseEntity::GetLifeState int CBaseEntity::GetLifeState()
CBaseEntity::GetMaxHealth int CBaseEntity::GetMaxHealth()
CBaseEntity::GetMoveParent handle CBaseEntity::GetMoveParent() If in hierarchy, retrieves the entity's parent
CBaseEntity::GetName string CBaseEntity::GetName()
CBaseEntity::GetOrigin Vector CBaseEntity::GetOrigin()
CBaseEntity::GetPreTemplateName string CBaseEntity::GetPreTemplateName() Get the entity name stripped of template unique decoration
CBaseEntity::GetRootMoveParent handle CBaseEntity::GetRootMoveParent() If in hierarchy, walks up the hierarchy to find the root parent
CBaseEntity::GetScriptId string CBaseEntity::GetScriptId() Retrieve the unique identifier used to refer to the entity within the scripting system
CBaseEntity::GetScriptScope handle CBaseEntity::GetScriptScope() Retrieve the script-side data associated with an entity
CBaseEntity::GetTeam handle CBaseEntity::GetTeam()
CBaseEntity::GetTeamNumber int CBaseEntity::GetTeamNumber()
CBaseEntity::GetVelocity Vector CBaseEntity::GetVelocity()
CBaseEntity::NextMovePeer handle CBaseEntity::NextMovePeer()
CBaseEntity::SetAbsOrigin void CBaseEntity::SetAbsOrigin(Vector) SetAbsOrigin
CBaseEntity::SetForwardVector void CBaseEntity::SetForwardVector(Vector) Set the orientation of the entity to have this forward vector
CBaseEntity::SetHealth void CBaseEntity::SetHealth(int)
CBaseEntity::SetOrigin void CBaseEntity::SetOrigin(Vector)
CBaseEntity::SetVelocity void CBaseEntity::SetVelocity(Vector)
CBaseEntity::ValidateScriptScope bool CBaseEntity::ValidateScriptScope() Ensure that an entity's script scope has been created

CEntities

Methods

Function Signature Description
CEntities::CreateByClassname handle CEntities::CreateByClassname(string) Creates an entity by classname
CEntities::FindByClassname handle CEntities::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
CEntities::FindByClassnameNearest handle CEntities::FindByClassnameNearest(string, Vector, float) Find entities by class name nearest to a point.
CEntities::FindByClassnameWithin handle CEntities::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
CEntities::FindByModel handle CEntities::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
CEntities::FindByName handle CEntities::FindByName(handle, string) Find entities by name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
CEntities::FindByNameNearest handle CEntities::FindByNameNearest(string, Vector, float) Find entities by name nearest to a point.
CEntities::FindByNameWithin handle CEntities::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
CEntities::FindByTarget handle CEntities::FindByTarget(handle, string) Find entities by targetname. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
CEntities::FindInSphere handle CEntities::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
CEntities::First handle CEntities::First() Begin an iteration over the list of entities
CEntities::Next handle CEntities::Next(handle) Continue an iteration over the list of entities, providing reference to a previously found entity

See also