SteamVR/Environments/Scripting/API: Difference between revisions
(→CBaseEntity: Added more player class methods and removed some invalid ones.) |
(Documented more classes and enums.) |
||
Line 737: | Line 737: | ||
| <code>bool IsNPC() </code> | | <code>bool IsNPC() </code> | ||
| Is this entity an CAI_BaseNPC? | | Is this entity an CAI_BaseNPC? | ||
|- | |||
| [[Dota 2 Workshop Tools/Scripting/API/CBaseEntity.IsNull | IsNull]] | |||
| <code>bool IsNull() </code> | |||
| Detect entity has been deleted from C++ | |||
|- | |- | ||
| [[Dota 2 Workshop Tools/Scripting/API/CBaseEntity.IsPlayer | IsPlayer]] | | [[Dota 2 Workshop Tools/Scripting/API/CBaseEntity.IsPlayer | IsPlayer]] | ||
Line 2,112: | Line 2,116: | ||
|} | |} | ||
=== CTakeDamageInfo === | |||
DamageInfo handle returned by CreateDamageInfo() | |||
==== Methods ==== | ==== Methods ==== | ||
Line 2,121: | Line 2,124: | ||
! Function | ! Function | ||
! Signature | ! Signature | ||
! Description | ! Description | ||
|- | |||
| [[Destinations/Scripting/API/CTakeDamageInfo.AddDamage| AddDamage]] | |||
| <code>void AddDamage(float ''addAmount'') </code> | |||
| Adds to the damage value. | |||
|- | |- | ||
| [[ | | [[Destinations/Scripting/API/CTakeDamageInfo.AddDamageType| AddDamageType]] | ||
| <code> | | <code>void AddDamageType(int ''bitsDamageType'') </code> | ||
| | | Adds damage type bit flags. | ||
|- | |- | ||
| [[ | | [[Destinations/Scripting/API/CTakeDamageInfo.AllowFriendlyFire| AllowFriendlyFire]] | ||
| <code> | | <code>bool AllowFriendlyFire() </code> | ||
| | | | ||
|- | |- | ||
| [[ | | [[Destinations/Scripting/API/CTakeDamageInfo.BaseDamageIsValid| BaseDamageIsValid]] | ||
| <code> | | <code>bool BaseDamageIsValid() </code> | ||
| | | | ||
|- | |- | ||
| [[ | | [[Destinations/Scripting/API/CTakeDamageInfo.CanBeBlocked| CanBeBlocked]] | ||
| <code> | | <code>bool CanBeBlocked() </code> | ||
| | | | ||
|- | |- | ||
| [[ | | [[Destinations/Scripting/API/CTakeDamageInfo.GetAmmoType| GetAmmoType]] | ||
| <code> | | <code>int GetAmmoType() </code> | ||
| | | | ||
|- | |- | ||
| [[ | | [[Destinations/Scripting/API/CTakeDamageInfo.GetAttacker| GetAttacker]] | ||
| <code> | | <code>CBaseEntity GetAttacker() </code> | ||
| | | Returns the attacker entity. | ||
|- | |||
| [[Destinations/Scripting/API/CTakeDamageInfo.GetBaseDamage| GetBaseDamage]] | |||
| <code>float GetBaseDamage() </code> | |||
| | |||
|- | |||
| [[Destinations/Scripting/API/CTakeDamageInfo.GetDamage| GetDamage]] | |||
| <code>float GetDamage() </code> | |||
| Returns the damage value. | |||
|- | |||
| [[Destinations/Scripting/API/CTakeDamageInfo.GetDamageCustom| GetDamageCustom]] | |||
| <code>int GetDamageCustom() </code> | |||
| | |||
|- | |||
| [[Destinations/Scripting/API/CTakeDamageInfo.GetDamageForce| GetDamageForce]] | |||
| <code>Vector GetDamageForce() </code> | |||
| Returns the damage force. | |||
|- | |- | ||
| [[ | | [[Destinations/Scripting/API/CTakeDamageInfo.GetDamagePosition| GetDamagePosition]] | ||
| <code> | | <code>int GetDamagePosition() </code> | ||
| | | Returns the damage position. | ||
|- | |- | ||
| [[ | | [[Destinations/Scripting/API/CTakeDamageInfo.GetDamageTaken| GetDamageTaken]] | ||
| <code> | | <code>float GetDamageTaken() </code> | ||
| | | | ||
|- | |- | ||
| [[ | | [[Destinations/Scripting/API/CTakeDamageInfo.GetDamageType| GetDamageType]] | ||
| <code> | | <code>int GetDamageType() </code> | ||
| | | Returns the damage type bitfield. | ||
|- | |- | ||
| [[ | | [[Destinations/Scripting/API/CTakeDamageInfo.GetInflictor| GetInflictor]] | ||
| <code> | | <code>CBaseEntity GetInflictor() </code> | ||
| | | Returns the inflictor entity (usually the weapon). | ||
|- | |- | ||
| [[ | | [[Destinations/Scripting/API/CTakeDamageInfo.GetMaxDamage| GetMaxDamage]] | ||
| <code> | | <code>float GetMaxDamage() </code> | ||
| | | | ||
|- | |- | ||
| [[Destinations/Scripting/API/ | | [[Destinations/Scripting/API/CTakeDamageInfo.GetOriginalDamage| GetOriginalDamage]] | ||
| <code> | | <code>float GetOriginalDamage() </code> | ||
| | | | ||
|- | |- | ||
| [[Destinations/Scripting/API/ | | [[Destinations/Scripting/API/CTakeDamageInfo.GetRadius| GetRadius]] | ||
| <code> | | <code>float GetRadius() </code> | ||
| | | | ||
|- | |- | ||
| [[Destinations/Scripting/API/ | | [[Destinations/Scripting/API/CTakeDamageInfo.GetReportedPosition| GetReportedPosition]] | ||
| <code> | | <code>Vector GetReportedPosition() </code> | ||
| | | | ||
|- | |- | ||
| [[Destinations/Scripting/API/ | | [[Destinations/Scripting/API/CTakeDamageInfo.GetStabilityDamage| GetStabilityDamage]] | ||
| <code> | | <code>float GetStabilityDamage() </code> | ||
| | | | ||
|- | |- | ||
| [[Destinations/Scripting/API/ | | [[Destinations/Scripting/API/CTakeDamageInfo.ScaleDamage| ScaleDamage]] | ||
| <code> | | <code>void ScaleDamage(float ''scaleAmount'') </code> | ||
| | |||
'' | |||
|- | |- | ||
| [[Destinations/Scripting/API/ | | [[Destinations/Scripting/API/CTakeDamageInfo.SetAllowFriendlyFire| SetAllowFriendlyFire]] | ||
| <code>bool | | <code>void SetAllowFriendlyFire(bool ''allow'') </code> | ||
| | | | ||
|- | |- | ||
| [[Destinations/Scripting/API/ | | [[Destinations/Scripting/API/CTakeDamageInfo.SetAmmoType| SetAmmoType]] | ||
| <code> | | <code>void SetAmmoType(int''ammoType'') </code> | ||
| | | | ||
|- | |- | ||
| [[Destinations/Scripting/API/ | | [[Destinations/Scripting/API/CTakeDamageInfo.SetAttacker| SetAttacker]] | ||
| <code>int | | <code>void SetAttacker(CBaseEntity ''attacker'') </code> | ||
| | | | ||
|- | |||
| [[Destinations/Scripting/API/CTakeDamageInfo.SetCanBeBlocked| SetCanBeBlocked]] | |||
| <code>void SetCanBeBlocked(bool ''block'') </code> | |||
| | |||
|- | |||
| [[Destinations/Scripting/API/CTakeDamageInfo.SetDamage| SetDamage]] | |||
| <code>void SetDamage(float ''damage'') </code> | |||
| Set new damage value. | |||
|- | |||
| [[Destinations/Scripting/API/CTakeDamageInfo.SetDamageCustom| SetDamageCustom]] | |||
| <code>void SetDamageCustom(int ''damageCustom'') </code> | |||
| | |||
|- | |||
| [[Destinations/Scripting/API/CTakeDamageInfo.SetDamageForce| SetDamageForce]] | |||
| <code>void SetDamageForce(Vector ''damageForce'') </code> | |||
| Sets the damage force vector. | |||
|- | |||
| [[Destinations/Scripting/API/CTakeDamageInfo.SetDamagePosition| SetDamagePosition]] | |||
| <code>void SetDamagePosition(Vector ''damagePosition'') </code> | |||
| Sets the global space damage position. | |||
|- | |||
| [[Destinations/Scripting/API/CTakeDamageInfo.SetDamageTaken| SetDamageTaken]] | |||
| <code>void SetDamageTaken(int ''damageTaken'') </code> | |||
| | |||
|- | |||
| [[Destinations/Scripting/API/CTakeDamageInfo.SetDamageType| SetDamageType]] | |||
| <code>void SetDamageType(int ''bitsDamageType'') </code> | |||
| Set the damage type bitfield. | |||
|- | |||
| [[Destinations/Scripting/API/CTakeDamageInfo.SetMaxDamage| SetMaxDamage]] | |||
| <code>void SetMaxDamage(float ''maxDamage'') </code> | |||
| | |||
|- | |||
| [[Destinations/Scripting/API/CTakeDamageInfo.SetOriginalDamage| SetOriginalDamage]] | |||
| <code>void SetOriginalDamage(float ''originalDamage'') </code> | |||
| | |||
|- | |||
| [[Destinations/Scripting/API/CTakeDamageInfo.SetRadius| SetRadius]] | |||
| <code>void SetRadius(float ''radius'') </code> | |||
| | |||
|- | |||
| [[Destinations/Scripting/API/CTakeDamageInfo.SetReportedPosition| SetReportedPosition]] | |||
| <code>void SetReportedPosition(Vector ''reportedPosition'') </code> | |||
| | |||
|- | |- | ||
| [[Destinations/Scripting/API/ | | [[Destinations/Scripting/API/CTakeDamageInfo.SetStabilityDamage| SetStabilityDamage]] | ||
| <code> | | <code>void SetStabilityDamage(float ''stabilityDamage'') </code> | ||
| | | | ||
|} | |} | ||
=== | === Convars === | ||
Allows access to read and modify console variables. | |||
''Global accessor variable:'' <code> | ''Global accessor variable:'' <code>ConVars</code> | ||
==== Methods ==== | ==== Methods ==== | ||
Line 2,268: | Line 2,283: | ||
! Description | ! Description | ||
|- | |- | ||
| [[Dota 2 Workshop Tools/Scripting/API/ | | [[Dota 2 Workshop Tools/Scripting/API/Convars.GetBool | GetBool]] | ||
| <code> | | <code>table GetBool(string variableName) </code> | ||
| | | GetBool(name) : returns the convar as a boolean flag. | ||
|- | |- | ||
| [[Dota 2 Workshop Tools/Scripting/API/ | | [[Dota 2 Workshop Tools/Scripting/API/Convars.GetCommandClient | GetCommandClient]] | ||
| <code> | | <code>handle GetCommandClient() </code> | ||
| | | GetCommandClient() : returns the player who issued this console command. | ||
|- | |- | ||
| [[Dota 2 Workshop Tools/Scripting/API/ | | [[Dota 2 Workshop Tools/Scripting/API/Convars.GetFloat | GetFloat]] | ||
| <code> | | <code>table GetFloat(string name) </code> | ||
| | | GetFloat(name) : returns the convar as a ''float''. May return ''nil'' if no such convar. | ||
|- | |||
| [[Dota 2 Workshop Tools/Scripting/API/Convars.GetInt | GetInt]] | |||
| <code>table GetInt(string string_1) </code> | |||
| GetInt(name) : returns the convar as an ''int''. May return ''nil'' if no such convar. | |||
|- | |||
| [[Dota 2 Workshop Tools/Scripting/API/Convars.GetStr | GetStr]] | |||
| <code>table GetStr(string variableName) </code> | |||
| GetStr(name) : returns the convar as a ''string''. May return ''nil'' if no such convar. | |||
|- | |||
| [[Dota 2 Workshop Tools/Scripting/API/Convars.RegisterCommand | RegisterCommand]] | |||
| <code>void RegisterCommand(string variableName, handle function, string helpText, int flags) </code> | |||
| RegisterCommand(name, fn, helpString, flags) : register a console command. | |||
|- | |- | ||
| [[Dota 2 Workshop Tools/Scripting/API/ | | [[Dota 2 Workshop Tools/Scripting/API/Convars.RegisterConvar | RegisterConvar]] | ||
| <code> | | <code>void RegisterConvar(string name, string defaultValue, string helpText, int flags) </code> | ||
| | | RegisterConvar(name, defaultValue, helpString, flags): register a new console variable. | ||
|- | |- | ||
| [[Dota 2 Workshop Tools/Scripting/API/ | | [[Dota 2 Workshop Tools/Scripting/API/Convars.SetBool | SetBool]] | ||
| <code> | | <code>void SetBool(string variableName, bool value) </code> | ||
| | | SetBool(name, val) : sets the value of the convar to the ''bool''. | ||
|- | |- | ||
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__sub | __sub]] | | [[Dota 2 Workshop Tools/Scripting/API/Convars.SetFloat | SetFloat]] | ||
| <code>Vector __sub(Vector a, Vector b) </code> | | <code>void SetFloat(string variableName, float value) </code> | ||
| Overloaded -. Subtracts vectors | | SetFloat(name, val) : sets the value of the convar to the ''float''. | ||
|- | |- | ||
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__tostring | __tostring]] | | [[Dota 2 Workshop Tools/Scripting/API/Convars.SetInt | SetInt]] | ||
| <code>string __tostring() </code> | | <code>void SetInt(string string_1, int int_2) </code> | ||
| Overloaded .. Converts vectors to strings | | SetInt(name, val) : sets the value of the convar to the ''int''. | ||
|- | |- | ||
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__unm | __unm]] | | [[Dota 2 Workshop Tools/Scripting/API/Convars.SetStr | SetStr]] | ||
| <code>Vector __unm() </code> | | <code>void SetStr(string string_1, string string_2) </code> | ||
| Overloaded - operator | | SetStr(name, val) : sets the value of the convar to the ''string''. | ||
|} | |||
=== Decider === | |||
''No Description Set'' | |||
==== Methods ==== | |||
{| class="standard-table" style="width: 100%;" | |||
! Function | |||
! Signature | |||
! Description | |||
|- | |||
| [[Destinations/Scripting/API/Decider.AddRule | AddRule]] | |||
| <code>bool AddRule(CRule rule) </code> | |||
| Add a CRule object (defined in rulescript_base.nut) | |||
|- | |||
| [[Destinations/Scripting/API/Decider.FindAllMatches | FindAllMatches]] | |||
| <code>handle FindAllMatches(handle query, float leeway) </code> | |||
| Returns an array of all matching responses. If leeway is nonzero, all results scoring within 'leeway' of the best score return. | |||
|- | |||
| [[Destinations/Scripting/API/Decider.FindBestMatch | FindBestMatch]] | |||
| <code>handle FindBestMatch(handle query) </code> | |||
| Query the database and return the best result found. If multiple of equal score found, an arbitrary one returns. | |||
|} | |||
=== GlobalSys === | |||
Used to read the command line parameters the game was started with. | |||
''Global accessor variable:'' <code>GlobalSys</code> | |||
==== Methods ==== | |||
{| class="standard-table" style="width: 100%;" | |||
! Function | |||
! Signature | |||
! Description | |||
|- | |||
| [[Destinations/Scripting/API/GlobalSys.CommandLineCheck | CommandLineCheck]] | |||
| <code>bool CommandLineCheck(string name) </code> | |||
| Returns true if the command line param was used, otherwise false. | |||
|- | |||
| [[Destinations/Scripting/API/GlobalSys.CommandLineFloat | CommandLineFloat]] | |||
| <code>float CommandLineFloat(string name) </code> | |||
| Returns the command line param as a float. | |||
|- | |||
| [[Destinations/Scripting/API/GlobalSys.CommandLineInt | CommandLineInt]] | |||
| <code>int CommandLineInt(string name) </code> | |||
| Returns the command line param as an int. | |||
|- | |||
| [[Destinations/Scripting/API/GlobalSys.CommandLineStr | CommandLineStr]] | |||
| <code>string CommandLineStr(string name) </code> | |||
| Returns the command line param as a string. | |||
|} | |||
=== Uint64 === | |||
Integer with binary operations. Used for motion controller button masks. | |||
==== Methods ==== | |||
{| class="standard-table" style="width: 100%;" | |||
! Function | |||
! Signature | |||
! Description | |||
|- | |||
| [[Destinations/Scripting/API/Uint64.BitwiseAnd| BitwiseAnd]] | |||
| <code>int BitwiseAnd(Uint64 ''operand'') </code> | |||
| Performs bitwise AND between two integers. | |||
|- | |||
| [[Destinations/Scripting/API/Uint64.BitwiseOr| BitwiseOr]] | |||
| <code>int BitwiseOr(Uint64 ''operand'') </code> | |||
| Performs bitwise OR between two integers. | |||
|- | |||
| [[Destinations/Scripting/API/Uint64.BitwiseXor| BitwiseXor]] | |||
| <code>int BitwiseXor(Uint64 ''operand'') </code> | |||
| Performs bitwise XOR between two integers. | |||
|- | |||
| [[Destinations/Scripting/API/Uint64.BitwiseNot| BitwiseNot]] | |||
| <code>int BitwiseNot(Uint64 ''operand'') </code> | |||
| Performs bitwise NOT between two integers. | |||
|- | |||
| [[Destinations/Scripting/API/Uint64.ClearBit| ClearBit]] | |||
| <code>int ClearBit(int ''bitvalue'') </code> | |||
| Clears the specified bit. | |||
|- | |||
| [[Destinations/Scripting/API/Uint64.IsBitSet| IsBitSet]] | |||
| <code>bool IsBitSet(int ''bitvalue'') </code> | |||
| Checks if a bit is set. | |||
|- | |||
| [[Destinations/Scripting/API/Uint64.SetBit| SetBit]] | |||
| <code>int SetBit(int ''bitvalue'') </code> | |||
| Sets the specified bit. | |||
|- | |||
| [[Destinations/Scripting/API/Uint64.ToggleBit| ToggleBit]] | |||
| <code>int ToggleBit(int ''bitvalue'') </code> | |||
| Toggles the specified bit. | |||
|- | |||
| [[Destinations/Scripting/API/Uint64.ToHexString| ToHexString]] | |||
| <code>string ToHexString() </code> | |||
| Returns a hexadecimal string representation of the integer. | |||
|} | |||
=== QAngle === | |||
Class for angles. | |||
==== Methods ==== | |||
{| class="standard-table" style="width: 100%;" | |||
! Function | |||
! Signature | |||
! Description | |||
|- | |||
| [[Destinations/Scripting/API/QAngle.constructor | constructor ]] | |||
| <code>QAngle(pitch, yaw, roll) </code> | |||
| Creates a new QAngle. | |||
|- | |||
| [[Destinations/Scripting/API/QAngle.__add | __add]] | |||
| <code>QAngle __add(QAngle a, QAngle b) </code> | |||
| Overloaded +. Adds angles together. {{note|Use RotateOrientation() instead to properly rotate angles.}} | |||
|- | |||
| [[Destinations/Scripting/API/QAngle.__eq | __eq]] | |||
| <code>bool __eq(QAngle a, QAngle b) </code> | |||
| Overloaded ==. Tests for Equality | |||
|- | |||
| [[Destinations/Scripting/API/QAngle.__tostring | __tostring]] | |||
| <code>string __tostring() </code> | |||
| Overloaded .. Converts the QAngle to a human readable string. | |||
|- | |||
| [[Destinations/Scripting/API/QAngle.Forward| Forward]] | |||
| <code>Vector Forward() </code> | |||
| Returns the forward vector. | |||
|- | |||
| [[Destinations/Scripting/API/QAngle.Left| Left]] | |||
| <code>Vector Left() </code> | |||
| Returns the left vector. | |||
|- | |||
| [[Destinations/Scripting/API/QAngle.Up| Up]] | |||
| <code>Vector Up() </code> | |||
| Returns the up vector. | |||
|} | |||
==== Members ==== | |||
{| class="standard-table" style="width: 50%;" | |||
! Variable | |||
! Description | |||
|- | |||
| <code>x </code> | |||
| Pitch angle | |||
|- | |||
| <code>y </code> | |||
| Yaw angle | |||
|- | |||
| <code>z </code> | |||
| Roll angle | |||
|} | |||
=== Quarternion === | |||
Class for quaterinions. | |||
''Global accessor variable:'' None available | |||
{{todo| List of methods doesn't seem to be available.}} | |||
=== Vector === | |||
3D vector class. | |||
==== Methods ==== | |||
{| class="standard-table" style="width: 100%;" | |||
! Function | |||
! Signature | |||
! Description | |||
|- | |||
| [[Destinations/Scripting/API/Vector.constructor | constructor ]] | |||
| <code>Vector(x, y, z) </code> | |||
| Creates a new vector with the specified Cartesian coordinates. | |||
|- | |||
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__add | __add]] | |||
| <code>Vector __add(Vector a, Vector b) </code> | |||
| Overloaded +. Adds vectors together. | |||
|- | |||
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__div | __div]] | |||
| <code>Vector __div(Vector a, Vector b) </code> | |||
| Overloaded /. Divides vectors. | |||
|- | |||
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__eq | __eq]] | |||
| <code>bool __eq(Vector a, Vector b) </code> | |||
| Overloaded ==. Tests for Equality. | |||
|- | |||
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__len | __len]] | |||
| <code>float __len() </code> | |||
| Overloaded # returns the length of the vector. | |||
|- | |||
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__mul | __mul]] | |||
| <code>Vector __mul(Vector a, Vector b) </code> | |||
| Overloaded * returns the vectors multiplied together. can also be used to multiply with scalars. | |||
|- | |||
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__sub | __sub]] | |||
| <code>Vector __sub(Vector a, Vector b) </code> | |||
| Overloaded -. Subtracts vectors | |||
|- | |||
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__tostring | __tostring]] | |||
| <code>string __tostring() </code> | |||
| Overloaded .. Converts vectors to strings | |||
|- | |||
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__unm | __unm]] | |||
| <code>Vector __unm() </code> | |||
| Overloaded unary - operator. Reverses the vector. | |||
|- | |||
| [[Dota 2 Workshop Tools/Scripting/API/Vector.Cross | Cross]] | |||
| <code>Vector Cross(Vector a, Vector b) </code> | |||
| Cross product of two vectors. | |||
|- | |||
| [[Dota 2 Workshop Tools/Scripting/API/Vector.Dot | Dot]] | |||
| <code>float Dot(Vector a, Vector b) </code> | |||
| Dot product of two vectors. | |||
|- | |||
| [[Dota 2 Workshop Tools/Scripting/API/Vector.Length | Length]] | |||
| <code>float Length() </code> | |||
| Length of the Vector. | |||
|- | |||
| [[Dota 2 Workshop Tools/Scripting/API/Vector.Length2D | Length2D]] | |||
| <code>float Length2D() </code> | |||
| Length of the Vector in the XY plane. | |||
|- | |||
| [[Dota 2 Workshop Tools/Scripting/API/Vector.Normalized | Normalized]] | |||
| <code>Vector Normalized() </code> | |||
| Returns the vector normalized. | |||
|} | |||
==== Members ==== | |||
{| class="standard-table" style="width: 50%;" | |||
! Variable | |||
! Description | |||
|- | |||
| <code>x </code> | |||
| X-axis | |||
|- | |||
| <code>y </code> | |||
| Y-axis | |||
|- | |||
| <code>z </code> | |||
| Z-axis | |||
|} | |||
== Enumerations == | |||
{{todo|More undocumented enumerations exist.}} | |||
=== Damage types === | |||
{| class="standard-table" style="width: 50%;" | |||
! Name | |||
! Value | |||
! Description | |||
|- | |||
| DMG_GENERIC | |||
| 0 | |||
| | |||
|- | |||
| DMG_CRUSH | |||
| 1 | |||
| | |||
|- | |||
| DMG_BULLET | |||
| 2 | |||
| | |||
|- | |||
| DMG_SLASH | |||
| 4 | |||
| | |||
|- | |||
| DMG_BURN | |||
| 8 | |||
| | |||
|- | |||
| DMG_BLAST | |||
| 64 | |||
| | |||
|- | |||
| DMG_SHOCK | |||
| 256 | |||
| | |||
|} | |||
=== Motion controller buttons === | |||
{| class="standard-table" style="width: 50%;" | |||
! Name | |||
! Value | |||
! Description | |||
|- | |||
| IN_USE_HAND0 | |||
| 24 | |||
| When the trigger is pressed. | |||
|- | |||
| IN_USE_HAND1 | |||
| 25 | |||
| When the trigger is pressed. | |||
|- | |||
| IN_PAD_LEFT_HAND0 | |||
| 26 | |||
| When the pad is pressed on the left side. | |||
|- | |||
| IN_PAD_RIGHT_HAND0 | |||
| 27 | |||
| When the pad is pressed on the right side. | |||
|- | |||
| IN_PAD_UP_HAND0 | |||
| 28 | |||
| When the pad is pressed on the top. | |||
|- | |||
| IN_PAD_DOWN_HAND0 | |||
| 29 | |||
| When the pad is pressed on the bottom. | |||
|- | |||
| IN_PAD_LEFT_HAND1 | |||
| 30 | |||
| When the pad is pressed on the left side. | |||
|- | |||
| IN_PAD_RIGHT_HAND1 | |||
| 31 | |||
| When the pad is pressed on the right side. | |||
|- | |||
| IN_PAD_UP_HAND1 | |||
| 32 | |||
| When the pad is pressed on the top. | |||
|- | |||
| IN_PAD_DOWN_HAND1 | |||
| 33 | |||
| When the pad is pressed on the bottom. | |||
|- | |||
| IN_MENU_HAND0 | |||
| 34 | |||
| Menu button above the touchpad. | |||
|- | |||
| IN_MENU_HAND1 | |||
| 35 | |||
| Menu button above the touchpad. | |||
|- | |||
| IN_GRIP_HAND0 | |||
| 36 | |||
| Grip. | |||
|- | |||
| IN_GRIP_HAND1 | |||
| 37 | |||
| Grip. | |||
|- | |||
| IN_GRIPANALOG_HAND0 | |||
| | |||
| | |||
|- | |||
| IN_GRIPANALOG_HAND1 | |||
| | |||
| | |||
|- | |- | ||
| | | IN_PAD_HAND0 | ||
| 38 | |||
| | | When the pad is pressed anywhere. | ||
| | |||
|- | |- | ||
| | | IN_PAD_HAND1 | ||
| | | 39 | ||
| | | When the pad is pressed anywhere. | ||
|- | |- | ||
| | | IN_PAD_TOUCH_HAND0 | ||
| | | 40 | ||
| | | When the pad is touched anywhere. | ||
|- | |- | ||
| | | IN_PAD_TOUCH_HAND1 | ||
| | | 41 | ||
| | | When the pad is touched anywhere. | ||
|} | |} | ||
=== ParticleAttachment_t === | === ParticleAttachment_t === | ||
Line 2,336: | Line 2,708: | ||
| PATTACH_ABSORIGIN | | PATTACH_ABSORIGIN | ||
| 0 | | 0 | ||
| | | Spawn on entity origin. | ||
|- | |- | ||
| PATTACH_ABSORIGIN_FOLLOW | | PATTACH_ABSORIGIN_FOLLOW | ||
| 1 | | 1 | ||
| | | Follow the entity origin. | ||
|- | |- | ||
| PATTACH_CUSTOMORIGIN | | PATTACH_CUSTOMORIGIN | ||
Line 2,352: | Line 2,724: | ||
| PATTACH_POINT | | PATTACH_POINT | ||
| 4 | | 4 | ||
| | | Spawn on entity attachment point. | ||
|- | |- | ||
| PATTACH_POINT_FOLLOW | | PATTACH_POINT_FOLLOW | ||
| 5 | | 5 | ||
| | | Follow entity attachment point. | ||
|- | |- | ||
| PATTACH_EYES_FOLLOW | | PATTACH_EYES_FOLLOW | ||
Line 2,368: | Line 2,740: | ||
| PATTACH_WORLDORIGIN | | PATTACH_WORLDORIGIN | ||
| 8 | | 8 | ||
| | | Spawn on map origin. | ||
|- | |- | ||
| PATTACH_ROOTBONE_FOLLOW | | PATTACH_ROOTBONE_FOLLOW |
Revision as of 12:24, 4 February 2017
This is the VScript API for Destinations.
Accessing the Scripting API from Lua
While Lua is dynamically typed, the Source 2 engine is written primarily in C++, which is statically typed. Thus, you'll need to be conscious of your data types when calling the API. (If you try to pass the wrong type to an API function, you'll get an error message in Vconsole telling you what you passed and what it was expecting.)
Global
Global functions. These can be called without any class
Function | Signature | Description |
---|---|---|
AngleDiff | float AngleDiff(float ang1, float ang2)
|
Returns the number of degrees difference between two yaw angles |
AppendToLogFile | void AppendToLogFile(string string_1, string string_2)
|
Appends a string to a log file on the server |
AxisAngleToQuaternion | Quaternion AxisAngleToQuaternion(Vector Vector_1, float float_2)
|
(vector,float) constructs a quaternion representing a rotation by angle around the specified vector axis |
CalcClosestPointOnEntityOBB | Vector CalcClosestPointOnEntityOBB(handle handle_1, Vector Vector_2)
|
Compute the closest point on the OBB of an entity. |
CalcDistanceBetweenEntityOBB | float CalcDistanceBetweenEntityOBB(handle handle_1, handle handle_2)
|
Compute the distance between two entity OBB. A negative return value indicates an input error. A return value of zero indicates that the OBBs are overlapping. |
CancelEntityIOEvents | void CancelEntityIOEvents(ehandle ehandle_1)
|
Create all I/O events for a particular entity |
CreateDamageInfo | DamageInfo CreateDamageInfo (handle, hInflictor, handlehAttacker,Vector force, Vector hitPos, float flDamage, int damageTypes)
|
Allocate a DamageInfo object, used as an argument to CBaseEntity::TakeDamage(). Call DestroyDamageInfo( hInfo ) to free the object. |
CreateEffect | bool CreateEffect(handle handle_1)
|
Pass table - Inputs: entity, effect |
CreateTrigger | handle CreateTrigger(Vector Vector_1, Vector Vector_2, Vector Vector_3)
|
CreateTrigger( vecMin, vecMax ) : Creates and returns an AABB trigger |
CreateTriggerRadiusApproximate | handle CreateTriggerRadiusApproximate(Vector Vector_1, float float_2)
|
CreateTriggerRadiusApproximate( vecOrigin, flRadius ) : Creates and returns an AABB trigger thats bigger than the radius provided |
cvar_getf | float cvar_getf(string string_1)
|
Gets the value of the given cvar, as a float. |
cvar_setf | bool cvar_setf(string string_1, float float_2)
|
Sets the value of the given cvar, as a float. |
DebugBreak | void DebugBreak()
|
Breaks in the debugger |
DebugDrawBox | void DebugDrawBox(Vector origin, Vector min, Vector max, int r, int g, int b, int a, float duration)
|
Draw a debug overlay box |
DebugDrawBoxDirection | void DebugDrawBoxDirection(Vector Vector_1, Vector Vector_2, Vector Vector_3, Vector Vector_4, Vector Vector_5, float float_6, float float_7)
|
Draw a debug forward box (cent, min, max, forward, vRgb, a, duration) |
DebugDrawCircle | void DebugDrawCircle(Vector Vector_1, Vector Vector_2, float float_3, float float_4, bool bool_5, float float_6)
|
Draw a debug circle (center, vRgb, a, rad, ztest, duration) |
DebugDrawClear | void DebugDrawClear()
|
Try to clear all the debug overlay info |
DebugDrawLine | void DebugDrawLine(Vector Vector_1, Vector Vector_2, int int_3, int int_4, int int_5, bool bool_6, float float_7)
|
Draw a debug overlay line (origin, target, r, g, b, ztest, duration) |
DebugDrawLine_vCol | void DebugDrawLine_vCol(Vector Vector_1, Vector Vector_2, Vector Vector_3, bool bool_4, float float_5)
|
Draw a debug line using color vec (start, end, vRgb, a, ztest, duration) |
DebugDrawScreenTextLine | void DebugDrawScreenTextLine(float float_1, float float_2, int int_3, string string_4, int int_5, int int_6, int int_7, int int_8, float float_9)
|
Draw text with a line offset (x, y, lineOffset, text, r, g, b, a, duration) |
DebugDrawSphere | void DebugDrawSphere(Vector Vector_1, Vector Vector_2, float float_3, float float_4, bool bool_5, float float_6)
|
Draw a debug sphere (center, vRgb, a, rad, ztest, duration) |
DebugDrawText | void DebugDrawText(Vector Vector_1, string string_2, bool bool_3, float float_4)
|
Draw text in 3d (origin, text, bViewCheck, duration) |
DebugScreenTextPretty | void DebugScreenTextPretty(float float_1, float float_2, int int_3, string string_4, int int_5, int int_6, int int_7, int int_8, float float_9, string string_10, int int_11, bool bool_12)
|
Draw pretty debug text (x, y, lineOffset, text, r, g, b, a, duration, font, size, bBold) |
DestroyDamageInfo | void DestroyDamageInfo(damageinfo)
|
Free a damageinfo object that was created with CreateDamageInfo(). |
DoEntFire | void DoEntFire(string string_1, string string_2, string string_3, float float_4, handle handle_5, handle handle_6)
|
EntFire: Generate an entity i/o event ( szTarget, szAction, szValue, flDelay, hActivator, hCaller ) |
DoEntFireByInstanceHandle | void DoEntFireByInstanceHandle(handle handle_1, string string_2, string string_3, float float_4, handle handle_5, handle handle_6)
|
EntFireByHandle:Generate and entity i/o event |
DoIncludeScript | bool DoIncludeScript(string string_1, handle handle_2)
|
Execute a script (internal) |
DoScriptAssert | void DoScriptAssert(bool bool_1, string string_2)
|
ScriptAssert:Asserts the passed in value. Prints out a message and brings up the assert dialog. |
DoUniqueString | string DoUniqueString(string string_1)
|
UniqueString:Generate a string guaranteed to be unique across the life of the script VM, with an optional root string. Useful for adding data to table's when not sure what keys are already in use in that table. |
EmitGlobalSound | void EmitGlobalSound(string soundName)
|
Play named sound for all players. |
EmitSoundOn | void EmitSoundOn(string string_1, handle handle_2)
|
Play named sound on Entity |
EmitSoundOnClient | void EmitSoundOnClient(string string_1, handle handle_2)
|
Play named sound only on the client for the passed in player |
EntIndexToHScript | handle EntIndexToHScript(int int_1)
|
Turn an entity index integer to an HScript representing that entity's script instance. |
ExponentialDecay | float ExponentialDecay(float float_1, float float_2, float float_3)
|
Smooth curve decreasing slower as it approaches zero |
FileToString | string FileToString(string a)
|
Reads a string from a file to send to script |
FireEntityIOInputNameOnly | void FireEntityIOInputNameOnly(ehandle ehandle_1, string string_2)
|
Fire Entity's Action Input w/no data |
FireEntityIOInputString | void FireEntityIOInputString(ehandle ehandle_1, string string_2, string string_3)
|
Fire Entity's Action Input with passed String - you own the memory |
FireEntityIOInputVec | void FireEntityIOInputVec(ehandle ehandle_1, string string_2, Vector Vector_3)
|
Fire Entity's Action Input with passed Vector ( hEntity, szActionName, vector ) |
FireGameEvent | void FireGameEvent(string eventName, handle parameterTable)
|
Fire a pre-defined event, which can be found either in custom_events.txt or in dota's resource/*.res |
FireGameEventLocal | void FireGameEventLocal(string string_1, handle handle_2)
|
Fire a game event without broadcasting to the client. |
FrameTime | float FrameTime()
|
Get the time spent on the server in the last frame |
GetFrameCount | int GetFrameCount()
|
Returns the engines current frame count |
GetListenServerHost | handle GetListenServerHost()
|
Get the local player on a listen server. |
GetMapName | string GetMapName()
|
Get the name of the map. |
GetMaxOutputDelay | float GetMaxOutputDelay(ehandle ehandle_1, string string_2)
|
Get the longest delay for all events attached to an output |
GetPhysAngularVelocity | Vector GetPhysAngularVelocity(handle handle_1)
|
Get Angular Velocity for VPHYS or normal object |
GetPhysVelocity | Vector GetPhysVelocity(handle handle_1)
|
Get Velocity for VPHYS or normal object |
GetPlayerFromUserID | CBasePlayer GetPlayerFromUserID(int userID)
|
Given a user ID, return the script handle for the entity, or nil. |
InitLogFile | void InitLogFile(string string_1, string string_2)
|
If the given file doesn't exist, creates it with the given contents; does nothing if it exists |
IsClient | bool IsClient()
|
Returns true if this is lua running from the client.dll. |
IsDedicatedServer | bool IsDedicatedServer()
|
Returns true if this server is a dedicated server. |
IsMarkedForDeletion | bool IsMarkedForDeletion(handle handle_1)
|
Returns true if the entity is valid and marked for deletion. |
IsServer | bool IsServer()
|
Returns true if this is lua running from the server.dll. |
IsValidEntity | bool IsValidEntity(handle handle_1)
|
Checks to see if the given hScript is a valid entity |
IsInToolsMode | bool IsInToolsMode()
|
Returns true if this is lua running from the dota2 workshop tools. |
IsInVRMode | bool IsInVRMode()
|
Checks if the game is running in VR mode. |
ListenToGameEvent | int ListenToGameEvent(string EventName, handle functionNameToCall, handle context)
|
Register as a listener for a game event from script. |
LoadKeyValues | table LoadKeyValues(string string_1)
|
Creates a table from the specified keyvalues text file |
LoadKeyValuesFromString | table LoadKeyValuesFromString(string string_1)
|
Creates a table from the specified keyvalues string |
MakeStringToken | int MakeStringToken(string string_1)
|
Checks to see if the given hScript is a valid entity |
Msg | void Msg(string string_1)
|
Print a message |
PlayerInstanceFromIndex | handle PlayerInstanceFromIndex(int int_1)
|
Get a script instance of a player by index. |
PrecacheEntityFromTable | void PrecacheEntityFromTable(string string_1, handle handle_2, handle handle_3)
|
Precache an entity from KeyValues in table |
PrecacheEntityListFromTable | void PrecacheEntityListFromTable(handle handle_1, handle handle_2)
|
Precache a list of entity KeyValues table's |
PrecacheModel | void PrecacheModel(string modelName, handle context)
|
Manually precache a single model. |
PrecacheModelFolder | void PrecacheModelFolder(string folderName, handle context)
|
Recursively precache models within a folder. |
PrecacheParticle | void PrecacheParticle(string particleName, handle context)
|
Manually precache a single particle. |
PrecacheParticleFolder | void PrecacheParticleFolder( string folderName, handle context)
|
Recursively precache particles within a folder |
PrecacheSoundFile | void PrecacheSoundFile(string soundFileName, handle context)
|
Manually precache a single sound file |
PrintLinkedConsoleMessage | void PrintLinkedConsoleMessage(string string_1, string string_2)
|
Print a console message with a linked console command |
RandomFloat | float RandomFloat(float float_1, float float_2)
|
Get a random float within a range |
RandomInt | int RandomInt(int int_1, int int_2)
|
Get a random int within a range |
RegisterSpawnGroupFilterProxy | void RegisterSpawnGroupFilterProxy(string string_1)
|
Create a C proxy for a script-based spawn group filter |
ReloadMOTD | void ReloadMOTD()
|
Reloads the MotD file |
RemoveSpawnGroupFilterProxy | void RemoveSpawnGroupFilterProxy(string string_1)
|
Remove the C proxy for a script-based spawn group filter |
RotateOrientation | QAngle RotateOrientation(QAngle QAngle_1, QAngle QAngle_2)
|
Rotate a QAngle by another QAngle. |
RotatePosition | Vector RotatePosition(Vector Vector_1, QAngle QAngle_2, Vector Vector_3)
|
Rotate a Vector around a point. |
RotateQuaternionByAxisAngle | Quaternion RotateQuaternionByAxisAngle(Quaternion Quaternion_1, Vector Vector_2, float float_3)
|
Rotates a quaternion by the specified angle around the specified vector axis |
RotationDelta | QAngle RotationDelta(Qangle angle1, Qangle angle2,)
|
Find the delta between two QAngles. |
RotationDeltaAsAngularVelocity | Vector RotationDeltaAsAngularVelocity(Qangle angle1, Qangle angle2,)
|
converts delta QAngle to an angular velocity Vector. |
rr_AddDecisionRule | bool rr_AddDecisionRule(handle handle_1)
|
Add a rule to the decision database. |
rr_CommitAIResponse | bool rr_CommitAIResponse(handle handle_1, handle handle_2)
|
Commit the result of QueryBestResponse back to the given entity to play. Call with params (entity, airesponse) |
rr_GetResponseTargets | handle rr_GetResponseTargets()
|
Retrieve a table of all available expresser targets, in the form { name : handle, name: handle }. |
rr_QueryBestResponse | bool rr_QueryBestResponse(handle handle_1, handle handle_2, handle handle_3)
|
Params: ( hEnt, hQuery, hResult ) // Static : tests 'query' against entity's response system and returns the best response found (or nil if none found). |
Say | void Say(handle entity, string message, bool teamOnly)
|
Have Entity say string, and teamOnly or not |
ScreenShake | void ScreenShake(Vector Vector_1, float float_2, float float_3, float float_4, float float_5, int int_6, bool bool_7)
|
Start a screenshake with the following parameters. vecCenter, flAmplitude, flFrequency, flDuration, flRadius, eCommand( SHAKE_START = 0, SHAKE_STOP = 1 ), bAirShake |
SendToConsole | void SendToConsole(string string_1)
|
Send a string to the console as a client command |
SendToServerConsole | void SendToServerConsole(string string_1)
|
Send a string to the console as a server command |
SetOpvarFloatAll | void SetOpvarFloatAll(string string_1, string string_2, string string_3, float float_4)
|
Sets an opvar value for all players |
SetOpvarFloatPlayer | void SetOpvarFloatPlayer(string string_1, string string_2, string string_3, float float_4, handle handle_5)
|
Sets an opvar value for a single player ( szStackName, szOperatorName, szOpvarName, flOpvarValue, hEnt ) |
SetQuestName | void SetQuestName(string string_1)
|
Set the current quest name. |
SetQuestPhase | void SetQuestPhase(int int_1)
|
Set the current quest phase. |
SetRenderingEnabled | void SetRenderingEnabled(ehandle ehandle_1, bool bool_2)
|
Set rendering on/off for an ehandle |
ShowMessage | void ShowMessage(string string_1)
|
Print a hud message on all clients |
SpawnEntityFromTableSynchronous | handle SpawnEntityFromTableSynchronous(string string_1, handle handle_2)
|
Synchronously spawns a single entity from a table |
SpawnEntityGroupFromTable | bool SpawnEntityGroupFromTable(handle groupSpawnTables, bool bAsync, handle hCallback)
|
Hierarchically spawn an entity group from a set of spawn tables. |
SpawnEntityListFromTableAsynchronous | int SpawnEntityListFromTableAsynchronous(handle handle_1, handle handle_2)
|
Asynchronously spawn an entity group from a list of spawn table's. A callback will be triggered when the spawning is complete |
SpawnEntityListFromTableSynchronous | handle SpawnEntityListFromTableSynchronous(handle handle_1)
|
Synchronously spawn an entity group from a list of spawn table's. |
SplineQuaternions | Quaternion SplineQuaternions(Quaternion Quaternion_1, Quaternion Quaternion_2, float float_3)
|
(quaternion,quaternion,float) very basic interpolation of v0 to v1 over t on [0,1] |
SplineVectors | Vector SplineVectors(Vector Vector_1, Vector Vector_2, float float_3)
|
(vector,vector,float) very basic interpolation of v0 to v1 over t on [0,1] |
StartSoundEvent | void StartSoundEvent(string string_1, handle handle_2)
|
Start a sound event |
StartSoundEventFromPosition | void StartSoundEventFromPosition(string string_1, Vector Vector_2)
|
Start a sound event from position |
StartSoundEventFromPositionReliable | void StartSoundEventFromPositionReliable(string string_1, Vector Vector_2)
|
Start a sound event from position with reliable delivery |
StartSoundEventFromPositionUnreliable | void StartSoundEventFromPositionUnreliable(string string_1, Vector Vector_2)
|
Start a sound event from position with optional delivery |
StartSoundEventReliable | void StartSoundEventReliable(string string_1, handle handle_2)
|
Start a sound event with reliable delivery |
StartSoundEventUnreliable | void StartSoundEventUnreliable(string string_1, handle handle_2)
|
Start a sound event with optional delivery |
StopEffect | void StopEffect(handle handle_1, string string_2)
|
(hEntity, szEffectName) |
StopGlobalSound | void StopGlobalSound(string soundName)
|
Stop named sound for all players. |
StopListeningToAllGameEvents | void StopListeningToAllGameEvents(handle handle_1)
|
Stop listening to all game events within a specific context. |
StopListeningToGameEvent | bool StopListeningToGameEvent(int int_1)
|
Stop listening to a particular game event. |
StopSoundEvent | void StopSoundEvent(string string_1, handle handle_2)
|
Stops a sound event |
StopSoundOn | void StopSoundOn(string soundName, handle playingEntity)
|
Stop named sound on Entity |
StringToFile | bool StringToFile(string a, string b)
|
* Directory traversal doesn't seem to work. The characters '.', '/' and '\\' are ignored. |
Time | float Time()
|
Get the current server time |
TraceCollideable | bool TraceCollideable(table parameters)
|
Does a raytrace against a single entity. Input and output parameters are stored in the specified table. |
TraceHull | bool TraceHull(table parameters)
|
Traces a bounding box along a line. Input and output parameters are stored in the specified table. |
TraceLine | bool TraceLine(table parameters)
|
Does a raytrace along a line. Input and output parameters are stored in the specified table. |
UnloadSpawnGroup | void UnloadSpawnGroup(string string_1)
|
Unload a spawn group by name |
UnloadSpawnGroupByHandle | void UnloadSpawnGroupByHandle(int int_1)
|
Unload a spawn group by handle |
UpdateEventPoints | void UpdateEventPoints(handle handle_1)
|
No Description Set |
UTIL_MessageText | void UTIL_MessageText(int playerId, string message, int r, int g, int b, int a)
|
Displays a message for a specific player |
UTIL_MessageText_WithContext | void UTIL_MessageText_WithContext(int playerId, string message, int r, int g, int b, int a, table context)
|
Sends a message to a specific player in the message box with a context table |
UTIL_MessageTextAll | void UTIL_MessageTextAll(string message, int r, int g, int b, int a)
|
Sends a message to everyone in the message box |
UTIL_MessageTextAll_WithContext | void UTIL_MessageTextAll_WithContext(string message, int r, int g, int b, int a, table context)
|
Sends a message to everyone in the message box with a context table |
UTIL_Remove | void UTIL_Remove(handle handle_1)
|
Removes the specified entity |
UTIL_RemoveImmediate | void UTIL_RemoveImmediate(handle handle_1)
|
Do Not use this function. Use UTIL_Remove() instead. This will crash your game. |
UTIL_ResetMessageText | void UTIL_ResetMessageText(int playerId)
|
Resets the message text for the player |
UTIL_ResetMessageTextAll | void UTIL_ResetMessageTextAll()
|
Resets the message text for all players |
VectorToAngles | QAngle VectorToAngles(Vector Vector_1)
|
Get Qangles (with no roll) for a Vector. |
Warning | void Warning(string string_1)
|
Print a warning |
Classes
CBaseEntity
The base class for entities.
Methods
Function | Signature | Description |
---|---|---|
AddEffects | void AddEffects(int nFlags)
|
AddEffects( int ): Adds the render effect flag. |
ApplyAbsVelocityImpulse | void ApplyAbsVelocityImpulse(Vector vecImpulse)
|
Apply a Velocity Impulse |
ApplyLocalAngularVelocityImpulse | void ApplyLocalAngularVelocityImpulse(Vector angImpulse)
|
Apply an Ang Velocity Impulse |
Attribute_GetFloatValue | float Attribute_GetFloatValue(string pName, float flDefault)
|
Get float value for an entity attribute. |
Attribute_GetIntValue | float Attribute_GetIntValue(string pName, int nDefault)
|
Get int value for an entity attribute. |
Attribute_SetFloatValue | void Attribute_SetFloatValue(string pName, float flValue)
|
Set float value for an entity attribute. |
Attribute_SetIntValue | void Attribute_SetIntValue(string pName, int nValue)
|
Set int value for an entity attribute. |
DeleteAttribute | void DeleteAttribute(string pName)
|
Delete an entity attribute. |
EmitSound | void EmitSound(string soundName)
|
|
EmitSoundParams | void EmitSoundParams(string soundName, int pitch, float volume, float soundTime)
|
Plays/modifies a sound from this entity. changes sound if Pitch and/or Volume or SoundTime is > 0. |
EyeAngles | QAngle EyeAngles()
|
Get the qangles that this entity is looking at. |
EyePosition | Vector EyePosition()
|
Get vector to eye position - absolute coords |
FirstMoveChild | handle FirstMoveChild()
|
No Description Set |
FollowEntity | void FollowEntity(handle hEntity, bool bBoneMerge)
|
hEntity to follow, bool bBoneMerge |
GatherCriteria | void GatherCriteria(handle hResult)
|
Returns a table containing the criteria that would be used for response queries on this entity. This is the same as the table that is passed to response rule script function callbacks. |
GetAbsOrigin | Vector GetAbsOrigin()
|
No Description Set |
GetAngles | QAngle GetAngles()
|
No Description Set |
GetAnglesAsVector | Vector GetAnglesAsVector()
|
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 |
GetBoundingMins | Vector GetBoundingMins()
|
Get a vector containing min bounds, centered on object |
GetBounds | table GetBounds()
|
Get a table containing the 'Mins' & 'Maxs' vector bounds, centered on object |
GetCenter | Vector GetCenter()
|
Get vector to center of object - absolute coords |
GetChildren | handle GetChildren()
|
Get the entities parented to this entity. |
GetContext | table GetContext(string name)
|
GetContext( name ): looks up a context and returns it if available. May return string, float, or nil (if the context isn't found) |
GetForwardVector | Vector GetForwardVector()
|
Get the forward vector of the entity |
GetHealth | int GetHealth()
|
No Description Set |
GetLocalAngularVelocity | QAngle GetLocalAngularVelocity()
|
Maybe local angvel |
GetLocalAngles | QAngle GetLocalAngles()
|
Get entity local pitch, yaw, roll as a QAngle. |
GetLocalOrigin | Vector GetLocalOrigin()
|
Get entity local origin as a Vector. |
GetLocalVelocity | Vector GetLocalVelocity()
|
Get Entity relative velocity |
GetMaxHealth | int GetMaxHealth()
|
No Description Set |
GetModelName | string GetModelName()
|
Returns the name of the model |
GetMoveParent | handle GetMoveParent()
|
If in hierarchy, retrieves the entity's parent |
GetOrigin | Vector GetOrigin()
|
No Description Set |
GetOwner | handle GetOwner()
|
Gets this entity's owner |
GetOwnerEntity | handle GetOwnerEntity()
|
Get the owner entity, if there is one |
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 |
GetSoundDuration | float GetSoundDuration(string soundName, string actormodelname)
|
Returns float duration of the sound. Takes soundname and optional actormodelname. |
GetTeam | int GetTeam()
|
No Description Set |
GetTeamNumber | int GetTeamNumber()
|
Get the team number of this entity. |
GetUpVector | Vector GetUpVector()
|
Get the up vector of the entity |
GetVelocity | Vector GetVelocity()
|
No Description Set |
HasAttribute | bool HasAttribute(string pName)
|
See if an entity has a particular attribute. |
IsAlive | bool IsAlive()
|
No Description Set. |
IsNPC | bool IsNPC()
|
Is this entity an CAI_BaseNPC? |
IsNull | bool IsNull()
|
Detect entity has been deleted from C++ |
IsPlayer | bool IsPlayer()
|
Is this a player entity? |
Kill | void Kill()
|
No Description Set |
NextMovePeer | handle NextMovePeer()
|
No Description Set |
OverrideFriction | void OverrideFriction(float duration, float friction)
|
Takes duration, value for a temporary override |
PrecacheScriptSound | void PrecacheScriptSound(string soundname)
|
Precache a sound for later playing. |
RemoveEffects | void RemoveEffects(int nFlags)
|
RemoveEffects( int ): Removes the render effect flag. |
SetAbsOrigin | void SetAbsOrigin(Vector origin)
|
SetAbsOrigin |
SetAngles | void SetAngles(float pitch, float yaw, float roll)
|
Set entity pitch, yaw, roll |
SetAngularVelocity | void SetAngularVelocity(float pitch, float yaw, float roll)
|
Set the local angular velocity - takes float pitch,yaw,roll velocities |
SetConstraint | void SetConstraint(Vector vPos)
|
Set the position of the constraint. |
SetContext | void SetContext(string pName, string pValue, float duration)
|
SetContext( name , value, duration ): store any key/value pair in this entity's dialog contexts. Value must be a string. Will last for duration (set 0 to mean 'forever'). |
SetContextNum | void SetContextNum(string pName, float fValue, float duration)
|
SetContext( name , value, duration ): store any key/value pair in this entity's dialog contexts. Value must be a number (int or float). Will last for duration (set 0 to mean 'forever'). |
SetContextThink | void SetContextThink(string pszContextName, handle hThinkFunc, float flInterval)
|
Set a think function on this entity. |
SetEntityName | void SetEntityName(string pName)
|
Set the name (targetname) of an entity. |
SetForwardVector | void SetForwardVector(Vector forwardVec)
|
Set the orientation of the entity to have this forward forwardVec |
SetFriction | void SetFriction(float flFriction)
|
Set PLAYER friction, ignored for objects |
SetGravity | void SetGravity(float flGravity)
|
Set PLAYER gravity, ignored for objects |
SetHealth | void SetHealth(int hp)
|
No Description Set |
SetLocalAngles | void SetLocalAngles(float pitch, float yaw, float roll)
|
Set entity local pitch, yaw, roll by component. |
SetLocalOrigin | void SetLocalOrigin(Vector origin)
|
Set entity local origin from a Vector. |
SetMaxHealth | void SetMaxHealth(int maxHP)
|
No Description Set |
SetOrigin | void SetOrigin(Vector origin)
|
No Description Set |
SetOwner | void SetOwner(handle owningEntity)
|
Sets this entity's owner |
SetParent | void SetParent(handle hParent, string pAttachmentname)
|
Set the parent for this entity. |
SetTeam | void SetTeam(int team)
|
No Description Set |
SetVelocity | void SetVelocity(Vector vecVelocity)
|
No Description Set |
StopSound | void StopSound(string soundName)
|
Stops a named sound playing from this entity. |
TakeDamage | int TakeDamage(damageinfo hInfo)
|
Apply damage to this entity. Use CreateDamageInfo() to create a damageinfo object. |
Trigger | void Trigger()
|
Fires off this entity's OnTrigger responses |
Hooks
Adding a function with this signature to the script causes it to be called from code at the appropriate moment.
Function | Signature | Description |
---|---|---|
Precache | void Precache(CScriptPrecacheContext context)
|
Called when the entity is precached. Used to precache any additional resources needed by the script using the global Precache functions. |
CEntityInstance
- extends CBaseEntity
All entities inherit from this.
Methods
Function | Signature | Description |
---|---|---|
ConnectOutput | void ConnectOutput(string string_1, string string_2)
|
Adds an I/O connection that will call the named function on this entity when the specified output fires. |
Destroy | void Destroy()
|
No Description Set |
DisconnectOutput | void DisconnectOutput(string string_1, string string_2)
|
Removes a connected script function from an I/O event on this entity. |
DisconnectRedirectedOutput | void DisconnectRedirectedOutput(string string_1, string string_2, handle handle_3)
|
Removes a connected script function from an I/O event on the passed entity. |
entindex | int entindex()
|
No Description Set |
FireOutput | void FireOutput(string outputName, handle activator, handle caller, table args, float delay)
|
Fire an entity output |
GetClassname | string GetClassname()
|
No Description Set |
GetDebugName | string GetDebugName()
|
Get the entity name w/help if not defined (i.e. classname/etc) |
GetEntityHandle | ehandle GetEntityHandle()
|
Get the entity as an EHANDLE |
GetEntityIndex | int GetEntityIndex()
|
No Description Set |
GetIntAttr | int GetIntAttr(string string_1)
|
Get Integer Attribute |
GetName | string GetName()
|
No Description Set |
GetOrCreatePrivateScriptScope | handle GetOrCreatePrivateScriptScope()
|
Retrieve, creating if necessary, the private per-instance script-side data associated with an entity |
GetOrCreatePublicScriptScope | handle GetOrCreatePublicScriptScope()
|
Retrieve, creating if necessary, the public script-side data associated with an entity |
GetPrivateScriptScope | handle GetPrivateScriptScope()
|
Retrieve the private per-instance script-side data associated with an entity |
GetPublicScriptScope | handle GetPublicScriptScope()
|
Retrieve the public script-side data associated with an entity |
RedirectOutput | void RedirectOutput(string string_1, string string_2, handle handle_3)
|
Adds an I/O connection that will call the named function on the passed entity when the specified output fires. |
RemoveSelf | void RemoveSelf()
|
Delete this entity |
SetIntAttr | void SetIntAttr(string string_1, int int_2)
|
Set Integer Attribute |
CBaseModelEntity
- extends CBaseEntity
Entities with models inherit from this.
Methods
Function | Signature | Description |
---|---|---|
GetRenderAlpha | int GetRenderAlpha()
|
Get the alpha modulation of this entity. |
SetLightGroup | void SetLightGroup(string pLightGroup)
|
Sets the light group of the entity. |
SetModel | void SetModel(string pModelName)
|
Changes the model of the entity. Make sure the new model is precached before using. |
SetRenderAlpha | void SetRenderAlpha(int nAlpha)
|
Set the alpha modulation of this entity. |
SetRenderColor | void SetRenderColor(int red, int green, int blue)
|
Sets the render color of the entity. |
SetRenderMode | void SetRenderMode(int nMode)
|
Sets the render mode of the entity. |
SetSize | void SetSize(Vector mins, Vector maxs)
|
CBasePlayer
Entity class for players.
Methods
Function | Signature | Description |
---|---|---|
EquipPropTool | void EquipPropTool(CDestinationsPropTool propTool, int handId)
|
Equips the prop tool passed in the hand specified. |
GetHMDAnchor | handle GetHMDAnchor()
|
Returns the HMD anchor entity for this player if it exists. |
GetHMDAvatar | CPropHMDAvatar GetHMDAvatar()
|
Returns the HMD Avatar entity for this player if it exists. |
GetUserID | int GetUserID()
|
Returns the player's user ID. |
IsNoclipping | bool IsNoclipping()
|
Returns true if the player is in noclip mode. |
IsUsePressed | bool IsUsePressed()
|
Returns true if the use key is pressed. |
IsVRControllerButtonPressed | bool IsVRControllerButtonPressed(int nButton)
|
Returns true if the controller button is pressed. |
Quit | void Quit()
|
Quit the game from script. |
CBaseAnimating
- extends CBaseEntity
A class containing methods involved in animations. Most model based entities inherit this.
Methods
Function | Signature | Description |
---|---|---|
GetAttachmentAngles | Vector GetAttachmentAngles(int iAttachment)
|
Get the attachment id's angles as a p,y,r vector |
GetAttachmentOrigin | Vector GetAttachmentOrigin(int iAttachment)
|
Get the attachment id's origin vector |
GetModelScale | float GetModelScale()
|
Get scale of entity's model. |
IsSequenceFinished | bool IsSequenceFinished()
|
Ask whether the main sequence is done playing |
ScriptLookupAttachment | int ScriptLookupAttachment(string pAttachmentName)
|
Get the named attachment id |
SetBodygroup | void SetBodygroup(int iGroup, int iValue)
|
Sets a bodygroup by index. |
SetBodygroupByName | void SetBodygroupByName(int iGroup, int iValue)
|
Sets a bodygroup by name. |
SetModelScale | void SetModelScale(float scale)
|
Sets the model's scale to scale, so if a unit had its model scale at 1, and you use SetModelScale(10.0), it would set the scale to 10.0. |
SetPoseParameter | float SetPoseParameter(string szName, float fValue)
|
Set the specified pose parameter to the specified value |
CBaseFlex
- extends CBaseAnimating
Animated entities that have vertex flex capability.
Methods
Function | Signature | Description |
---|---|---|
GetCurrentScene | handle GetCurrentScene()
|
Returns the instance of the oldest active scene entity (if any). |
GetSceneByIndex | handle GetSceneByIndex(int index)
|
Returns the instance of the scene entity at the specified index. |
ScriptPlayScene | float ScriptPlayScene(string pszSceneFile, float flDelay)
|
Play the specified .vcd file. |
CBaseCombatCharacter
No Description Set
Function | Signature | Description |
---|---|---|
GetEquippedWeapons | table GetEquippedWeapons()
|
Returns an array of all the equipped weapons |
GetFaction | int GetFaction()
|
Get the combat character faction. |
GetWeaponCount | int GetWeaponCount()
|
Gets the number of weapons currently equipped |
ShootPosition | Vector ShootPosition(int nHand)
|
Returns the shoot position eyes (or hand in VR). |
CBodyComponent
No Description Set
Methods
Function | Signature | Description |
---|---|---|
AddImpulseAtPosition | void AddImpulseAtPosition(Vector Vector_1, Vector Vector_2)
|
Apply an impulse at a worldspace position to the physics |
AddVelocity | void AddVelocity(Vector Vector_1, Vector Vector_2)
|
Add linear and angular velocity to the physics object |
DetachFromParent | void DetachFromParent()
|
Detach from its parent |
GetSequence | <unknown> GetSequence()
|
Returns the active sequence |
IsAttachedToParent | bool IsAttachedToParent()
|
Is attached to parent |
LookupSequence | <unknown> LookupSequence(string string_1)
|
Returns a sequence id given a name |
SequenceDuration | float SequenceDuration(string string_1)
|
Returns the duration in seconds of the specified sequence |
SetAngularVelocity | void SetAngularVelocity(Vector Vector_1)
|
No Description Set |
SetAnimation | void SetAnimation(string string_1)
|
Pass string for the animation to play on this model |
SetBodyGroup | void SetBodyGroup(string string_1)
|
No Description Set |
SetMaterialGroup | void SetMaterialGroup(utlstringtoken utlstringtoken_1)
|
No Description Set |
SetVelocity | void SetVelocity(Vector velocity)
|
No Description Set |
CEntities
Provides methods to enumerate all server-side entities.
Global accessor variable: Entities
Methods
Function | Signature | Description |
---|---|---|
CreateByClassname | handle CreateByClassname(string className)
|
Creates an entity by class name. |
FindAllByClassname | table FindAllByClassname(string string_1)
|
Finds all entities by class name. Returns an array containing all the found entities. |
FindAllByClassnameWithin | table FindAllByClassnameWithin(string string_1, Vector Vector_2, float float_3)
|
Find entities by class name within a radius. |
FindAllByModel | table FindAllByModel(string modelName)
|
Find entities by model name. |
FindAllByName | table FindAllByName(string name)
|
Find all entities by name. Returns an array containing all the found entities in it. |
FindAllByNameWithin | table FindAllByNameWithin(string name, Vector origin, float maxRadius)
|
Find entities by name within a radius. |
FindAllByTarget | table FindAllByTarget(string targetName)
|
Find entities by targetname. |
FindAllInSphere | table FindAllInSphere(Vector origin, float maxRadius)
|
Find entities within a radius. |
FindByClassname | handle FindByClassname(handle startFrom, string className)
|
Find entities by class name. Pass nil to start an iteration, or reference to a previously found entity to continue a search |
FindByClassnameNearest | handle FindByClassnameNearest(string className, Vector origin, float maxRadius)
|
Find entities by class name nearest to a point. |
FindByClassnameWithin | handle FindByClassnameWithin(handle startFrom, string className, Vector origin, float maxRadius)
|
Find entities by class name within a radius. Pass nil to start an iteration, or reference to a previously found entity to continue a search |
FindByModel | handle FindByModel(handle startFrom, string modelName)
|
Find entities by model name. Pass nil to start an iteration, or reference to a previously found entity to continue a search |
FindByModelWithin | handle FindByModelWithin(handle startFrom, string modelName, Vector origin, float maxRadius)
|
Find entities by model name within a radius. Pass nil to start an iteration, or reference to a previously found entity to continue a search |
FindByName | handle FindByName(handle lastEnt, string searchString)
|
Find entities by name. Pass nil to start an iteration, or reference to a previously found entity to continue a search |
FindByNameNearest | handle FindByNameNearest(string name, Vector origin, float maxRadius)
|
Find entities by name nearest to a point. |
FindByNameWithin | handle FindByNameWithin(handle startFrom, string name, Vector origin, float maxRadius)
|
Find entities by name within a radius. Pass nil to start an iteration, or reference to a previously found entity to continue a search |
FindByTarget | handle FindByTarget(handle startFrom, string targetName)
|
Find entities by targetname. Pass nil to start an iteration, or reference to a previously found entity to continue a search |
FindInSphere | handle FindInSphere(handle startFrom, Vector origin, float maxRadius)
|
Find entities within a radius. Pass nil 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 startFrom)
|
Continue an iteration over the list of entities, providing reference to a previously found entity |
CAI_BaseNPC
No Description Set
Methods
Function | Signature | Description |
---|---|---|
GetSquad | handle GetSquad()
|
Get the squad to which this NPC belongs. |
CBaseTrigger
- extends CBaseEntity
Entity class for triggers.
Methods
Function | Signature | Description |
---|---|---|
Disable | void Disable()
|
Disable the trigger |
Enable | void Enable()
|
Enable the trigger |
IsTouching | bool IsTouching(handle hEnt)
|
Checks whether the passed entity is touching the trigger. |
CDestinationsPropItemPhysics
Entity class for prop_destinations_physics.
Props spawned through the menu use this class.
Methods
Function | Signature | Description |
---|---|---|
DisableUse | void DisableUse()
|
Disable 'use' aka 'picking up' this entity. |
EnableUse | void EnableUse()
|
Enable 'use' aka 'picking up' this entity. |
CDestinationsPropTool
Entity class for prop_destinations_tool.
A generic tool prop that can be picked up by the player. The tool functionality is implemented using scripts. When picked up by the player, attaches to the vr_controller_root
attachment of the model.
Methods
Function | Signature | Description |
---|---|---|
DisableUse | void DisableUse()
|
Disable 'use' aka 'picking up' this entity. |
EnableUse | void EnableUse()
|
Enable 'use' aka 'picking up' this entity. |
Hooks
Adding a function with this signature to the script causes it to be called from code at the appropriate moment.
Function | Signature | Description |
---|---|---|
SetEquipped | bool SetEquipped(handle self,CPropVRHand pHand,int nHandID,handle pHandAttachment,CBasePlayer pPlayer)
|
Called when the player equips the tool. Todo: Effect of the return value
|
SetUnequipped | bool SetUnequipped()
|
Called when the tool is unequipped. |
OnHandleInput | table OnHandleInput(table input)
|
Called every frame with the state of the motion controller inputs. Return the input table with bits toggled off in the members to disable the rest of the game from receiving the inputs. |
CDestinationsQuestGeocache
No Description Set
Methods
Function | Signature | Description |
---|---|---|
DisableCollision | void DisableCollision()
|
Disable physics collision for this entity. |
EnableCollision | void EnableCollision()
|
Enable physics collision for this entity. |
CEnvTimeOfDay2
No Description Set
Methods
Function | Signature | Description |
---|---|---|
GetFloat | float GetFloat(utilstringtoken unknown, float unknown)
|
Lookup dynamic time-of-day float value. |
GetVector | Vector GetVector(utilstringtoken unknown, Vector unknown)
|
Lookup dynamic time-of-day vector value. |
CEnvEntityMaker
- extends CBaseEntity
Entity class for env_entity_maker.
Methods
Function | Signature | Description |
---|---|---|
SpawnEntity | void SpawnEntity()
|
Create an entity at the location of the maker |
SpawnEntityAtEntityOrigin | void SpawnEntityAtEntityOrigin(handle hEntity)
|
Create an entity at the location of a specified entity instance |
SpawnEntityAtLocation | void SpawnEntityAtLocation(Vector vecAlternateOrigin, Vector vecAlternateAngles)
|
Create an entity at a specified location and orientaton, orientation is Euler angle in degrees (pitch, yaw, roll) |
SpawnEntityAtNamedEntityOrigin | void SpawnEntityAtNamedEntityOrigin(string pszName)
|
Create an entity at the location of a named entity |
CEntityScriptFramework
Interface to the C++-side of entity framework
No methods available.
CMarkupVolumeTagged
No Description Set
Methods
Function | Signature | Description |
---|---|---|
HasTag | bool HasTag(string pszTagName)
|
Does this volume have the given tag. |
CScriptPrecacheContext
Container to hold context published to precache functions in script
Methods
Function | Signature | Description |
---|---|---|
AddResource | void AddResource(string string_1)
|
Precaches a specific resource |
GetValue | table GetValue(string string_1)
|
Reads a spawn key |
CScriptKeyValues
Container to hold keyvalues published to spawn functions in script
Methods
Function | Signature | Description |
---|---|---|
GetValue | table GetValue(string string_1)
|
Reads a spawn key |
CNativeOutputs
Container to hold outputs published by script to game
Methods
Function | Signature | Description |
---|---|---|
AddOutput | void AddOutput(string string_1, string string_2)
|
Add an output |
Init | void Init(int int_1)
|
Initialize with number of outputs |
CEnvProjectedTexture
- extends CBaseEntity
Entity class for env_projected_texture.
Methods
Function | Signature | Description |
---|---|---|
SetFarRange | void SetFarRange(float flRange)
|
Set light maximum range |
SetLinearAttenuation | void SetLinearAttenuation(float flAtten)
|
Set light linear attenuation value |
SetNearRange | void SetNearRange(float flRange)
|
Set light minimum range |
SetQuadraticAttenuation | void SetQuadraticAttenuation(float flAtten)
|
Set light quadratic attenuation value |
SetVolumetrics | void SetVolumetrics(bool bOn, float flIntensity, float flNoise, int nPlanes, float flPlaneOffset)
|
Turn on/off light volumetrics: bool bOn, float flIntensity, float flNoise, int nPlanes, float flPlaneOffset |
CInfoData
No Description Set
Methods
Function | Signature | Description |
---|---|---|
QueryColor | Vector QueryColor(utlstringtoken tok, Vector vDefault)
|
Query color data for this key |
QueryFloat | float QueryFloat(utlstringtoken tok, float flDefault)
|
Query float data for this key |
QueryInt | int QueryInt(utlstringtoken tok, int nDefault)
|
Query int data for this key |
QueryNumber | float QueryNumber(utlstringtoken tok, float flDefault)
|
Query number data for this key |
QueryString | string QueryString(utlstringtoken tok, string pDefault)
|
Query string data for this key |
QueryVector | Vector QueryVector(utlstringtoken tok, Vector vDefault)
|
Query vector data for this key |
CPhysicsProp
Entity class for prop_physics and related classes.
Methods
Function | Signature | Description |
---|---|---|
SetDynamicVsDynamicContinuous | void SetDynamicVsDynamicContinuous(bool bIsDynamicVsDynamicContinuousEnabled)
|
Enable/disable dynamic vs dynamic continuous collision traces. |
DisableMotion | void DisableMotion()
|
Enable motion for the prop. |
EnableMotion | void EnableMotion()
|
Enable motion for the prop. |
CDebugOverlayScriptHelper
No Description Set
Methods
Function | Signature | Description |
---|---|---|
Axis | void Axis(Vector Vector_1, Quaternion Quaternion_2, float float_3, bool bool_4, float float_5)
|
Draws an axis. Specify origin + orientation in world space. |
Box | void Box(Vector Vector_1, Vector Vector_2, int int_3, int int_4, int int_5, int int_6, bool bool_7, float float_8)
|
Draws a world-space axis-aligned box. Specify bounds in world space. |
BoxAngles | void BoxAngles(Vector Vector_1, Vector Vector_2, Vector Vector_3, Quaternion Quaternion_4, int int_5, int int_6, int int_7, int int_8, bool bool_9, float float_10)
|
Draws an oriented box at the origin. Specify bounds in local space. |
Capsule | void Capsule(Vector Vector_1, Quaternion Quaternion_2, float float_3, float float_4, int int_5, int int_6, int int_7, int int_8, bool bool_9, float float_10)
|
Draws a capsule. Specify base in world space. |
Circle | void Circle(Vector Vector_1, Quaternion Quaternion_2, float float_3, int int_4, int int_5, int int_6, int int_7, bool bool_8, float float_9)
|
Draws a circle. Specify center in world space. |
CircleScreenOriented | void CircleScreenOriented(Vector Vector_1, float float_2, int int_3, int int_4, int int_5, int int_6, bool bool_7, float float_8)
|
Draws a circle oriented to the screen. Specify center in world space. |
Cone | void Cone(Vector Vector_1, Vector Vector_2, float float_3, float float_4, int int_5, int int_6, int int_7, int int_8, bool bool_9, float float_10)
|
Draws a wireframe cone. Specify endpoint and direction in world space. |
Cross | void Cross(Vector Vector_1, float float_2, int int_3, int int_4, int int_5, int int_6, bool bool_7, float float_8)
|
Draws a screen-aligned cross. Specify origin in world space. |
Cross3D | void Cross3D(Vector Vector_1, float float_2, int int_3, int int_4, int int_5, int int_6, bool bool_7, float float_8)
|
Draws a world-aligned cross. Specify origin in world space. |
Cross3DOriented | void Cross3DOriented(Vector Vector_1, Quaternion Quaternion_2, float float_3, int int_4, int int_5, int int_6, int int_7, bool bool_8, float float_9)
|
Draws an oriented cross. Specify origin in world space. |
DrawTickMarkedLine | void DrawTickMarkedLine(Vector Vector_1, Vector Vector_2, float float_3, int int_4, int int_5, int int_6, int int_7, int int_8, bool bool_9, float float_10)
|
Draws a dashed line. Specify endpoint's in world space. |
EntityAttachments | void EntityAttachments(ehandle ehandle_1, float float_2, float float_3)
|
Draws the attachments of the entity |
EntityAxis | void EntityAxis(ehandle ehandle_1, float float_2, bool bool_3, float float_4)
|
Draws the axis of the entity origin |
EntityBounds | void EntityBounds(ehandle ehandle_1, int int_2, int int_3, int int_4, int int_5, bool bool_6, float float_7)
|
Draws bounds of an entity |
EntitySkeleton | void EntitySkeleton(ehandle ehandle_1, float float_2)
|
Draws the skeleton of the entity |
EntityText | void EntityText(ehandle ehandle_1, int int_2, string string_3, int int_4, int int_5, int int_6, int int_7, float float_8)
|
Draws text on an entity |
FilledRect2D | void FilledRect2D(Vector2D Vector2D_1, Vector2D Vector2D_2, int int_3, int int_4, int int_5, int int_6, float float_7)
|
Draws a screen-space filled 2D rectangle. Coordinates are in pixels. |
HorzArrow | void HorzArrow(Vector Vector_1, Vector Vector_2, float float_3, int int_4, int int_5, int int_6, int int_7, bool bool_8, float float_9)
|
Draws a horizontal arrow. Specify endpoint's in world space. |
Line | void Line(Vector Vector_1, Vector Vector_2, int int_3, int int_4, int int_5, int int_6, bool bool_7, float float_8)
|
Draws a line between two point's |
Line2D | void Line2D(Vector2D Vector2D_1, Vector2D Vector2D_2, int int_3, int int_4, int int_5, int int_6, float float_7)
|
Draws a line between two point's in screenspace |
PopDebugOverlayScope | void PopDebugOverlayScope()
|
Pops the identifier used to group overlays. Overlays marked with this identifier can be deleted in a big batch. |
PushAndClearDebugOverlayScope | void PushAndClearDebugOverlayScope(utlstringtoken utlstringtoken_1)
|
Pushes an identifier used to group overlays. Deletes all existing overlays using this overlay id. |
PushDebugOverlayScope | void PushDebugOverlayScope(utlstringtoken utlstringtoken_1)
|
Pushes an identifier used to group overlays. Overlays marked with this identifier can be deleted in a big batch. |
RemoveAllInScope | void RemoveAllInScope(utlstringtoken utlstringtoken_1)
|
Removes all overlays marked with a specific identifier, regardless of their lifetime. |
SolidCone | void SolidCone(Vector Vector_1, Vector Vector_2, float float_3, float float_4, int int_5, int int_6, int int_7, int int_8, bool bool_9, float float_10)
|
Draws a solid cone. Specify endpoint and direction in world space. |
Sphere | void Sphere(Vector Vector_1, float float_2, int int_3, int int_4, int int_5, int int_6, bool bool_7, float float_8)
|
Draws a wireframe sphere. Specify center in world space. |
SweptBox | void SweptBox(Vector Vector_1, Vector Vector_2, Vector Vector_3, Vector Vector_4, Quaternion Quaternion_5, int int_6, int int_7, int int_8, int int_9, float float_10)
|
Draws a swept box. Specify endpoint's in world space and the bounds in local space. |
Text | void Text(Vector Vector_1, int int_2, string string_3, float float_4, int int_5, int int_6, int int_7, int int_8, float float_9)
|
Draws 2D text. Specify origin in world space. |
Texture | void Texture(string string_1, Vector2D Vector2D_2, Vector2D Vector2D_3, int int_4, int int_5, int int_6, int int_7, Vector2D Vector2D_8, Vector2D Vector2D_9, float float_10)
|
Draws a screen-space texture. Coordinates are in pixels. |
Triangle | void Triangle(Vector Vector_1, Vector Vector_2, Vector Vector_3, int int_4, int int_5, int int_6, int int_7, bool bool_8, float float_9)
|
Draws a filled triangle. Specify vertices in world space. |
UnitTestCycleOverlayRenderType | void UnitTestCycleOverlayRenderType()
|
Toggles the overlay render type, for unit tests |
VectorText3D | void VectorText3D(Vector Vector_1, Quaternion Quaternion_2, string string_3, int int_4, int int_5, int int_6, int int_7, bool bool_8, float float_9)
|
Draws 3D text. Specify origin + orientation in world space. |
VertArrow | void VertArrow(Vector Vector_1, Vector Vector_2, float float_3, int int_4, int int_5, int int_6, int int_7, bool bool_8, float float_9)
|
Draws a vertical arrow. Specify endpoint's in world space. |
YawArrow | void YawArrow(Vector Vector_1, float float_2, float float_3, float float_4, int int_5, int int_6, int int_7, int int_8, bool bool_9, float float_10)
|
Draws a arrow associated with a specific yaw. Specify endpoint's in world space. |
CSceneEntity
- extends CBaseEntity
Choreographed scene which controls animation and/or dialog on one or more actors.
Methods
Function | Signature | Description |
---|---|---|
AddBroadcastTeamTarget | void AddBroadcastTeamTarget(int int_1)
|
Adds a team (by index) to the broadcast list |
Cancel | void Cancel()
|
Cancel scene playback |
EstimateLength | float EstimateLength()
|
Returns length of this scene in seconds. |
FindCamera | handle FindCamera()
|
Get the camera |
FindNamedEntity | handle FindNamedEntity(string string_1)
|
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_1, string string_2)
|
given a dummy scene name and a vcd string, load the scene |
RemoveBroadcastTeamTarget | void RemoveBroadcastTeamTarget(int int_1)
|
Removes a team (by index) from the broadcast list |
Start | void Start(handle handle_1)
|
Start scene playback, takes activatorEntity as param |
CCustomGameEventManager
No Description Set
Methods
Global accessor variable: CustomGameEventManager
Function | Signature | Description |
---|---|---|
RegisterListener | int RegisterListener(string string_1, handle handle_2)
|
( string EventName, func CallbackFunction ) - Register a callback to be called when a particular custom event arrives. Returns a listener ID that can be used to unregister later. |
Send_ServerToAllClients | void Send_ServerToAllClients(string string_1, handle handle_2)
|
( string EventName, table EventData ) |
Send_ServerToPlayer | void Send_ServerToPlayer(handle handle_1, string string_2, handle handle_3)
|
( Entity Player, string EventName, table EventData ) |
Send_ServerToTeam | void Send_ServerToTeam(int int_1, string string_2, handle handle_3)
|
( int TeamNumber, string EventName, table EventData ) |
UnregisterListener | void UnregisterListener(int int_1)
|
( int ListnerID ) - Unregister a specific listener |
CCustomNetTableManager
Used to communicate with clientside Javascript used by Panorama. See Linking Lua with Javascript for usage.
Global accessor variable: CustomNetTables
Methods
Function | Signature | Description |
---|---|---|
GetTableValue | handle GetTableValue(string TableName, string KeyName)
|
( string TableName, string KeyName ) |
SetTableValue | bool SetTableValue(string TableName, string KeyName, handle Value)
|
( string TableName, string KeyName, script_table Value ) |
CPointClientUIWorldPanel
Entity class for point_clientui_world_panel
A 2D Panorama panel projected at a set position in the world.
Methods
Function | Signature | Description |
---|---|---|
AcceptUserInput | void AcceptUserInput()
|
Tells the panel to accept user input. |
AddCSSClasses | void AddCSSClasses(string classes)
|
Adds CSS class(es) to the panel. |
IgnoreUserInput | void IgnoreUserInput()
|
Tells the panel to ignore user input. |
RemoveCSSClasses | void RemoveCSSClasses(string classes)
|
Remove CSS class(es) from the panel. |
CPointTemplate
Entity class for point_template
Methods
Function | Signature | Description |
---|---|---|
DeleteCreatedSpawnGroups | void DeleteCreatedSpawnGroups()
|
DeleteCreatedSpawnGroups() : Deletes any spawn groups that this point_template has spawned. Note: The point_template will not be deleted by this. |
ForceSpawn | void ForceSpawn()
|
ForceSpawn() : Spawns all of the entities the point_template is pointing at. |
GetSpawnedEntities | handle GetSpawnedEntities()
|
GetSpawnedEntities() : Get the list of the most recent spawned entities |
SetSpawnCallback | void SetSpawnCallback(handle hCallbackFunc, handle hCallbackScope)
|
SetSpawnCallback( hCallbackFunc, hCallbackScope, hCallbackData ) : Set a callback for when the template spawns entities. The spawned entities will be passed in as an array. |
CPointWorldText
Entity class for point_worldtext.
Methods
Function | Signature | Description |
---|---|---|
SetMessage | void SetMessage(string pMessage)
|
Set the message on this entity. |
CPropHMDAvatar
Entity class for prop_hmd_avatar.
Methods
Function | Signature | Description |
---|---|---|
GetVRHand | CPropVRHand GetVRHand(int nHandID)
|
Get VR hand by ID (0 and 1). |
CPropVRHand
Entity class for prop_vr_hand. Represents a VR motion controller. The controllers can be enumerated for each player using the CPropHMDAvatar::GetVRHand() method.
Methods
Function | Signature | Description |
---|---|---|
AddHandAttachment | void AddHandAttachment(handle attachment)
|
Add the attachment to this hand. |
AddHandModelOverride | void AddHandModelOverride(string modelName)
|
Add a model override for this hand. |
FireHapticPulse | void FireHapticPulse(int strength)
|
Fire a haptic pulse on this hand. Integer range [0, 1, 2] for strength. |
GetHandAttachment | handle GetHandAttachment()
|
Get the attachment on this hand. |
GetHandID | int GetHandID()
|
Get the players hand ID for this hand. |
GetPlayer | CBasePlayer GetPlayer()
|
Get the player for this hand. |
RemoveAllHandModelOverrides | void RemoveAllHandModelOverrides()
|
Remove all model overrides for this hand. |
RemoveHandAttachmentByHandle | void RemoveHandAttachmentByHandle(handle hAttachment)
|
Remove hand attachment by handle. |
RemoveHandModelOverride | void RemoveHandModelOverride(string pModelName)
|
Remove a model override for this hand. |
SetHandAttachment | void SetHandAttachment(handle hAttachment)
|
Set the attachment for this hand. |
CScriptParticleManager
Allows the creation and manipulation of particle systems.
Global accessor variable: ParticleManager
Function | Signature | Description |
---|---|---|
CreateParticle | int CreateParticle(string particleName, int particleAttach, handle owningEntity)
|
Creates a new particle effect. Returns the index of the created effect. |
CreateParticleForPlayer | int CreateParticleForPlayer(string particleName, int particleAttach, handle owningEntity, handle owningPlayer)
|
Creates a new particle effect that only plays for the specified player. Returns the index of the created effect. |
DestroyParticle | void DestroyParticle(int particleID, bool immediately)
|
Destroys particle. |
GetParticleReplacement | string GetParticleReplacement(string string_1, handle handle_2)
|
No Description Set |
ReleaseParticleIndex | void ReleaseParticleIndex(int particleId)
|
Frees the specified particle index |
SetParticleAlwaysSimulate | void SetParticleAlwaysSimulate(int int_1)
|
No Description Set |
SetParticleControl | void SetParticleControl(int particleId, int controlIndex, Vector controlData)
|
Set the control point data for a control on a particle effect |
SetParticleControlEnt | void SetParticleControlEnt(int particleId, int controlIndex, handle entity, ParticleAttachment_t attachType, string attachment, Vector origin, bool unknown)
|
Attaches the control point to an entity. |
SetParticleControlForward | void SetParticleControlForward(int FXIndex, int controlIndex, Vector forward)
|
Set the forward direction for a control point on a particle effect. |
SetParticleControlOrientation | void SetParticleControlOrientation(int FXIndex, int controlIndex, Vector forward, Vector right, Vector up)
|
Set the orientation for a control point on a particle effect. |
CSteamToursBaseGameMode
No Description Set
Global object accessed via GameRules:GetGameModeEntity()
Methods
Function | Signature | Description |
---|---|---|
GetDetectorQuestCount | int GetDetectorQuestCount(CBasePlayer player)
|
Returns the number of active detector quests for the given player. |
GetDetectorQuestID | string GetDetectorQuestID(CBasePlayer player, int idx)
|
Returns the detector quest's ID, if any, for the given player and index. |
GetDetectorQuestLocation | Vector GetDetectorQuestLocation(CBasePlayer player, int idx)
|
Returns the detector quest location, if any, for the given player and index. |
GetDetectorQuestNumItemsUnlocked | int GetDetectorQuestNumItemsUnlocked(CBasePlayer player, string questID)
|
Returns the number of items unlocked for the player and quest. |
GetDetectorQuestUnlockedItemDefID | string GetDetectorQuestUnlockedItemDefID(CBasePlayer player, string questID, int idx)
|
Returns the item definition ID for the item that was unlocked for the given player and quest. |
UnlockItem | void UnlockItem(CBasePlayer player, string itemName)
|
Unlocks an item from /scripts/contentdb.txt for the given player. Item names are set using the dev_name key. |
CSteamToursGameRules
No Description Set
Global accessor variable: GameRules
Methods
Function | Signature | Description |
---|---|---|
GetGameModeEntity | CSteamToursBaseGameMode GetGameModeEntity()
|
Returns the game mode entity. |
SetPlayersCanSpawnTools | void SetPlayersCanSpawnTools(bool allowTools)
|
Allow control of whether players can spawn tools or not. |
CTakeDamageInfo
DamageInfo handle returned by CreateDamageInfo()
Methods
Function | Signature | Description |
---|---|---|
AddDamage | void AddDamage(float addAmount)
|
Adds to the damage value. |
AddDamageType | void AddDamageType(int bitsDamageType)
|
Adds damage type bit flags. |
AllowFriendlyFire | bool AllowFriendlyFire()
|
|
BaseDamageIsValid | bool BaseDamageIsValid()
|
|
CanBeBlocked | bool CanBeBlocked()
|
|
GetAmmoType | int GetAmmoType()
|
|
GetAttacker | CBaseEntity GetAttacker()
|
Returns the attacker entity. |
GetBaseDamage | float GetBaseDamage()
|
|
GetDamage | float GetDamage()
|
Returns the damage value. |
GetDamageCustom | int GetDamageCustom()
|
|
GetDamageForce | Vector GetDamageForce()
|
Returns the damage force. |
GetDamagePosition | int GetDamagePosition()
|
Returns the damage position. |
GetDamageTaken | float GetDamageTaken()
|
|
GetDamageType | int GetDamageType()
|
Returns the damage type bitfield. |
GetInflictor | CBaseEntity GetInflictor()
|
Returns the inflictor entity (usually the weapon). |
GetMaxDamage | float GetMaxDamage()
|
|
GetOriginalDamage | float GetOriginalDamage()
|
|
GetRadius | float GetRadius()
|
|
GetReportedPosition | Vector GetReportedPosition()
|
|
GetStabilityDamage | float GetStabilityDamage()
|
|
ScaleDamage | void ScaleDamage(float scaleAmount)
|
|
SetAllowFriendlyFire | void SetAllowFriendlyFire(bool allow)
|
|
SetAmmoType | void SetAmmoType(intammoType)
|
|
SetAttacker | void SetAttacker(CBaseEntity attacker)
|
|
SetCanBeBlocked | void SetCanBeBlocked(bool block)
|
|
SetDamage | void SetDamage(float damage)
|
Set new damage value. |
SetDamageCustom | void SetDamageCustom(int damageCustom)
|
|
SetDamageForce | void SetDamageForce(Vector damageForce)
|
Sets the damage force vector. |
SetDamagePosition | void SetDamagePosition(Vector damagePosition)
|
Sets the global space damage position. |
SetDamageTaken | void SetDamageTaken(int damageTaken)
|
|
SetDamageType | void SetDamageType(int bitsDamageType)
|
Set the damage type bitfield. |
SetMaxDamage | void SetMaxDamage(float maxDamage)
|
|
SetOriginalDamage | void SetOriginalDamage(float originalDamage)
|
|
SetRadius | void SetRadius(float radius)
|
|
SetReportedPosition | void SetReportedPosition(Vector reportedPosition)
|
|
SetStabilityDamage | void SetStabilityDamage(float stabilityDamage)
|
Convars
Allows access to read and modify console variables.
Global accessor variable: ConVars
Methods
Function | Signature | Description |
---|---|---|
GetBool | table GetBool(string variableName)
|
GetBool(name) : returns the convar as a boolean flag. |
GetCommandClient | handle GetCommandClient()
|
GetCommandClient() : returns the player who issued this console command. |
GetFloat | table GetFloat(string name)
|
GetFloat(name) : returns the convar as a float. May return nil if no such convar. |
GetInt | table GetInt(string string_1)
|
GetInt(name) : returns the convar as an int. May return nil if no such convar. |
GetStr | table GetStr(string variableName)
|
GetStr(name) : returns the convar as a string. May return nil if no such convar. |
RegisterCommand | void RegisterCommand(string variableName, handle function, string helpText, int flags)
|
RegisterCommand(name, fn, helpString, flags) : register a console command. |
RegisterConvar | void RegisterConvar(string name, string defaultValue, string helpText, int flags)
|
RegisterConvar(name, defaultValue, helpString, flags): register a new console variable. |
SetBool | void SetBool(string variableName, bool value)
|
SetBool(name, val) : sets the value of the convar to the bool. |
SetFloat | void SetFloat(string variableName, float value)
|
SetFloat(name, val) : sets the value of the convar to the float. |
SetInt | void SetInt(string string_1, int int_2)
|
SetInt(name, val) : sets the value of the convar to the int. |
SetStr | void SetStr(string string_1, string string_2)
|
SetStr(name, val) : sets the value of the convar to the string. |
Decider
No Description Set
Methods
Function | Signature | Description |
---|---|---|
AddRule | bool AddRule(CRule rule)
|
Add a CRule object (defined in rulescript_base.nut) |
FindAllMatches | handle FindAllMatches(handle query, float leeway)
|
Returns an array of all matching responses. If leeway is nonzero, all results scoring within 'leeway' of the best score return. |
FindBestMatch | handle FindBestMatch(handle query)
|
Query the database and return the best result found. If multiple of equal score found, an arbitrary one returns. |
GlobalSys
Used to read the command line parameters the game was started with.
Global accessor variable: GlobalSys
Methods
Function | Signature | Description |
---|---|---|
CommandLineCheck | bool CommandLineCheck(string name)
|
Returns true if the command line param was used, otherwise false. |
CommandLineFloat | float CommandLineFloat(string name)
|
Returns the command line param as a float. |
CommandLineInt | int CommandLineInt(string name)
|
Returns the command line param as an int. |
CommandLineStr | string CommandLineStr(string name)
|
Returns the command line param as a string. |
Uint64
Integer with binary operations. Used for motion controller button masks.
Methods
Function | Signature | Description |
---|---|---|
BitwiseAnd | int BitwiseAnd(Uint64 operand)
|
Performs bitwise AND between two integers. |
BitwiseOr | int BitwiseOr(Uint64 operand)
|
Performs bitwise OR between two integers. |
BitwiseXor | int BitwiseXor(Uint64 operand)
|
Performs bitwise XOR between two integers. |
BitwiseNot | int BitwiseNot(Uint64 operand)
|
Performs bitwise NOT between two integers. |
ClearBit | int ClearBit(int bitvalue)
|
Clears the specified bit. |
IsBitSet | bool IsBitSet(int bitvalue)
|
Checks if a bit is set. |
SetBit | int SetBit(int bitvalue)
|
Sets the specified bit. |
ToggleBit | int ToggleBit(int bitvalue)
|
Toggles the specified bit. |
ToHexString | string ToHexString()
|
Returns a hexadecimal string representation of the integer. |
QAngle
Class for angles.
Methods
Function | Signature | Description |
---|---|---|
constructor | QAngle(pitch, yaw, roll)
|
Creates a new QAngle. |
__add | QAngle __add(QAngle a, QAngle b)
|
Overloaded +. Adds angles together. ![]() |
__eq | bool __eq(QAngle a, QAngle b)
|
Overloaded ==. Tests for Equality |
__tostring | string __tostring()
|
Overloaded .. Converts the QAngle to a human readable string. |
Forward | Vector Forward()
|
Returns the forward vector. |
Left | Vector Left()
|
Returns the left vector. |
Up | Vector Up()
|
Returns the up vector. |
Members
Variable | Description |
---|---|
x
|
Pitch angle |
y
|
Yaw angle |
z
|
Roll angle |
Quarternion
Class for quaterinions.
Global accessor variable: None available
Vector
3D vector class.
Methods
Function | Signature | Description |
---|---|---|
constructor | Vector(x, y, z)
|
Creates a new vector with the specified Cartesian coordinates. |
__add | Vector __add(Vector a, Vector b)
|
Overloaded +. Adds vectors together. |
__div | Vector __div(Vector a, Vector b)
|
Overloaded /. Divides vectors. |
__eq | bool __eq(Vector a, Vector b)
|
Overloaded ==. Tests for Equality. |
__len | float __len()
|
Overloaded # returns the length of the vector. |
__mul | Vector __mul(Vector a, Vector b)
|
Overloaded * returns the vectors multiplied together. can also be used to multiply with scalars. |
__sub | Vector __sub(Vector a, Vector b)
|
Overloaded -. Subtracts vectors |
__tostring | string __tostring()
|
Overloaded .. Converts vectors to strings |
__unm | Vector __unm()
|
Overloaded unary - operator. Reverses the vector. |
Cross | Vector Cross(Vector a, Vector b)
|
Cross product of two vectors. |
Dot | float Dot(Vector a, Vector b)
|
Dot product of two vectors. |
Length | float Length()
|
Length of the Vector. |
Length2D | float Length2D()
|
Length of the Vector in the XY plane. |
Normalized | Vector Normalized()
|
Returns the vector normalized. |
Members
Variable | Description |
---|---|
x
|
X-axis |
y
|
Y-axis |
z
|
Z-axis |
Enumerations
Damage types
Name | Value | Description |
---|---|---|
DMG_GENERIC | 0 | |
DMG_CRUSH | 1 | |
DMG_BULLET | 2 | |
DMG_SLASH | 4 | |
DMG_BURN | 8 | |
DMG_BLAST | 64 | |
DMG_SHOCK | 256 |
Motion controller buttons
Name | Value | Description |
---|---|---|
IN_USE_HAND0 | 24 | When the trigger is pressed. |
IN_USE_HAND1 | 25 | When the trigger is pressed. |
IN_PAD_LEFT_HAND0 | 26 | When the pad is pressed on the left side. |
IN_PAD_RIGHT_HAND0 | 27 | When the pad is pressed on the right side. |
IN_PAD_UP_HAND0 | 28 | When the pad is pressed on the top. |
IN_PAD_DOWN_HAND0 | 29 | When the pad is pressed on the bottom. |
IN_PAD_LEFT_HAND1 | 30 | When the pad is pressed on the left side. |
IN_PAD_RIGHT_HAND1 | 31 | When the pad is pressed on the right side. |
IN_PAD_UP_HAND1 | 32 | When the pad is pressed on the top. |
IN_PAD_DOWN_HAND1 | 33 | When the pad is pressed on the bottom. |
IN_MENU_HAND0 | 34 | Menu button above the touchpad. |
IN_MENU_HAND1 | 35 | Menu button above the touchpad. |
IN_GRIP_HAND0 | 36 | Grip. |
IN_GRIP_HAND1 | 37 | Grip. |
IN_GRIPANALOG_HAND0 | ||
IN_GRIPANALOG_HAND1 | ||
IN_PAD_HAND0 | 38 | When the pad is pressed anywhere. |
IN_PAD_HAND1 | 39 | When the pad is pressed anywhere. |
IN_PAD_TOUCH_HAND0 | 40 | When the pad is touched anywhere. |
IN_PAD_TOUCH_HAND1 | 41 | When the pad is touched anywhere. |
ParticleAttachment_t
Name | Value | Description |
---|---|---|
PATTACH_INVALID | -1 | |
PATTACH_ABSORIGIN | 0 | Spawn on entity origin. |
PATTACH_ABSORIGIN_FOLLOW | 1 | Follow the entity origin. |
PATTACH_CUSTOMORIGIN | 2 | |
PATTACH_CUSTOMORIGIN_FOLLOW | 3 | |
PATTACH_POINT | 4 | Spawn on entity attachment point. |
PATTACH_POINT_FOLLOW | 5 | Follow entity attachment point. |
PATTACH_EYES_FOLLOW | 6 | |
PATTACH_OVERHEAD_FOLLOW | 7 | |
PATTACH_WORLDORIGIN | 8 | Spawn on map origin. |
PATTACH_ROOTBONE_FOLLOW | 9 | |
PATTACH_RENDERORIGIN_FOLLOW | 10 | |
PATTACH_MAIN_VIEW | 11 | |
PATTACH_WATERWAKE | 12 | |
MAX_PATTACH_TYPES | 13 |