Editing User:Orin/Sandbox/Entity Additions
Jump to navigation
Jump to search
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 here within their own heaps of lists. | ||
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 22: | Line 21: | ||
|- | |- | ||
| <code>@bb<''vector'' mins> <''vector'' maxs>@<targetname></code> | | <code>@bb<''vector'' mins> <''vector'' maxs>@<targetname></code> | ||
| Target ''all'' entiities within a [https://developer.valvesoftware.com/ | | Target ''all'' entiities within a [https://developer.valvesoftware.com/w/images/6/63/BoundingBoxMinsMaxs.png bounding box] relative to the given entity. Example: <code>@bb-100 -100 -100 100 100 100@prop_dynamic</code>. | ||
|} | |} | ||
=== | == Entity Expansions == | ||
==== < | === [https://developer.valvesoftware.com/wiki/Point_viewcontrol point_viewcontrol] === | ||
==== <u>Inputs</u> ==== | |||
{| class="wikitable" style="table-layout: fixed;" | {| class="wikitable" style="table-layout: fixed;" | ||
! Input | ! Input | ||
! Description | ! Description | ||
|- | |- | ||
| <code>$ | | <code>$EnableAll</code> | ||
| | | Enable the camera for all players on the map.<br> ❗'''Warning:''' Spawnflag #512 may not do anything. (<code>Start At Player, Interruptable by Player</code>) | ||
|- | |- | ||
| <code>$EnableAll</code> | | <code>$EnableAll</code> | ||
| Disable the camera for all players on the map | |||
| Disable the camera for all players on the map | |||
|- | |- | ||
| <code>$SetTarget <entity></code> | | <code>$SetTarget <entity></code> | ||
| | | Set current target to entity. | ||
|} | |} | ||
== | === [https://developer.valvesoftware.com/wiki/Point_viewcontrol obj_sentrygun] (Sentry Gun) === | ||
==== <u>Spawnflags</u> ==== | |||
< | |||
* '''[64]''' - Spawn as mini-sentry | * '''[64]''' - Spawn as mini-sentry | ||
=== | === [https://developer.valvesoftware.com/wiki/Tf_point_weapon_mimic tf_point_weapon_mimic] (Weapon Mimic)<hr> === | ||
; <u>General</u> | |||
< | 1. Added projectile type 4 - Bullet. | ||
:- <code>SpeedMax</code> keyvalue determines max distance (infinite if not specified). | |||
:- <code>SplashRadius</code> determines knockback force. | |||
2. Shot projectiles are now team-assignable with <code>teamnum</code> keyvalue (2 for RED, 3 for BLU). | |||
: | :- Previously they're always of BLU team. | ||
: | 3. If a player owner is set with <code>$SetOwner</code> or <code>$InheritOwner</code>, fired projectiles are assigned the same owner.<br> | ||
4. Stickybombs are automatically removed if the mimic is killed. | |||
:' | ==== Spawnflags ==== | ||
< | |||
* '''[1]''' - Shot projectile callback; fires the <code>OnUser4</code> output whenever a projectile is shot, with <code>!activator</code> as the projectile. | * '''[1]''' - Shot projectile callback; fires the <code>OnUser4</code> output whenever a projectile is shot, with <code>!activator</code> as the projectile. | ||
* '''[2]''' - Allow the keyvalues "''FireSound''" and "''ParticleEffect''" to have functionality. | * '''[2]''' - Allow the keyvalues "''FireSound''" and "''ParticleEffect''" to have functionality. | ||
=== Tank (tank_boss) === | === Tank (tank_boss) === | ||
* When a tank with <code>PointTemplate</code>(s) starts deploying, "OnUser4" output is fired. | |||
==== Outputs ==== | |||
{| class="wikitable" style="width: 100%;" | |||
! Output | |||
! Description | |||
|- | |||
| <code>OnStartDeploy,<none></code> | |||
| Fired when the tank is deploying the bomb | |||
|} | |||
=== Medic shield (entity_medigun_shield) === | === Medic shield (entity_medigun_shield) === | ||
==== Spawnflags ==== | |||
* '''[1]''' - Never expire, and don't block LOS | * '''[1]''' - Never expire, and don't block LOS | ||
* '''[2]''' - Spawn as LV2 Shield | * '''[2]''' - Spawn as LV2 Shield | ||
=== logic_case === | === logic_case === | ||
==== | ==== 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 99: | ||
</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 | ||
==== Menus ==== | |||
You can use $DisplayMenu input to display a menu for the player, up to 15 entries<syntaxhighlight lang="php"> | |||
==== | |||
Menu | Menu | ||
{ | { | ||
Line 303: | Line 123: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
< | ==== Inputs ==== | ||
* $FormatString <string> | |||
** Sets formatting string, then fires OnDefault output, with formatted string as parameter | |||
* $FormatStringNoFire <string> | |||
** Sets formatting string | |||
* $FormatInput1 <string> | |||
** Sets formatting input argument 1, then fires OnDefault output, with formatted string as parameter | |||
* $FormatInput2-15 <string> | |||
** Sets formatting input argument 2-15, then fires OnDefault output, with formatted string as parameter | |||
* $FormatInputNoFire1 <string> | |||
** Sets formatting input argument 1 | |||
* $Format | |||
** Fires OnDefault output, with formatted string as parameter | |||
* $TestSigsegv | |||
** Fires OnUser1 output. Can be used to test if sigsegv extension is active | |||
* $ToInt <any> | |||
** Fires OnDefault output, converts parameter value from string/float to integer | |||
* $ToFloat <any> | |||
** Fires OnDefault output, converts value from string/int to real number | |||
* $CallerToActivator <any> | |||
** Fires OnDefault output, but the !caller entity is converted to !activator | |||
* $GetKeyValueFromActivator <string> | |||
** Fires OnDefault output, the key value from the !activator entity is the parameter | |||
* $GetConVar <string> | |||
** Fires OnDefault output, the convar (console variable) number value is the parameter | |||
* $GetConVarString <string> | |||
** Fires OnDefault output, the convar (console variable) string value is the parameter | |||
*$DisplayMenu <entity> | |||
**Display menu at player | |||
*$HideMenu <entity> | |||
**Hide menu at player | |||
== tf_gamerules == | == tf_gamerules == | ||
Line 438: | Line 279: | ||
== 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_prop == | |||
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 |