Editing User:Orin/Sandbox/Entity Additions

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 4: Line 4:


<div style="float:right;clear:all;padding:0 1em;">__TOC__</div>
<div style="float:right;clear:all;padding:0 1em;">__TOC__</div>
All entity-oriented feature additions: Inputs, Outputs, Targetting, etc. are all documented within their own heaps of lists.
All e
 
ntity-oriented feature additions: Inputs, Outputs, Targetting, etc. are all documented within their own heaps of lists. Remember to visit the [https://developer.valvesoftware.com/wiki/List_of_Team_Fortress_2_Entities VDC] for any confusion about the entities shown here.
Note I/O inputs have two different type of parameters: <Required> and [Optional].


To traverse this page, use the ''Table of Contents'' at the right side, or use the CTRL+F shortcut for your Browser.
== I/O Expansions ==
== I/O Expansions ==
=== Targetname Prefixes ===
=== Targetname Prefixes ===
Line 26: Line 26:


=== Entity I/O Additions ===
=== Entity I/O Additions ===
==== <div style="font-size: 110%;">All Entities</div> ====
==== Global ====
 
 
<b>Inputs</b>
{| class="wikitable" style="table-layout: fixed;"
! Input
! Description
|-
| <code>$FireUserAsActivator1-4 <string></code>
| Acts like FireUser1-4, but the entity becomes the !activator and is passed as the parameter of OnUser1-4 output
|-
| <code>$FireUser5-8 <string></code>
| Fires custom $OnUser5-8 output
|-
| <code>$TakeDamage <int></code>
| Take specified amount of damage
|-
| <code>$TakeDamageFromActivator <int></code>
| Take specified amount of damage, the !activator is the damage inflictor
|-
| <code>$SetModel <string></code>
| Set custom model
|-
| <code>$SetModelOverride <string></code>
| Set custom model, only changes the appearance
|-
| <code>$SetModelSpecial <string></code>
| Set custom model, in a special way, it does less additional changes to the entity
|-
| <code>$SetOwner <entity></code>
| Set entity owner
|-
| <code>$InheritOwner <entity></code>
| Set entity owner to the passed entity owner
|-
| <code>$InheritParent <entity></code>
| Set entity parent to the passed entity parent
|-
| <code>$GetKeyValue <string></code>
| Fire OnUser1 output, with key value as a parameter
|-
| <code>$MoveType <int>,<int></code>
| Set move type
|-
| <code>$PlaySound <string></code>
| Play sound from this entity
|-
| <code>$StopSound <string></code>
| Stop playing sound from this entity
|-
| <code>$SetLocalOrigin <vector></code>
| Set origin relative to parent
|-
| <code>$SetLocalAngles <vector></code>
| Set angles relative to parent
|-
| <code>$SetLocalVelocity <vector></code>
| Set velocity relative to parent
|-
| <code>$TeleportToEntity <entity></code>
| Teleport to specified entity
|-
| <code>$MoveRelative <vector></code>
| Move relative to parent (world)
|-
| <code>$RotateRelative <vector></code>
| Rotate relative to parent (world)
|-
| <code>SetKey$(keyvalue name) <string></code>
| Set keyvalue to specified value
|-
| <code>GetKey$(keyvalue name) <string></code>
| parameter format: entity|input|default value; example: !activator|$DisplayTextCenter|def<br>
Trigger the input of an entity, with keyvalue as a parameter (default value if not found)
|-
| <code>SetVar$(variable name) <string></code>
| Set custom entity variable
|-
| <code>GetVar$(variable name) <string></code>
| parameter format: entity|input|default value; example: !activator|$DisplayTextCenter|def<br>
Trigger the input of an entity, with variable as a parameter (default value if not found)
|-
| <code>SetData$([https://raw.githubusercontent.com/powerlord/tf2-data/master/datamaps.txt datamap] prop name) <string></code>
| Set datamap property to specified value
|-
| <code>GetData$([https://raw.githubusercontent.com/powerlord/tf2-data/master/datamaps.txt datamap] prop name) <string></code>
| parameter format: entity|input|default value; example: !activator|$DisplayTextCenter|def<br>
Trigger the input of an entity, with datamap prop as a parameter (default value if not found)
|-
| <code>SetProp$([https://raw.githubusercontent.com/powerlord/tf2-data/master/netprops.txt send prop] name) <string></code>
| Set send property to specified value
|-
| <code>GetProp$([https://raw.githubusercontent.com/powerlord/tf2-data/master/netprops.txt send prop] name) <string></code>
| parameter format: entity|input|default value; example: !activator|$DisplayTextCenter|def<br>
Trigger the input of an entity, with send prop as a parameter (default value if not found)
|}


<b>Outputs</b>
==== logic_case ====
{| class="wikitable" style="table-layout:fixed;"
! Output
! Description
|-
| <code>$OnUser5-8 <string></code>
| Called when $FireUser5-8 input is used.
|-
| <code>$OnKilled</code>
| Fired when the entity is killed. The <code>!caller</code> entity will be inaccessible at this point.
|}
 
==== <div style="font-size:110%;">logic_case</u> ====
Redirects I/O in ways depending if a case's scenario has happened. [https://developer.valvesoftware.com/wiki/Logic_case VDC page]
Redirects I/O in ways depending if a case's scenario has happened. [https://developer.valvesoftware.com/wiki/Logic_case VDC page]


For the inputs used in text formatting and menus, look at the [[#logic_case_2|Entity Expansions]] section.
For the inputs used in text formatting and menus, look at the [[#logic_case_2|Entity Expansions]] section.


<b>Inputs</b>
<u><b style="font-size: 110%;">Inputs</b></u>
{| class="wikitable" style="table-layout: fixed;"
{| class="wikitable" style="table-layout: fixed;"
! Input
! Input
Line 169: Line 62:
|}
|}


==== <div style="font-size:110%;">point_viewcontrol</u> ====
==== point_viewcontrol ====
A camera entity capable to force the viewport of any desired players to use its own. [https://developer.valvesoftware.com/wiki/Point_viewcontrol VDC page]
A camera entity capable to force the viewport of any desired players to use its own. [https://developer.valvesoftware.com/wiki/Point_viewcontrol VDC page]


<b>Inputs</b>
<u><b style="font-size: 110%;">Inputs</b></u>
{| class="wikitable" style="table-layout: fixed;"
{| class="wikitable" style="table-layout: fixed;"
! Input
! Input
Line 187: Line 80:
|}
|}


==== <div style="font-size:110%;">tank_boss</u> ====
==== tank_boss ====
The big sluggish Tank robot. [https://developer.valvesoftware.com/wiki/Tank_boss VDC page]
The big sluggish Tank robot. [https://developer.valvesoftware.com/wiki/Tank_boss VDC page]


<b>Outputs</b>
<u><b style="font-size: 110%;">Outputs</b></u>
{| class="wikitable" style="table-layout:fixed;"
{| class="wikitable" style="table-layout: fixed;"
! Output
! Output
! Description
! Description
Line 230: Line 123:


=== logic_case ===
=== logic_case ===
==== <div style="font-size:110%;">Text formatter</div> ====
==== Text formatter ====
With the use of the added inputs, logic_case can be transformed into a text formatter, replacing % in the format string into format parameters.
With the use of the added inputs, logic_case can be transformed into a text formatter, replacing % in the format string into format parameters.


Line 254: Line 147:
</syntaxhighlight>This would display "You have 6 out of 12 coins left. 50 % done" to all players
</syntaxhighlight>This would display "You have 6 out of 12 coins left. 50 % done" to all players


<b>Inputs</b>
<u><b style="font-size: 110%;">Formatting Inputs</b></u>
{| class="wikitable" style="table-layout: fixed;"
{| class="wikitable" style="table-layout: fixed;"
! Output
! Output
Line 275: Line 168:
|}
|}


==== <div style="font-size:110%;">Menus</div> ====
==== Menus ====
Sourcemod Menus are displayed using the <code>$DisplayMenu</code> input.
Sourcemod Menus are displayed using the <code>$DisplayMenu</code> input.


Line 303: Line 196:
</syntaxhighlight>
</syntaxhighlight>


<b>Inputs</b>
<u><b style="font-size: 110%;">Menu Inputs</b></u>
{| class="wikitable" style="table-layout: fixed;"
{| class="wikitable" style="table-layout: fixed;"
! Output
! Output
Line 438: Line 331:
== game_ui ==
== game_ui ==
The server will no longer crash if the player using the entity disconnected from the server
The server will no longer crash if the player using the entity disconnected from the server
== $filter_keyvalue ==
Custom filter that lets you filter entities matching the key value. Shares inputs with [https://developer.valvesoftware.com/wiki/Filter_base filter_base] entity
=== Keyvalues ===
* $name <string>
** Name of the key to compare, example: health
* $value <any>
** Value to compare against
* $compare <string>
** The condition for passing the filter (default: equal). Should only be set for numeric values
** Possible values:
*** equal
*** less than
*** greater than
*** less than or equal
*** greater than or equal
== $filter_variable ==
Custom filter that lets you filter entities matching the custom entity variable (declared by firing $SetVar$variablename input of the entity). Shares inputs with [https://developer.valvesoftware.com/wiki/Filter_base filter_base] entity
=== Keyvalues ===
* $name <string>
** Name of the variable to compare, example: myvar
* $value <any>
** Value to compare against
* $compare <string>
** The condition for passing the filter (default: equal). Should only be set for numeric values
** Possible values:
*** equal
*** less than
*** greater than
*** less than or equal
*** greater than or equal
== $filter_datamap ==
Custom filter that lets you filter entities matching the [https://raw.githubusercontent.com/powerlord/tf2-data/master/datamaps.txt datamap] prop. Shares inputs with [https://developer.valvesoftware.com/wiki/Filter_base filter_base] entity
=== Keyvalues ===
* $name <string>
** Name of the variable to compare, example: m_iHealth
* $value <any>
** Value to compare against
* $compare <string>
** The condition for passing the filter (default: equal). Should only be set for numeric values
** Possible values:
*** equal
*** less than
*** greater than
*** less than or equal
*** greater than or equal
== $filter_sendprop ==
Custom filter that lets you filter entities matching the [https://raw.githubusercontent.com/powerlord/tf2-data/master/netprops.txt send prop]. Shares inputs with [https://developer.valvesoftware.com/wiki/Filter_base filter_base] entity
=== Keyvalues ===
* $name <string>
** Name of the variable to compare, example: m_nCurrency
* $value <any>
** Value to compare against
* $compare <string>
** The condition for passing the filter (default: equal). Should only be set for numeric values
** Possible values:
*** equal
*** less than
*** greater than
*** less than or equal
*** greater than or equal
== All entities ==
=== Inputs ===
* $FireUserAsActivator1-4 <string>
** Acts like FireUser1-4, but the entity becomes the !activator, and the parameter is passed in OnUser1-4 output
*$FireUser5-8 <string>
** Fires custom $onuser5-8 output
* $TakeDamage <int>
** Take specified amount of damage
* $TakeDamageFromActivator <int>
** Take specified amount of damage, the !activator is the damage inflictor
* $SetModel <string>
** Set custom model
* $SetModelOverride <string>
** Set custom model, only changes the appearence
* $SetModelSpecial <string>
** Set custom model, in a special way, it does less additional changes to the entity
* $SetOwner <entity>
** Set entity owner
* $InheritOwner <entity>
** Set entity owner to the passed entity owner
* $InheritParent <entity>
** Set entity parent to the passed entity parent
* $GetKeyValue <string>
** Fire OnUser1 output, with key value as a parameter
* $MoveType <int>,<int>
** Set move type
* $PlaySound <string>
** Play sound from this entity
* $StopSound <string>
** Stop playing sound from this entity
* $SetLocalOrigin <vector>
** Set origin relative to parent
* $SetLocalAngles <vector>
** Set angles relative to parent
* $SetLocalVelocity <vector>
** Set velocity relative to parent
* $TeleportToEntity <entity>
** Teleport to specified entity
* $MoveRelative <vector>
** Move relative to parent (world)
* $RotateRelative <vector>
** Rotate relative to parent (world)
*$SetKey$(keyvalue name) <string>
**Set keyvalue to specified value
*$GetKey$(keyvalue name) <string>
**parameter format: entity|input|default value
**example: !activator|$DisplayTextCenter|def
**Trigger the input of an entity, with keyvalue as a paramer (default value if not found)
*$SetVar$(variable name) <string>
**Set custom entity variable
*$GetVar$(variable name) <string>
**parameter format: entity|input|default value
**example: !activator|$DisplayTextCenter|def
**Trigger the input of an entity, with variable as a paramer (default value if not found)
*$SetData$([https://raw.githubusercontent.com/powerlord/tf2-data/master/datamaps.txt datamap] prop name) <string>
**Set datamap property to specified value
*$GetData$([https://raw.githubusercontent.com/powerlord/tf2-data/master/datamaps.txt datamap] prop name) <string>
**parameter format: entity|input|default value
**example: !activator|$DisplayTextCenter|def
**Trigger the input of an entity, with datamap prop as a paramer (default value if not found)
*$SetProp$([https://raw.githubusercontent.com/powerlord/tf2-data/master/netprops.txt send prop] name) <string>
**Set send property to specified value
*$GetProp$([https://raw.githubusercontent.com/powerlord/tf2-data/master/netprops.txt send prop] name) <string>
**parameter format: entity|input|default value
**example: !activator|$DisplayTextCenter|def
**Trigger the input of an entity, with send prop as a paramer (default value if not found)
=== Outputs ===
* $OnUser5-8 <string>
** Called when $FireUser5-8 input is used
* $OnKilled
** Fired when the entity is killed. The calling entity no longer exist and cannot be accessed
Please note that all contributions to SigMod are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see SigMod:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)