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 entity-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].
A set of terms are commonly used in this page. Glossary of the terms:
<!-- Should this be a template? -->
<div class="mw-collapsible mw-collapsed" style="float:left; overflow:auto; border:1px grey solid; display:inline-block;">
<div class="mw-collapsible-content" style="padding-right:6em; max-width:22em;">
* <code>int</code> - Integer. A plain number.
* <code>float</code> - A "number" with decimals.
* <code>string</code> - A word, or a string of characters.
* <code><datatype></code> - Required parameter.
* <code>[datatype]</code> - Optional parameter.
</div></div><br clear="all">


== I/O Expansions ==
== I/O Expansions ==
Line 27: Line 36:
=== Entity I/O Additions ===
=== Entity I/O Additions ===
==== <div style="font-size: 110%;">All Entities</div> ====
==== <div style="font-size: 110%;">All Entities</div> ====


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