Alien Swarm/Scripting/Script Functions: Difference between revisions
< Alien Swarm | Scripting
		
		
		
		Jump to navigation
		Jump to search
		| CHILLMODEA (talk | contribs) No edit summary |  (Make the ASW script index fancier and not a script_help paste.) | ||
| Line 1: | Line 1: | ||
| Automatically generated Squirrel functions list for {{alienswarm|4}}. | |||
| {{ | |||
| Function:  | == Classes == | ||
| === :: (Global functions) === | |||
| ==== Methods ==== | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! Function | |||
| ! Signature | |||
| ! Description | |||
| |- | |||
| | <code>CreateProp</code> | |||
| | <code>handle CreateProp(string, Vector, string, int)</code> | |||
| | Create a physics prop | |||
| |- | |||
| | <code>CreateSceneEntity</code> | |||
| | <code>handle CreateSceneEntity(string)</code> | |||
| | Create a scene entity to play the specified scene. | |||
| |- | |||
| | <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>EntFireByHandle</code> | |||
| | <code>void EntFireByHandle(handle, string, string, float, handle, handle)</code> | |||
| | Generate and entity i/o event. First parameter is an entity instance. | |||
| |- | |||
| | <code>FrameTime</code> | |||
| | <code>float FrameTime()</code> | |||
| | Get the time spent on the server in the last frame | |||
| |- | |||
| | <code>GetMapName</code> | |||
| | <code>string GetMapName()</code> | |||
| | Get the name of the map. | |||
| |- | |||
| | <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>TraceLine</code> | |||
| | <code>float TraceLine(Vector, Vector, handle)</code> | |||
| | given 2 points & ent to ignore, return fraction along line that hits world or models | |||
| |} | |||
| === CEntities === | |||
| ==== Methods ==== | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! Function | |||
| ! Signature | |||
| ! Description | |||
| |- | |||
| | <code>CEntities::CreateByClassname</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>CEntities::FindByClassnameNearest</code> | |||
| | <code>handle CEntities::FindByClassnameNearest(string, Vector, float)</code> | |||
| | Find entities by class name nearest to a point. | |||
| |- | |||
| | <code>CEntities::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>CEntities::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>CEntities::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>CEntities::FindByNameNearest</code> | |||
| | <code>handle CEntities::FindByNameNearest(string, Vector, float)</code> | |||
| | Find entities by name nearest to a point. | |||
| |- | |||
| | <code>CEntities::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 entity to continue a search | |||
| |- | |||
| | <code>CEntities::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>CEntities::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>CEntities::First</code> | |||
| | <code>handle CEntities::First()</code> | |||
| | Begin an iteration over the list of entities | |||
| |- | |||
| | <code>CEntities::Next</code> | |||
| | <code>handle CEntities::Next(handle)</code> | |||
| | Continue an iteration over the list of entities, providing reference to a previously found entity | |||
| |} | |||
| == See also == | |||
| * [[VScript]] | |||
| * [[VScript Fundamentals]] | |||
| * {{sq}} [[Squirrel]] | |||
| [[Category:Alien Swarm]] | |||
| [[Category:Scripting]] | |||
Revision as of 09:39, 7 August 2025
Automatically generated Squirrel functions list for Template:Alienswarm.
Classes
:: (Global functions)
Methods
| Function | Signature | Description | 
|---|---|---|
| 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, 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) | 
| EntFireByHandle | void EntFireByHandle(handle, string, string, float, handle, handle) | Generate and entity i/o event. First parameter is an entity instance. | 
| FrameTime | float FrameTime() | Get the time spent on the server in the last frame | 
| GetMapName | string GetMapName() | Get the name of the map. | 
| 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 | 
| ShowMessage | void ShowMessage(string) | Print a hud message on all clients | 
| 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 | 
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 | 
