List of ND Script Functions: Difference between revisions

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