List of ND Script Functions: Difference between revisions
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: | ||
Automatically generated Squirrel functions list for {{nd|4}}. | |||
== Classes == | == Classes == | ||
=== | === :: (Global functions) === | ||
==== Methods ==== | |||
{| class="standard-table" style="width: 100%;" | {| class="standard-table" style="width: 100%;" | ||
! Function | ! Function | ||
Line 10: | Line 9: | ||
! Description | ! Description | ||
|- | |- | ||
| <code> | | <code>DebugDrawBox</code> | ||
| <code> | | <code>void DebugDrawBox(Vector, Vector, Vector, int, int, int, int, float)</code> | ||
| | | Draw a debug overlay box | ||
|- | |- | ||
| <code> | | <code>DebugDrawLine</code> | ||
| <code> | | <code>void DebugDrawLine(Vector, Vector, int, int, int, bool, float)</code> | ||
| | | Draw a debug overlay box | ||
|- | |- | ||
| <code> | | <code>DoIncludeScript</code> | ||
| <code> | | <code>bool DoIncludeScript(string, handle)</code> | ||
| Execute a script (internal) | |||
| | |||
|- | |- | ||
| <code> | | <code>GetConVarFloat</code> | ||
| <code> | | <code>float GetConVarFloat(string)</code> | ||
| | | Retrieves a ConVar's value as a float | ||
|- | |- | ||
| <code> | | <code>GetConVarInt</code> | ||
| <code> | | <code>int GetConVarInt(string)</code> | ||
| | | Retrieves a ConVar's value as an integer | ||
|- | |- | ||
| <code> | | <code>GetConVarString</code> | ||
| <code> | | <code>string GetConVarString(string)</code> | ||
| | | Retrieves a ConVar's value as a string | ||
|- | |- | ||
| <code> | | <code>GetMapName</code> | ||
| <code> | | <code>string GetMapName()</code> | ||
| | | Get the name of the map. | ||
|- | |- | ||
| <code>GetTeam</code> | | <code>GetTeam</code> | ||
| <code>handle GetTeam()</code> | | <code>handle GetTeam(int)</code> | ||
| Returns | | Returns a team's handle. | ||
|- | |- | ||
| <code> | | <code>RandomFloat</code> | ||
| <code> | | <code>float RandomFloat(float, float)</code> | ||
| | | Generate a random floating point number within a range, inclusive | ||
|- | |- | ||
| <code> | | <code>RandomInt</code> | ||
| <code>int | | <code>int RandomInt(int, int)</code> | ||
| | | Generate a random integer within a range, inclusive | ||
|- | |- | ||
| <code> | | <code>SendToConsole</code> | ||
| <code>string | | <code>void SendToConsole(string)</code> | ||
| | | Send a string to the console as a command | ||
|- | |- | ||
| <code> | | <code>SetConVarFloat</code> | ||
| <code>string | | <code>void SetConVarFloat(string, float)</code> | ||
| | | Sets a ConVar's value from a float | ||
|- | |- | ||
| <code> | | <code>SetConVarInt</code> | ||
| <code>string | | <code>void SetConVarInt(string, int)</code> | ||
| | | Sets a ConVar's value from an integer | ||
|- | |- | ||
| <code> | | <code>SetConVarString</code> | ||
| <code> | | <code>void SetConVarString(string, string)</code> | ||
| | | Sets a ConVar's value from a string | ||
|- | |- | ||
| <code> | | <code>ShowMessage</code> | ||
| <code>void | | <code>void ShowMessage(string)</code> | ||
| | | Print a hud message on all clients | ||
|- | |- | ||
| <code> | | <code>Time</code> | ||
| <code> | | <code>float Time()</code> | ||
| Get the | | Get the current server time | ||
|} | |} | ||
=== CBaseEntity === | |||
=== | ==== Methods ==== | ||
{| class="standard-table" style="width: 100%;" | {| class="standard-table" style="width: 100%;" | ||
! Function | ! Function | ||
Line 180: | Line 80: | ||
! Description | ! Description | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::ConnectOutput</code> | ||
| <code> | | <code>void CBaseEntity::ConnectOutput(string, string)</code> | ||
| | | Adds an I/O connection that will call the named function when the specified output fires | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::DisconnectOutput</code> | ||
| <code> | | <code>void CBaseEntity::DisconnectOutput(string, string)</code> | ||
| | | Removes a connected script function from an I/O event. | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::FirstMoveChild</code> | ||
| <code>handle | | <code>handle CBaseEntity::FirstMoveChild()</code> | ||
| | | | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::GetClassname</code> | ||
| <code> | | <code>string CBaseEntity::GetClassname()</code> | ||
| | | | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::GetForwardVector</code> | ||
| <code> | | <code>Vector CBaseEntity::GetForwardVector()</code> | ||
| | | Get the forward vector of the entity | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::GetHealth</code> | ||
| <code>int | | <code>int CBaseEntity::GetHealth()</code> | ||
| | | | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::GetLifeState</code> | ||
| <code>int | | <code>int CBaseEntity::GetLifeState()</code> | ||
| | | | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::GetMaxHealth</code> | ||
| <code> | | <code>int CBaseEntity::GetMaxHealth()</code> | ||
| | | | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::GetMoveParent</code> | ||
| <code> | | <code>handle CBaseEntity::GetMoveParent()</code> | ||
| | | If in hierarchy, retrieves the entity's parent | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::GetName</code> | ||
| <code> | | <code>string CBaseEntity::GetName()</code> | ||
| | | | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::GetOrigin</code> | ||
| <code> | | <code>Vector CBaseEntity::GetOrigin()</code> | ||
| | | | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::GetPreTemplateName</code> | ||
| <code> | | <code>string CBaseEntity::GetPreTemplateName()</code> | ||
| | | Get the entity name stripped of template unique decoration | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::GetRootMoveParent</code> | ||
| <code> | | <code>handle CBaseEntity::GetRootMoveParent()</code> | ||
| | | If in hierarchy, walks up the hierarchy to find the root parent | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::GetScriptId</code> | ||
| <code> | | <code>string CBaseEntity::GetScriptId()</code> | ||
| | | Retrieve the unique identifier used to refer to the entity within the scripting system | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::GetScriptScope</code> | ||
| <code> | | <code>handle CBaseEntity::GetScriptScope()</code> | ||
| | | Retrieve the script-side data associated with an entity | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::GetTeam</code> | ||
| <code>handle | | <code>handle CBaseEntity::GetTeam()</code> | ||
| | | | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::GetTeamNumber</code> | ||
| <code> | | <code>int CBaseEntity::GetTeamNumber()</code> | ||
| | | | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::GetVelocity</code> | ||
| <code> | | <code>Vector CBaseEntity::GetVelocity()</code> | ||
| | | | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::NextMovePeer</code> | ||
| <code>handle | | <code>handle CBaseEntity::NextMovePeer()</code> | ||
| | | | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::SetAbsOrigin</code> | ||
| <code> | | <code>void CBaseEntity::SetAbsOrigin(Vector)</code> | ||
| | | SetAbsOrigin | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::SetForwardVector</code> | ||
| <code>void | | <code>void CBaseEntity::SetForwardVector(Vector)</code> | ||
| | | Set the orientation of the entity to have this forward vector | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::SetHealth</code> | ||
| <code>void | | <code>void CBaseEntity::SetHealth(int)</code> | ||
| | |||
| | |||
|- | |- | ||
| <code> | | <code>CBaseEntity::SetOrigin</code> | ||
| <code> | | <code>void CBaseEntity::SetOrigin(Vector)</code> | ||
| | | | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::SetVelocity</code> | ||
| <code>void | | <code>void CBaseEntity::SetVelocity(Vector)</code> | ||
| | | | ||
|- | |- | ||
| <code> | | <code>CBaseEntity::ValidateScriptScope</code> | ||
| <code> | | <code>bool CBaseEntity::ValidateScriptScope()</code> | ||
| | | Ensure that an entity's script scope has been created | ||
|} | |} | ||
=== CEntities === | |||
==== Methods ==== | |||
= | |||
== | |||
=== | |||
{| class="standard-table" style="width: 100%;" | {| class="standard-table" style="width: 100%;" | ||
! Function | ! Function | ||
Line 331: | Line 187: | ||
! Description | ! Description | ||
|- | |- | ||
| <code> | | <code>CEntities::CreateByClassname</code> | ||
| <code> | | <code>handle CEntities::CreateByClassname(string)</code> | ||
| | | 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> | | <code>CEntities::FindByClassnameNearest</code> | ||
| <code> | | <code>handle CEntities::FindByClassnameNearest(string, Vector, float)</code> | ||
| | | Find entities by class name nearest to a point. | ||
|- | |- | ||
| <code> | | <code>CEntities::FindByClassnameWithin</code> | ||
| <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> | | <code>CEntities::FindByModel</code> | ||
| <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> | | <code>CEntities::FindByName</code> | ||
| <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> | | <code>CEntities::FindByNameNearest</code> | ||
| <code> | | <code>handle CEntities::FindByNameNearest(string, Vector, float)</code> | ||
| | | Find entities by name nearest to a point. | ||
|- | |- | ||
| <code> | | <code>CEntities::FindByNameWithin</code> | ||
| <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 entity to continue a search | ||
|- | |- | ||
| <code> | | <code>CEntities::FindByTarget</code> | ||
| <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> | | <code>CEntities::FindInSphere</code> | ||
| <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> | | <code>CEntities::First</code> | ||
| <code> | | <code>handle CEntities::First()</code> | ||
| | | Begin an iteration over the list of entities | ||
|- | |- | ||
| <code> | | <code>CEntities::Next</code> | ||
| <code> | | <code>handle CEntities::Next(handle)</code> | ||
| | | Continue an iteration over the list of entities, providing reference to a previously found entity | ||
|} | |} | ||
== See also == | == See also == | ||
* [[ | * [[VScript]] | ||
* [[ | * [[VScript Fundamentals]] | ||
* {{ | * {{sq}} [[Squirrel]] | ||
Latest revision as of 09:08, 7 August 2025
Automatically generated Squirrel functions list for 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 |