Additions to existing entities: Difference between revisions

From SigMod
Jump to navigation Jump to search
No edit summary
No edit summary
 
(69 intermediate revisions by 12 users not shown)
Line 1: Line 1:
__NOEDITSECTION__
This page lists a number of additions to existing entities, including inputs, outputs, and keyvalues, as well as changes to the Input/Output system as a whole. Not to be confused with [[Custom Entities]], which are entirely new entities.
== Targeting ==
== Targeting ==


* You can target parent of specified entity by adding @p@ prefix. @p@!activator would target parent of the activator entity
* You can target parent of specified entity by adding @p@. @p@!activator would target parent of the activator entity
* You can target children of specified entity by adding @c@ prefix. @c@!activator would target children of the activator entity
* You can target children of specified entity by adding @c@ prefix. @c@!activator would target children of the activator entity
*Target all entities in a box by adding @bbxmin ymin zmin xmax ymax zmax@ prefix. @bb-100 -100 -100 100 100 100@prop_dynamic would target prop_dynamic entities inside -100 -100 -100 100 100 100 box
*Target all entities in a box by adding @bbxmin ymin zmin xmax ymax zmax@ prefix. @bb-100 -100 -100 100 100 100@prop_dynamic would target prop_dynamic entities inside -100 -100 -100 100 100 100 world coordinates box
*Target entities matching the filter by adding @f@ prefix. @f@filtername@entityname would target all entityname that pass the filtername filter
*Target entity from datamap/sendprop by adding @e@ prefix. @e@m_hOwnerEntity@!activator would target the owner entity of !activator. You can also target in array with $. @e@m_hMyWeapons$1@!activator would target secondary weapon of !activator.
 
==Various==
 
*You can execute an input immediately rather than with at least 1 tick delay by setting input delay to -1. This allows you to access !activator of $OnKilled entity
 
== [[Expressions]] ==
[[Expressions]] can be used to calculate input parameters without the need of extra logic entities
 
==point_viewcontrol==
 
=== Keyvalues ===
 
* $allowdamage <1/0>
** Should the player/s operating the camera receive damage. 0 by default
 
===Inputs ===
 
*$EnableAll
**Enable the camera for all players on the map. Spawnflag [512] may not work properly. (''Start At Player, Interruptable by Player'')
*$DisableAll
**Disable the camera for all players on the map
*$SetTarget <entity>
**Set current target to entity
 
== Sentry Gun (obj_sentrygun)==
===Spawnflags===
*'''[64]''' - Spawn as mini-sentry
 
=== Keyvalues ===
 
* $attributeoverride <1/0>
** Ignores player attributes and uses keyvalues below instead
 
*$fireratemult <float>
**Bullet fire rate multiplier
 
*$rangemult <float>
**range multiplier
*$damagemult <float>
**Damage multiplier
*$maxlevel <int>
**Maximum level
*$rapidfire <1/0>
**Allow firing every tick, rather than after every 3rd tick
*$ammomult <float>
**Ammo multiplier
*$rocketfireratemult <float>
**Rocket fire rate multiplier
*$bulletweapon <string>
**Use a specific weapon name as bullet attack, can be a custom weapon
*$rocketweapon <string>
**Use a specific weapon name as rocket attack, can be a custom weapon
*$allowplayerattributes <1/0>
**Fix for player dependent attributes not working on custom weapon
*$weaponnosound <1/0>
**Disable fire sounds of custom weapon
*$sentrymodelprefix <string>
**Sentry model prefix
**Example: models/buildables/sentry
*$projspeedmult <float>
**Sentry rocket speed multiplier
*$cannotbesapped <1/0>
**This building cannot be sapped
 
=== Outputs ===
*$OnShootBullet
**Called when the sentry shoots a bullet, the sentry is  <code>!activator</code>
*$OnShootRocket
**Called when the sentry shoots a rocket, the projectile is  <code>!activator</code>
*$OnShootWeaponBullet
**Called when the sentry shoots a bullet weapon, the projectile is <code>!activator</code>
*$OnShootWeaponRocket
**Called when the sentry shoots a rocket weapon, the projectile is  <code>!activator</code>
 
== Teleporter (obj_teleporter) ==
 
===Keyvalues===
*$TeleportWhere <string>
**Teleport bots from specified botspawn name. It is possible to add multiple TeleportWhere keys. "all" name will teleport all bots, "small" will teleport all small bots, "giants" will teleport giants and their squad
*$attributeoverride <1/0>
** Ignores player attributes and uses keyvalues below instead
*$bidirectional <1/0>
**If the teleport can be used in both directions
*$maxlevel <int>
**Maximum level
*$rechargeratemult <float>
**Recharge rate multiplier
*$speedboost <1/0>
**Apply 4s speed boost after exiting teleporter
*$teleportermodelprefix <string>
**Teleporter model prefix
**Example: models/buildables/teleporter
*$cannotbesapped <1/0>
**This building cannot be sapped
 
=== Outputs ===
*$OnTeleportReceive
**Teleport exit calls this when it receives a player, the player is  <code>!activator</code>
 
== Dispenser (obj_dispenser) ==


== Sentry Gun (obj_sentrygun) ==
===Keyvalues===


* You can spawn mini sentry by adding spawnflags 64 keyvalue
* $attributeoverride <1/0>
** Ignores player attributes and uses keyvalues below instead


== Weapon Mimic (tf_point_weapon_mimic) ==
*$radiusmult <float>
**Dispenser radius multiplier
*$maxlevel <int>
**Maximum level
*$ratemult <float>
**Dispenser provided health/ammo multiplier
*$dispensermodelprefix<string>
**Dispenser model prefix
**Example: models/buildables/dispenser
*$cannotbesapped <1/0>
**This building cannot be sapped


* Fired projectiles can have their team assigned with teamnum keyvalue (2 for RED and 3 for BLU). Previously all fired projectiles always belonged to the BLU team
==Weapon Mimic (tf_point_weapon_mimic)==
* If the player owner is set with $SetOwner or $InheritOwner, fired projectiles are assigned to the owner
*Fired projectiles can have their team assigned with teamnum keyvalue (2 for RED and 3 for BLU). Previously all fired projectiles always belonged to the BLU team
*If the player owner is set with $SetOwner or $InheritOwner, fired projectiles are assigned to the owner
* Fired stickybombs are automatically removed if the mimic is removed
* Fired stickybombs are automatically removed if the mimic is removed
* If the ParticleEffect keyvalue is set to "Callback", "OnUser4" output is activated whenever a projectile is fired, with the projectile being the !activator
*Added projectile type 4 - Bullet.  SpeedMax keyvalue determines max distance (infinite if not specified). SplashRadius determines knockback force
* Added projectile type 4 - Bullet.  SpeedMax keyvalue determines max distance (infinite if not specified). SplashRadius determines knockback force
*It is possible to mimic a specific weapon. Setting owner might be required for the weapon to function properly. Setting a mimic weapon disables all other mimic properties except crits
 
=== Keyvalues===
 
*$preventshootparent <1/0>
**If set, bullets fired from the mimic cannot hit the parent entity
*$dmgtype <int>
**Set custom damage type
*$killicon <string>
**Set custom kill icon
*$weaponname <string>
**Set mimic weapon name, custom weapon names are allowed.
**Example: The Righteous Bison
**Some weapons (flamethrowers) will not work.
**If the mimic owner is not set, some weapons (The Dragon's Fury) will crash the game, or break in other ways
*$firetime <float>
**Delay between shots for $StartFiring input
*$weaponnosound <1/0>
**If set, disables weapon fire sound
 
=== Inputs ===
 
* $AddWeaponAttribute <string>
** Adds attribute to the mimic weapon, example: projectile speed increased|2
*$RemoveWeaponAttribute <string>
** Remove attribute from the mimic weapon, example: projectile speed increased
*$StartFiring <int>
**Starts firing automatically specified number of projectiles, 1 minimum, with $firetime delay between shots
*$StopFiring
**Stops firing automatically


== Tank (tank_boss) ==
===Outputs===


* When tank starts deploying, and there is at least one PointTemplate assigned to it, "OnUser4" output is activated
*$OnFire
**Called when the projectile is being fired, with the projectile as <code>!activator</code>


== Medic shield (entity_medigun_shield) ==
===Spawnflags===
If you set spawnflags keyvalue to 1, the shield will stay if spawned manually
* '''[4]''' - Fire "OnUser4" output when projectile is fired, with the projectile as <code>!activator</code>.


== logic_case ==
== Tank (tank_boss)==
 
*When tank starts deploying, and there is at least one PointTemplate assigned to it, "OnUser4" output is activated
 
=== Inputs ===
*$SetGravity <float>
**Set tank gravity. Only for wave spawned tanks
*$SetImmobile <1/0>
**Set if the tank is immobile. Only for wave spawned tanks
*$SetOffsetZ <1/0>
**Set tank offset Z. Only for wave spawned tanks
*$SetTurnRate <1/0>
**Set tank turn rate. Only for wave spawned tanks
 
=== Outputs===
 
*$OnStartDeploy
**Fired when the tank is deploying the bomb
 
==Medic shield (entity_medigun_shield)==
===Spawnflags===
*'''[1]''' - Don't expire and don't block LOS
*'''[2]''' - Use the LV2 Shield model
 
==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.  


Example point template usage:<syntaxhighlight>
Example point template usage:<syntaxhighlight lang="php">
Case
Formatter
{
{
OnSpawnOutput
OnSpawnOutput
{
{
Target "casetest"
Target "formattest"
Action "$Format"
Action "$Format"
Delay 1
Delay 1
Line 38: Line 212:
logic_case
logic_case
{
{
"targetname" "casetest"
"targetname" "formattest"
"case16" "You have % out of % coins left. % %% done" // Formatter string
"case16" "You have % out of % coins left. % %% done" // Formatter string
"case01" "6" //First argument
"case01" "6" //First argument
Line 48: Line 222:
</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


=== Inputs ===
=== Menu===
You can use $DisplayMenu input to display a menu for the player, up to 15 entries<syntaxhighlight lang="php">
Menu
{
OnSpawnOutput
{
Target "menutest"
Action "$DisplayMenu"
Delay 1
Param "player"
}
logic_case
{
"targetname" "menutest"
"case16" "Menu title|30|Cancel" // Title, menu duration (0 for infinite), display optional cancel button
"case01" "option1" //First argument
"case02" "!disabled option" //Second argument, disabled
"case03" "suicide" //Third argument
"oncase03" "!activator,sethealth,0,0,-1" // Selected 3rd option
"ondefault" "player,$DisplayTextCenter,he,0,-1" // No option selected
}
}
</syntaxhighlight>
 
===Inputs===


* $FormatString <string>
*$FormatString <string>  
** Sets formatting string, then fires OnDefault output, with formatted string as parameter
**Sets formatting string, then fires OnDefault output, with formatted string as parameter
* $FormatStringNoFire <string>
*$FormatStringNoFire <string>
** Sets formatting string
**Sets formatting string
* $FormatInput1 <string>
*$FormatInput1 <string>
** Sets formatting input argument 1, then fires OnDefault output, with formatted string as parameter
**Sets formatting input argument 1, then fires OnDefault output, with formatted string as parameter
* $FormatInput2-15 <string>
*$FormatInput2-15 <string>
** Sets formatting input argument 2-15, then fires OnDefault output, with formatted string as parameter
** Sets formatting input argument 2-15, then fires OnDefault output, with formatted string as parameter
* $FormatInputNoFire1 <string>
*$FormatInputNoFire1 <string>
** Sets formatting input argument 1
**Sets formatting input argument 1
* $Format  
*$Format  
** Fires OnDefault output, with formatted string as parameter
**Fires OnDefault output, with formatted string as parameter
* $TestSigsegv
*$TestSigsegv
** Fires OnUser1 output. Can be used to test if sigsegv extension is active
**Fires OnUser1 output. Can be used to test if sigsegv extension is active
* $ToInt <any>
*$ToInt <any>
** Fires OnDefault output, converts parameter value from string/float to integer
**Fires OnDefault output, converts parameter value from string/float to integer
* $ToFloat <any>
*$ToFloat <any>
** Fires OnDefault output, converts value from string/int to real number
**Fires OnDefault output, converts value from string/int to real number
* $CallerToActivator <any>
*$CallerToActivator <any>
** Fires OnDefault output, but the !caller entity is converted to !activator
**Fires OnDefault output, but the !caller entity is converted to !activator
* $GetKeyValueFromActivator <string>
* $GetKeyValueFromActivator <string>
** Fires OnDefault output, the key value from the !activator entity is the parameter
**Fires OnDefault output, the key value from the !activator entity is the parameter
* $GetConVar <string>
*$GetConVar <string>
** Fires OnDefault output, the convar (console variable) number value is the parameter
**Fires OnDefault output, the convar (console variable) number value is the parameter
* $GetConVarString <string>
*$GetConVarString <string>
** Fires OnDefault output, the convar (console variable) string value is the parameter
**Fires OnDefault output, the convar (console variable) string value is the parameter
*$DisplayMenu <entity>
**Display menu at player
*$HideMenu <entity>
**Hide menu at player
*$BitTest <number>
**Fires all cases where after the bitwise AND operation between the parameter and the case value, the result is not 0


== tf_gamerules ==
* $BitTestAll <number>
** Fires all cases where after the bitwise AND operation between the parameter and the case value, the result is same as the parameter


=== Inputs ===
==tf_gamerules ==
 
===Inputs===


* $StopVO <string>
*$StopVO <string>
** Stops sound that was started with PlayVO input
** Stops sound that was started with PlayVO input


* $StopVORed <string>
*$StopVORed <string>
** Stops sound that was started with PlayVORed input
**Stops sound that was started with PlayVORed input


* $StopVOBlue <string>
*$StopVOBlue <string>
** Stops sound that was started with PlayVOBlue input
**Stops sound that was started with PlayVOBlue input
*$SetBossHealthPercentage <float>
*$SetBossHealthPercentage <float>
**Set Halloween boss bar percentage to a value between 0 and 1. 0 hides the health bar, any other value makes the bar appear
**Set Halloween boss bar percentage to a value between 0 and 1. 0 hides the health bar, any other value makes the bar appear
*$SetBossState <int>
*$SetBossState <int>
**If set to 1, makes the health bar green, like if Merasmus is hiding. If set to 0, the bar goes back to normal
**If set to 1, makes the health bar green, like if Merasmus is hiding. If set to 0, the bar goes back to normal
*$AddCurrencyGlobal <int>
**Add currency to all players
*$ChangeLevel <string>
**Changes level. To set a specific mission, type the mission name after | . Example: mvm_bigrock|advanced1


== player ==
== player ==


=== Inputs ===
===Inputs===


* $AllowClassAnimations <0|1>
* $AllowClassAnimations <0|1>  
** Allow class animations instead of using refpose when UseCustomModel input is fired to change player model
**Allow class animations instead of using refpose when UseCustomModel input is fired to change player model
* $SwitchClass <string>
*$SwitchClass <string>
** Switch player class. The parameter can be either a class name (heavyweapons for example), or class index
**Switch player class. The parameter can be either a class name (heavyweapons for example), or class index
*$SwitchClassInPlace <string>
*$SwitchClassInPlace <string>
**Switch player class in current position. The parameter can be either a class name (heavyweapons for example), or class index
**Switch player class in current position. The parameter can be either a class name (heavyweapons for example), or class index
* $ForceRespawn
*$ForceRespawn
** The player instantly respawns
** The player instantly respawns
* $ForceRespawnDead
*$ForceRespawnDead
** The player instantly respawns, but only if they are dead
**The player instantly respawns, but only if they are dead
* $DisplayTextCenter <string>
*$DisplayTextCenter <string>  
** Display text in the middle of the screen
** Display text in the middle of the screen
* $DisplayTextChat <string>
*$DisplayTextChat <string>
** Display text to the player's chat
** Display text to the player's chat
* $Suicide
*$DisplayTextHint <string>
** Kill the player
** Display yellow text in the bottom part of the screen and play a sound cue
* $ChangeAttributes <string>
*$Suicide
**Kill the player
*$ChangeAttributes <string>
** If the player is a bot, this can be used to change active EventChangeAttributes
** If the player is a bot, this can be used to change active EventChangeAttributes
* $RollCommonSpell
*$RollCommonSpell
** Roll common spell
**Roll common spell
* $SetSpell <string>
*$SetSpell <string>
** Set player current spell to one of the following:
**Set player current spell to one of the following:
*** Fireball
***Fireball
*** Ball O' Bats
***Ball O' Bats
*** Healing Aura
***Healing Aura
*** Pumpkin MIRV
***Pumpkin MIRV
*** Superjump
*** Superjump
*** Invisibility
***Invisibility
*** Teleport
***Teleport
*** Tesla Bolt
***Tesla Bolt
*** Minify
***Minify
*** Meteor Shower
***Meteor Shower
*** Summon Monoculus
***Summon Monoculus
*** Summon Skeletons
***Summon Skeletons
* $AddSpell <string>
*$AddSpell <string>
** Adds spell to the number of spells. If the spell is different than the current one, it replaces the spell. The parameter is the same as in $SetSpell
**Adds spell to the number of spells. If the spell is different than the current one, it replaces the spell. The parameter is the same as in $SetSpell
* $AddCond <int> [int]
*$AddCond <int> [int]
** Add condition to player. If a second argument is present, the condition will only run for a specified duration  
** Add condition to player. If a second argument is present, the condition will only run for a specified duration
* $RemoveCond <int>
*$RemoveCond <int>
** Remove condition from player
**Remove condition from player
* $AddPlayerAttribute <string>
*$AddPlayerAttribute <string>
** Add attribute to player, the parameter should be passed in this way: attribute|value. Example: "move speed bonus|1.2"
**Add attribute to player, the parameter should be passed in this way: attribute|value. Example: "move speed bonus|1.2"
* $RemovePlayerAttribute <string>
*$RemovePlayerAttribute <string>
** Remove attribute from player. Example: "move speed bonus"
**Remove attribute from player. Example: "move speed bonus"
* $AddItemAttribute <string>
*$GetPlayerAttribute <string>
** Add attribute to item in slot, the parameter should be passed in this way: attribute|value|slot. Example "damage bonus|2|0" adds 100% damage bonus to primary weapon
**Sends attribute from player as the parameter.
* $RemoveItemAttribute <string>
**parameter format: attribute|entity|input|default value
** Remove attribute from item in slot, the parameter should be passed in this way: attribute|slot. Example "damage bonus|0" removes damage bonus from primary weapon
**example: fire rate bonus|!activator|$DisplayTextChat|0
* $PlaySoundToSelf <string>
*$AddItemAttribute <string>
**Add attribute to item in slot, the parameter should be passed in this way: attribute|value|slot or item name. Example "damage bonus|2|0" adds 100% damage bonus to primary weapon, "damage penalty|0.5" adds 50% damage penalty to active weapon
*$RemoveItemAttribute <string>
** Remove attribute from item in slot, the parameter should be passed in this way: attribute|slot or item name. Example "damage bonus" removes damage bonus from primary weapon, "damage penalty" removes damage penalty from active weapon
*$GetItemAttribute <string>
**Sends item attribute value as the parameter.
** parameter format: slot or item name|attribute|entity|input|default value
**example to grab primary slot item's fire rate bonus value: 0|fire rate bonus|!activator|$DisplayTextChat|0
**You can also type -1 for active weapon or the item name.
*$PlaySoundToSelf <string>
** Play sound to the player
** Play sound to the player
*$IgnitePlayerDuration <float>
*$IgnitePlayerDuration <float>  
**Ignite the player for a specified duration in seconds
**Ignite the player for a specified duration in seconds
*$WeaponSwitchSlot <int>
**Forcibly switches to weapon in slot
* $WeaponStripSlot <int>
**Removes weapon from a slot (-1 = current slot)
*$GiveItem <string>
**Gives an item to the player
*$AddCurrency <int>
**Add currency to the player
*$RemoveCurrency <int>
** Remove currency from the player
*$SetCurrency <int>
** Set currency to specified value
* $CurrencyOutputX <string>
**Fires input if player currency is above specified value (the X in input name), the attribute should be passed in this way: target,input,parameter.
*$CurrencyInvertOutputX<string>
**Fires input if player currency is below specified value(the X in input name), the attribute should be passed in this way: target,input,parameter
*$DropItem <int>
**Drop item in slot (-1 = current slot)
* $RemoveItem <string>
** Remove item with a name
*$Regenerate
**Regenerate the player, as if touching resupply cabinet
*$RefillAmmo
** Restore player ammo
*$PlaySequence <string>
**Play animation sequence with specified name
*$ResetInventory
**Reset loadout items, as if touching the resupply cabinet
*$BotCommand <string>
**Forces the bot to perform an action. Examples:
***interrupt_action -posent targetmove -lookposent targetlook -duration 10 -waituntildone -ondoneattributes AfterDone -name myname
****Move to entity targetmove, while looking at entity targetlook. Wait 10 seconds after moving to the target entity, then ChangeAttributes to AfterDone, and fire $onactiondone output with myname as parameter
***interrupt_action -posent targetkill -lookposent targetkill -killlook -waituntildone -alwayslook -distance 500
****Move to entity targetkill and try to destroy it. Always look at the target even if not in sight. Only move up to 500 units away from the target
***interrupt_action -pos 0 0 0 -lookpos 100 100 100 -duration 10
****Move to position 0 0 0 while looking at position 100 100 100 for the next 10 seconds
***interrupt_action_queue -pos 0 0 0 -lookpos 100 100 100 -duration 10
****Same as above, but add the action to the queue so it is only done when the previous interrupt action finishes
***clear_interrupt_action_queue
****Clears interrupt action queue added by above command
***remove_interrupt_action_queue_name name
****Delete from interrupt action queue if name matches
***stop interrupt action
****Stops current interrupt action
***switch_action action
****switch to different action. Sometimes this may fail (such as when the bot is carrying the bomb):
*****Default
*****FetchFlag
*****EscortFlag
*****PushToCapturePoint
*****Mobber
*****Spy
*****Sniper
*****SuicideBomber
*****Idle
*****Passive
*****Medic
***despawn
****Forces to bot to despawn
***taunt
****Forces the bot to taunt
***cloak
****Forces the spy bot to cloak
***uncloak
****Forces the spy bot to uncloak
***disguise
****Forces the spy bot to disguise as something
***build sentry at nearest sentry hint
*$Taunt
**Forces the player to taunt
*$TauntFromItem <string>
**Forces the player to taunt with specified item name. Also allows to insert attributes separated by |. Example: Conga Taunt|taunt move speed|1000
*$TauntIndexConcept <string>
**Forces the player to taunt with specified index and concept. Example: 0|0
*$TauntFromItem2 <string>
**Forces the player to taunt with specified item index. Also allows to modify attack time for "taunt attack". Example: 1179|-0.5
*$AwardExtraItem <string>
**Awards extra loadout item with specified name to the player
*$AwardAndGiveExtraItem <string>
**Awards extra loadout item with specified name to the player, and equips it
*$StripExtraItem <string>
**Strips extra loadout item with specified name from the player
*$ResetExtraItems
**Strips all extra loadout items from the player
*$Stun <float>
**Stun player for specified duration in seconds
*$Slowdown <string>
**Slowdowns player by specified amount for specified duration
**Parameter format: slowdown|duration
*$SetFOV <int>
**Sets player FOV to specified amount. 0 FOV restores original fov
*$SetFOVDuration <string>
**Sets player FOV with zoom in duration and starting FOV
**Parameter format: fov|duration|start fov


== trigger_hurt ==
=== Outputs ===
 
* $OnActionDone <string>
** Called when interrupt action finishes, the string parameter is a name of the interrupt action
 
==trigger_hurt==
If entity owner is set with $SetOwner or $InheritOwner, the owner will become the damage inflictor
If entity owner is set with $SetOwner or $InheritOwner, the owner will become the damage inflictor


== Filter entities ==
==Filter entities==
The server will no longer crash if the activator entity got removed the time TestActivator is called
The server will no longer crash if the activator entity got removed the time TestActivator is called


=== Inputs ===
===Inputs===


* $TestEntity <entity>
*$TestEntity <entity>  
** Test any entity, rather than only the !activator
**Test any entity, rather than only the !activator


== Trigger entities ==
==Trigger entities==
The server will no longer crash if the caller entity got removed the time StartTouch or EndTouch is called
The server will no longer crash if the caller entity got removed the time StartTouch or EndTouch is called


=== Inputs ===
===Inputs===


* $StartTouchEntity <entity>
*$StartTouchEntity <entity>  
** StartTouch any entity, rather than only the !caller
**StartTouch any entity, rather than only the !caller
* $EndTouchEntity <entity>
*$EndTouchEntity <entity>  
** EndTouch any entity, rather than only the !caller
**EndTouch any entity, rather than only the !caller


== 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


== All entities ==
== env_entity_maker ==
 
=== Keyvalues ===
 
* $autoparent <1/0>
** When the PointTemplate template is spawned via ForceSpawnAtEntityOrigin, the template entities will be automatically parented
* $Param(name) <string>
** Sets PointTemplate template param to a specified value
 
== item_teamflag ==
 
=== Keyvalues ===
 
* $filter <entity>
** Targetname of a filter that defines if player can pick up the flag
*$disablebuffs <1/0>
**If bomb buffs should be disabled
 
=== Outputs ===
*$OnPickup
**OnPickup but with player as activator
 
*$OnDrop
**OnDrop but with player as activator
*$OnBombUpgradeLevel1
**Called when the bomb is upgraded to level 1
*$OnBombUpgradeLevel2
**Called when the bomb is upgraded to level 2
*$OnBombUpgradeLevel3
**Called when the bomb is upgraded to level 3
 
== func_flagdetectionzone ==
 
=== Keyvalues ===
 
* $filter <entity>
** Targetname of a filter that defines if flag triggers the zone
*$filterplayer <entity>
** Targetname of a filter that defines if player with flag triggers the zone
 
== point_push ==
 
=== Keyvalues ===
 
* $filter <entity>
** Targetname of a filter that defines if entity should be pushed
 
== Health kits / ammo packs ==
 
=== Keyvalues ===
 
* $ratio <float>
** Custom health/ammo restore ratio, instead of default 0.2/0.5/1
 
== point_populator_interface ==


=== Inputs ===
=== Inputs ===


* $FireUserAsActivator1-4 <string>
* $CollectCash
** Collects all dropped cash
*$FinishWave
**Finishes current wave immediately
*$FinishWaveNoUnspawnedMoney
**Finishes current wave and does not give money for unspawned bots
*$JumpToWave <int>
**Jumps to specified wave
*$JumpToWaveCalculateMoney <int>
**Jumps to specified wave and calculates wave money, without giving bonuses
*$PauseWavespawn <string>
**Pauses WaveSpawns with given name. Paused wave spawns don't consume bot slots
*$ResumeWavespawn <string>
**Resumes WaveSpawns with given name.
*$ReduceFromWavespawn$(wavespawn name) <int>
**Reduces specified amount of unspawned bots from given WaveSpawns and distributes its money
*$FinishWavespawn <string>
**Removes all unspawned bots from given WaveSpawns and distributes money
*$KillWavespawn <string>
**Removes all entities spawned by given WaveSpawns
 
==All entities ==
 
=== Keyvalues ===
 
* $modules <string>
** Comma separated list of [[Entity Modules|modules]] to attach to the entity
 
===Inputs===
 
*$FireUserAsActivator1-4 <string>
** Acts like FireUser1-4, but the entity becomes the !activator, and the parameter is passed in OnUser1-4 output
** Acts like FireUser1-4, but the entity becomes the !activator, and the parameter is passed in OnUser1-4 output
* $TakeDamage <int>
*$FireUser5-8 <string>
** Take specified amount of damage
**Fires custom $onuser5-8 output
* $TakeDamageFromActivator <int>
*$TakeDamage <int>
**Take specified amount of damage. Does not support negative values.
*$TakeDamageFromActivator <int>
** Take specified amount of damage, the !activator is the damage inflictor
** Take specified amount of damage, the !activator is the damage inflictor
* $SetModel <string>
*$SetModel <string>
** Set custom model
** Set custom model
* $SetModelOverride <string>
*$SetModelOverride <string>
** Set custom model, only changes the appearence
**Set custom model for all vision modes at once. Doesn't change the original model.
* $SetModelSpecial <string>
*$SetModelSpecial <string>
** Set custom model, in a special way, it does less additional changes to the entity
**Set custom model, in a special way, it does less additional changes to the entity
* $SetOwner <entity>
*$SetOwner <entity>
** Set entity owner
** Set entity owner
* $InheritOwner <entity>
*$ClearOwner
** Set entity owner to the passed entity owner
** Remove entity owner
* $InheritParent <entity>
*$InheritOwner <entity>  
** Set entity parent to the passed entity parent
**Set entity owner to the passed entity owner
* $GetKeyValue <string>
*$InheritParent <entity>
** Fire OnUser1 output, with key value as a parameter
**Set entity parent to the passed entity parent
* $MoveType <int>,<int>
*$GetKeyValue <string>  
** Set move type
**Fire OnUser1 output, with key value as a parameter
* $PlaySound <string>
*$MoveType <int>,<int>
** Play sound from this entity
**Set move type
* $StopSound <string>
*$PlaySound <string>
** Stop playing sound from this entity
**Play sound from this entity
* $SetLocalOrigin <vector>
*$StopSound <string>
** Set origin relative to parent
**Stop playing sound from this entity
* $SetLocalAngles <vector>
*$SetLocalOrigin <vector>
** Set angles relative to parent
**Set origin relative to parent
* $SetLocalVelocity <vector>
*$SetLocalAngles <vector>
** Set velocity relative to parent
**Set angles relative to parent
* $TeleportToEntity <entity>
*$SetLocalVelocity <vector>
** Teleport to specified entity
**Set velocity relative to parent
* $MoveRelative <vector>
*$TeleportToEntity <entity>
** Move relative to parent (world)
**Teleport to specified entity
* $RotateRelative <vector>
*$MoveRelative <vector>
** Rotate relative to parent (world)
**Move relative to parent (world)
*$RotateRelative <vector>
**Rotate relative to parent (world)
*$GetEntIndex <string>
**Triggers the input of an entity, with entity index as parameter
**parameter format: entity|input
**example: !activator|$DisplayTextCenter
*$RemoveOutput <string>
**remove outputs with given name
*$CancelPending
**Remove all pending inputs this entity is going to fire
*$SetForwardVelocity <float>
**Set forward velocity of an entity, does not work on every entity
*$FaceEntity <entity>
**Rotate the entity so that it faces the target entity
*$SetKey$(keyvalue name) <string>
**Set keyvalue to specified value
*$GetKey$(keyvalue name) <string>
**Trigger the input of an entity, with keyvalue as a parameter (default value if not found)
**example: $GetKey$startdisabled
**parameter format: entity|input|default value
**example: !activator|$DisplayTextCenter|def
*$SetVar$(variable name) <string>
**Set custom entity variable
*$GetVar$(variable name) <string>
**Trigger the input of an entity, with custom variable as set with $SetVar as a parameter (default value if not found)
**example: $GetVar$customvar
**parameter format: entity|input|default value
**parameter example: !activator|$DisplayTextCenter|def
*$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>
**Trigger the input of an entity, with datamap prop as a parameter (default value if not found)
**example: $GetData$m_szNetname
***Unlike send props, datamaps do not have arrays.
**parameter format: entity|input|default value
**parameter example: !activator|$DisplayTextCenter|def
***Default value is not required to be defined, but can be useful for debugging.
*$SetProp$([https://raw.githubusercontent.com/powerlord/tf2-data/master/netprops.txt send prop] name)[$(array)] <string>
**Set send property to specified value. Can also set arrays.
**example without array: $SetProp$m_bInUpgradeZone
***sets player state if player is visiting an upgrade station
**example with array: $SetProp$m_iAmmo$3
***sets player ammo type array to 3, which is metal carried
*$GetProp$([https://raw.githubusercontent.com/powerlord/tf2-data/master/netprops.txt send prop] name)[$(array)] <string>
**Trigger the input of an entity, with the specified send prop's value as a parameter (default value if not found)
**example without array: $GetProp$m_bInUpgradeZone
**example with an array: $GetProp$m_iAmmo$3
**parameter format: entity|input|default value
**parameter example: !activator|$DisplayTextCenter|def
***Default value is not required to be defined, but can be useful for debugging.
*$SetClientProp$([https://raw.githubusercontent.com/powerlord/tf2-data/master/netprops.txt send prop] name)[$(array)] <string>
**Set fake send prop value only seen by players. Can also set arrays. Useful for setting fake mission name or wave number, as $SetProp would trigger unwanted behavior
**example without array: $SetClientProp$m_bInUpgradeZone
***sets player state if player is visiting an upgrade station
**example with array: $SetClientProp$m_iAmmo$3
***sets player ammo type array to 3, which is metal carried
*$ResetClientProp$([https://raw.githubusercontent.com/powerlord/tf2-data/master/netprops.txt send prop] name)[$(array)]
**Reset fake prop value set by $SetClientProp
*$AddModule <string>
**Add entity [[Entity Modules|module]] by name
*$RemoveModule <string>
**Remove entity [[Entity Modules|module]] by name
*$SetCollisionFilter <entity>
**Sets custom collision filter entity. If the filter passes, the entity collides as usual, otherwise the colliding entities pass through
*$HideTo <player>
**Hides this entity to specific player
*$ShowTo <player>
**Shows previously hidden entity to specific player
*$HideToAll
**Hides this entity to all players by default
*$ShowToAll
**Shows previously hidden entity to all players
*$VScriptFunc$function <string>
**Executes a VScript function with a single parameter, equivalent to <code>runscriptcode function(param)</code> input
*$StopParticleEffects
**Stops attached particle effects, some effects are not stoppable
*$SetSolidFlags <int>
**Set solid flags
*$SetSolid <int>
**Set solid type
 
===Outputs===
 
*$OnUser5-8 <string>
**Called when $FireUser5-8 input is used
*$OnKilled
**Fired when the entity is killed (removed from the world). The calling entity no longer exist and cannot be accessed unless input delay is set to -1
*$OnDamageReceived <int>
**Fired when the entity is damaged. Parameter is the damage received by the entity. !activator is the damage inflictor
*$OnDamageBlocked <int>
**Fired when damage was blocked by the entity. Parameter is the amount of damage blocked by the entity. !activator is the damage inflictor
*$OnDeath <int>
**Fired when the entity died. Parameter is the damage of the fatal blow. !activator is the damage inflictor


[[Category:Misc Additions]]
[[Category:Misc Additions]]

Latest revision as of 10:19, 22 November 2023


This page lists a number of additions to existing entities, including inputs, outputs, and keyvalues, as well as changes to the Input/Output system as a whole. Not to be confused with Custom Entities, which are entirely new entities.

Targeting

  • You can target parent of specified entity by adding @p@. @p@!activator would target parent of the activator entity
  • You can target children of specified entity by adding @c@ prefix. @c@!activator would target children of the activator entity
  • Target all entities in a box by adding @bbxmin ymin zmin xmax ymax zmax@ prefix. @bb-100 -100 -100 100 100 100@prop_dynamic would target prop_dynamic entities inside -100 -100 -100 100 100 100 world coordinates box
  • Target entities matching the filter by adding @f@ prefix. @f@filtername@entityname would target all entityname that pass the filtername filter
  • Target entity from datamap/sendprop by adding @e@ prefix. @e@m_hOwnerEntity@!activator would target the owner entity of !activator. You can also target in array with $. @e@m_hMyWeapons$1@!activator would target secondary weapon of !activator.

Various

  • You can execute an input immediately rather than with at least 1 tick delay by setting input delay to -1. This allows you to access !activator of $OnKilled entity

Expressions

Expressions can be used to calculate input parameters without the need of extra logic entities

point_viewcontrol

Keyvalues

  • $allowdamage <1/0>
    • Should the player/s operating the camera receive damage. 0 by default

Inputs

  • $EnableAll
    • Enable the camera for all players on the map. Spawnflag [512] may not work properly. (Start At Player, Interruptable by Player)
  • $DisableAll
    • Disable the camera for all players on the map
  • $SetTarget <entity>
    • Set current target to entity

Sentry Gun (obj_sentrygun)

Spawnflags

  • [64] - Spawn as mini-sentry

Keyvalues

  • $attributeoverride <1/0>
    • Ignores player attributes and uses keyvalues below instead
  • $fireratemult <float>
    • Bullet fire rate multiplier
  • $rangemult <float>
    • range multiplier
  • $damagemult <float>
    • Damage multiplier
  • $maxlevel <int>
    • Maximum level
  • $rapidfire <1/0>
    • Allow firing every tick, rather than after every 3rd tick
  • $ammomult <float>
    • Ammo multiplier
  • $rocketfireratemult <float>
    • Rocket fire rate multiplier
  • $bulletweapon <string>
    • Use a specific weapon name as bullet attack, can be a custom weapon
  • $rocketweapon <string>
    • Use a specific weapon name as rocket attack, can be a custom weapon
  • $allowplayerattributes <1/0>
    • Fix for player dependent attributes not working on custom weapon
  • $weaponnosound <1/0>
    • Disable fire sounds of custom weapon
  • $sentrymodelprefix <string>
    • Sentry model prefix
    • Example: models/buildables/sentry
  • $projspeedmult <float>
    • Sentry rocket speed multiplier
  • $cannotbesapped <1/0>
    • This building cannot be sapped

Outputs

  • $OnShootBullet
    • Called when the sentry shoots a bullet, the sentry is !activator
  • $OnShootRocket
    • Called when the sentry shoots a rocket, the projectile is !activator
  • $OnShootWeaponBullet
    • Called when the sentry shoots a bullet weapon, the projectile is !activator
  • $OnShootWeaponRocket
    • Called when the sentry shoots a rocket weapon, the projectile is !activator

Teleporter (obj_teleporter)

Keyvalues

  • $TeleportWhere <string>
    • Teleport bots from specified botspawn name. It is possible to add multiple TeleportWhere keys. "all" name will teleport all bots, "small" will teleport all small bots, "giants" will teleport giants and their squad
  • $attributeoverride <1/0>
    • Ignores player attributes and uses keyvalues below instead
  • $bidirectional <1/0>
    • If the teleport can be used in both directions
  • $maxlevel <int>
    • Maximum level
  • $rechargeratemult <float>
    • Recharge rate multiplier
  • $speedboost <1/0>
    • Apply 4s speed boost after exiting teleporter
  • $teleportermodelprefix <string>
    • Teleporter model prefix
    • Example: models/buildables/teleporter
  • $cannotbesapped <1/0>
    • This building cannot be sapped

Outputs

  • $OnTeleportReceive
    • Teleport exit calls this when it receives a player, the player is !activator

Dispenser (obj_dispenser)

Keyvalues

  • $attributeoverride <1/0>
    • Ignores player attributes and uses keyvalues below instead
  • $radiusmult <float>
    • Dispenser radius multiplier
  • $maxlevel <int>
    • Maximum level
  • $ratemult <float>
    • Dispenser provided health/ammo multiplier
  • $dispensermodelprefix<string>
    • Dispenser model prefix
    • Example: models/buildables/dispenser
  • $cannotbesapped <1/0>
    • This building cannot be sapped

Weapon Mimic (tf_point_weapon_mimic)

  • Fired projectiles can have their team assigned with teamnum keyvalue (2 for RED and 3 for BLU). Previously all fired projectiles always belonged to the BLU team
  • If the player owner is set with $SetOwner or $InheritOwner, fired projectiles are assigned to the owner
  • Fired stickybombs are automatically removed if the mimic is removed
  • Added projectile type 4 - Bullet. SpeedMax keyvalue determines max distance (infinite if not specified). SplashRadius determines knockback force
  • It is possible to mimic a specific weapon. Setting owner might be required for the weapon to function properly. Setting a mimic weapon disables all other mimic properties except crits

Keyvalues

  • $preventshootparent <1/0>
    • If set, bullets fired from the mimic cannot hit the parent entity
  • $dmgtype <int>
    • Set custom damage type
  • $killicon <string>
    • Set custom kill icon
  • $weaponname <string>
    • Set mimic weapon name, custom weapon names are allowed.
    • Example: The Righteous Bison
    • Some weapons (flamethrowers) will not work.
    • If the mimic owner is not set, some weapons (The Dragon's Fury) will crash the game, or break in other ways
  • $firetime <float>
    • Delay between shots for $StartFiring input
  • $weaponnosound <1/0>
    • If set, disables weapon fire sound

Inputs

  • $AddWeaponAttribute <string>
    • Adds attribute to the mimic weapon, example: projectile speed increased|2
  • $RemoveWeaponAttribute <string>
    • Remove attribute from the mimic weapon, example: projectile speed increased
  • $StartFiring <int>
    • Starts firing automatically specified number of projectiles, 1 minimum, with $firetime delay between shots
  • $StopFiring
    • Stops firing automatically

Outputs

  • $OnFire
    • Called when the projectile is being fired, with the projectile as !activator

Spawnflags

  • [4] - Fire "OnUser4" output when projectile is fired, with the projectile as !activator.

Tank (tank_boss)

  • When tank starts deploying, and there is at least one PointTemplate assigned to it, "OnUser4" output is activated

Inputs

  • $SetGravity <float>
    • Set tank gravity. Only for wave spawned tanks
  • $SetImmobile <1/0>
    • Set if the tank is immobile. Only for wave spawned tanks
  • $SetOffsetZ <1/0>
    • Set tank offset Z. Only for wave spawned tanks
  • $SetTurnRate <1/0>
    • Set tank turn rate. Only for wave spawned tanks

Outputs

  • $OnStartDeploy
    • Fired when the tank is deploying the bomb

Medic shield (entity_medigun_shield)

Spawnflags

  • [1] - Don't expire and don't block LOS
  • [2] - Use the LV2 Shield model

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.

Example point template usage:

Formatter
{
	OnSpawnOutput
	{
		Target "formattest"
		Action "$Format"
		Delay 1
	}
	logic_case
	{
		"targetname" "formattest"
		"case16" "You have % out of % coins left. % %% done" // Formatter string
		"case01" "6" //First argument
		"case02" "12" //Second argument
		"case03" "50" //Third argument
		"ondefault" "player,$DisplayTextCenter,,0,-1"
	}
}

This would display "You have 6 out of 12 coins left. 50 % done" to all players

Menu

You can use $DisplayMenu input to display a menu for the player, up to 15 entries

Menu
{
	OnSpawnOutput
	{
		Target "menutest"
		Action "$DisplayMenu"
		Delay 1
		Param "player"
	}
	logic_case
	{
		"targetname" "menutest"
		"case16" "Menu title|30|Cancel" // Title, menu duration (0 for infinite), display optional cancel button
		"case01" "option1" //First argument
		"case02" "!disabled option" //Second argument, disabled
		"case03" "suicide" //Third argument
		"oncase03" "!activator,sethealth,0,0,-1" // Selected 3rd option
		"ondefault" "player,$DisplayTextCenter,he,0,-1" // No option selected
	}
}

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
  • $BitTest <number>
    • Fires all cases where after the bitwise AND operation between the parameter and the case value, the result is not 0
  • $BitTestAll <number>
    • Fires all cases where after the bitwise AND operation between the parameter and the case value, the result is same as the parameter

tf_gamerules

Inputs

  • $StopVO <string>
    • Stops sound that was started with PlayVO input
  • $StopVORed <string>
    • Stops sound that was started with PlayVORed input
  • $StopVOBlue <string>
    • Stops sound that was started with PlayVOBlue input
  • $SetBossHealthPercentage <float>
    • Set Halloween boss bar percentage to a value between 0 and 1. 0 hides the health bar, any other value makes the bar appear
  • $SetBossState <int>
    • If set to 1, makes the health bar green, like if Merasmus is hiding. If set to 0, the bar goes back to normal
  • $AddCurrencyGlobal <int>
    • Add currency to all players
  • $ChangeLevel <string>
    • Changes level. To set a specific mission, type the mission name after | . Example: mvm_bigrock|advanced1

player

Inputs

  • $AllowClassAnimations <0|1>
    • Allow class animations instead of using refpose when UseCustomModel input is fired to change player model
  • $SwitchClass <string>
    • Switch player class. The parameter can be either a class name (heavyweapons for example), or class index
  • $SwitchClassInPlace <string>
    • Switch player class in current position. The parameter can be either a class name (heavyweapons for example), or class index
  • $ForceRespawn
    • The player instantly respawns
  • $ForceRespawnDead
    • The player instantly respawns, but only if they are dead
  • $DisplayTextCenter <string>
    • Display text in the middle of the screen
  • $DisplayTextChat <string>
    • Display text to the player's chat
  • $DisplayTextHint <string>
    • Display yellow text in the bottom part of the screen and play a sound cue
  • $Suicide
    • Kill the player
  • $ChangeAttributes <string>
    • If the player is a bot, this can be used to change active EventChangeAttributes
  • $RollCommonSpell
    • Roll common spell
  • $SetSpell <string>
    • Set player current spell to one of the following:
      • Fireball
      • Ball O' Bats
      • Healing Aura
      • Pumpkin MIRV
      • Superjump
      • Invisibility
      • Teleport
      • Tesla Bolt
      • Minify
      • Meteor Shower
      • Summon Monoculus
      • Summon Skeletons
  • $AddSpell <string>
    • Adds spell to the number of spells. If the spell is different than the current one, it replaces the spell. The parameter is the same as in $SetSpell
  • $AddCond <int> [int]
    • Add condition to player. If a second argument is present, the condition will only run for a specified duration
  • $RemoveCond <int>
    • Remove condition from player
  • $AddPlayerAttribute <string>
    • Add attribute to player, the parameter should be passed in this way: attribute|value. Example: "move speed bonus|1.2"
  • $RemovePlayerAttribute <string>
    • Remove attribute from player. Example: "move speed bonus"
  • $GetPlayerAttribute <string>
    • Sends attribute from player as the parameter.
    • parameter format: attribute|entity|input|default value
    • example: fire rate bonus|!activator|$DisplayTextChat|0
  • $AddItemAttribute <string>
    • Add attribute to item in slot, the parameter should be passed in this way: attribute|value|slot or item name. Example "damage bonus|2|0" adds 100% damage bonus to primary weapon, "damage penalty|0.5" adds 50% damage penalty to active weapon
  • $RemoveItemAttribute <string>
    • Remove attribute from item in slot, the parameter should be passed in this way: attribute|slot or item name. Example "damage bonus" removes damage bonus from primary weapon, "damage penalty" removes damage penalty from active weapon
  • $GetItemAttribute <string>
    • Sends item attribute value as the parameter.
    • parameter format: slot or item name|attribute|entity|input|default value
    • example to grab primary slot item's fire rate bonus value: 0|fire rate bonus|!activator|$DisplayTextChat|0
    • You can also type -1 for active weapon or the item name.
  • $PlaySoundToSelf <string>
    • Play sound to the player
  • $IgnitePlayerDuration <float>
    • Ignite the player for a specified duration in seconds
  • $WeaponSwitchSlot <int>
    • Forcibly switches to weapon in slot
  • $WeaponStripSlot <int>
    • Removes weapon from a slot (-1 = current slot)
  • $GiveItem <string>
    • Gives an item to the player
  • $AddCurrency <int>
    • Add currency to the player
  • $RemoveCurrency <int>
    • Remove currency from the player
  • $SetCurrency <int>
    • Set currency to specified value
  • $CurrencyOutputX <string>
    • Fires input if player currency is above specified value (the X in input name), the attribute should be passed in this way: target,input,parameter.
  • $CurrencyInvertOutputX<string>
    • Fires input if player currency is below specified value(the X in input name), the attribute should be passed in this way: target,input,parameter
  • $DropItem <int>
    • Drop item in slot (-1 = current slot)
  • $RemoveItem <string>
    • Remove item with a name
  • $Regenerate
    • Regenerate the player, as if touching resupply cabinet
  • $RefillAmmo
    • Restore player ammo
  • $PlaySequence <string>
    • Play animation sequence with specified name
  • $ResetInventory
    • Reset loadout items, as if touching the resupply cabinet
  • $BotCommand <string>
    • Forces the bot to perform an action. Examples:
      • interrupt_action -posent targetmove -lookposent targetlook -duration 10 -waituntildone -ondoneattributes AfterDone -name myname
        • Move to entity targetmove, while looking at entity targetlook. Wait 10 seconds after moving to the target entity, then ChangeAttributes to AfterDone, and fire $onactiondone output with myname as parameter
      • interrupt_action -posent targetkill -lookposent targetkill -killlook -waituntildone -alwayslook -distance 500
        • Move to entity targetkill and try to destroy it. Always look at the target even if not in sight. Only move up to 500 units away from the target
      • interrupt_action -pos 0 0 0 -lookpos 100 100 100 -duration 10
        • Move to position 0 0 0 while looking at position 100 100 100 for the next 10 seconds
      • interrupt_action_queue -pos 0 0 0 -lookpos 100 100 100 -duration 10
        • Same as above, but add the action to the queue so it is only done when the previous interrupt action finishes
      • clear_interrupt_action_queue
        • Clears interrupt action queue added by above command
      • remove_interrupt_action_queue_name name
        • Delete from interrupt action queue if name matches
      • stop interrupt action
        • Stops current interrupt action
      • switch_action action
        • switch to different action. Sometimes this may fail (such as when the bot is carrying the bomb):
          • Default
          • FetchFlag
          • EscortFlag
          • PushToCapturePoint
          • Mobber
          • Spy
          • Sniper
          • SuicideBomber
          • Idle
          • Passive
          • Medic
      • despawn
        • Forces to bot to despawn
      • taunt
        • Forces the bot to taunt
      • cloak
        • Forces the spy bot to cloak
      • uncloak
        • Forces the spy bot to uncloak
      • disguise
        • Forces the spy bot to disguise as something
      • build sentry at nearest sentry hint
  • $Taunt
    • Forces the player to taunt
  • $TauntFromItem <string>
    • Forces the player to taunt with specified item name. Also allows to insert attributes separated by |. Example: Conga Taunt|taunt move speed|1000
  • $TauntIndexConcept <string>
    • Forces the player to taunt with specified index and concept. Example: 0|0
  • $TauntFromItem2 <string>
    • Forces the player to taunt with specified item index. Also allows to modify attack time for "taunt attack". Example: 1179|-0.5
  • $AwardExtraItem <string>
    • Awards extra loadout item with specified name to the player
  • $AwardAndGiveExtraItem <string>
    • Awards extra loadout item with specified name to the player, and equips it
  • $StripExtraItem <string>
    • Strips extra loadout item with specified name from the player
  • $ResetExtraItems
    • Strips all extra loadout items from the player
  • $Stun <float>
    • Stun player for specified duration in seconds
  • $Slowdown <string>
    • Slowdowns player by specified amount for specified duration
    • Parameter format: slowdown|duration
  • $SetFOV <int>
    • Sets player FOV to specified amount. 0 FOV restores original fov
  • $SetFOVDuration <string>
    • Sets player FOV with zoom in duration and starting FOV
    • Parameter format: fov|duration|start fov

Outputs

  • $OnActionDone <string>
    • Called when interrupt action finishes, the string parameter is a name of the interrupt action

trigger_hurt

If entity owner is set with $SetOwner or $InheritOwner, the owner will become the damage inflictor

Filter entities

The server will no longer crash if the activator entity got removed the time TestActivator is called

Inputs

  • $TestEntity <entity>
    • Test any entity, rather than only the !activator

Trigger entities

The server will no longer crash if the caller entity got removed the time StartTouch or EndTouch is called

Inputs

  • $StartTouchEntity <entity>
    • StartTouch any entity, rather than only the !caller
  • $EndTouchEntity <entity>
    • EndTouch any entity, rather than only the !caller

game_ui

The server will no longer crash if the player using the entity disconnected from the server

env_entity_maker

Keyvalues

  • $autoparent <1/0>
    • When the PointTemplate template is spawned via ForceSpawnAtEntityOrigin, the template entities will be automatically parented
  • $Param(name) <string>
    • Sets PointTemplate template param to a specified value

item_teamflag

Keyvalues

  • $filter <entity>
    • Targetname of a filter that defines if player can pick up the flag
  • $disablebuffs <1/0>
    • If bomb buffs should be disabled

Outputs

  • $OnPickup
    • OnPickup but with player as activator
  • $OnDrop
    • OnDrop but with player as activator
  • $OnBombUpgradeLevel1
    • Called when the bomb is upgraded to level 1
  • $OnBombUpgradeLevel2
    • Called when the bomb is upgraded to level 2
  • $OnBombUpgradeLevel3
    • Called when the bomb is upgraded to level 3

func_flagdetectionzone

Keyvalues

  • $filter <entity>
    • Targetname of a filter that defines if flag triggers the zone
  • $filterplayer <entity>
    • Targetname of a filter that defines if player with flag triggers the zone

point_push

Keyvalues

  • $filter <entity>
    • Targetname of a filter that defines if entity should be pushed

Health kits / ammo packs

Keyvalues

  • $ratio <float>
    • Custom health/ammo restore ratio, instead of default 0.2/0.5/1

point_populator_interface

Inputs

  • $CollectCash
    • Collects all dropped cash
  • $FinishWave
    • Finishes current wave immediately
  • $FinishWaveNoUnspawnedMoney
    • Finishes current wave and does not give money for unspawned bots
  • $JumpToWave <int>
    • Jumps to specified wave
  • $JumpToWaveCalculateMoney <int>
    • Jumps to specified wave and calculates wave money, without giving bonuses
  • $PauseWavespawn <string>
    • Pauses WaveSpawns with given name. Paused wave spawns don't consume bot slots
  • $ResumeWavespawn <string>
    • Resumes WaveSpawns with given name.
  • $ReduceFromWavespawn$(wavespawn name) <int>
    • Reduces specified amount of unspawned bots from given WaveSpawns and distributes its money
  • $FinishWavespawn <string>
    • Removes all unspawned bots from given WaveSpawns and distributes money
  • $KillWavespawn <string>
    • Removes all entities spawned by given WaveSpawns

All entities

Keyvalues

  • $modules <string>
    • Comma separated list of modules to attach to the entity

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. Does not support negative values.
  • $TakeDamageFromActivator <int>
    • Take specified amount of damage, the !activator is the damage inflictor
  • $SetModel <string>
    • Set custom model
  • $SetModelOverride <string>
    • Set custom model for all vision modes at once. Doesn't change the original model.
  • $SetModelSpecial <string>
    • Set custom model, in a special way, it does less additional changes to the entity
  • $SetOwner <entity>
    • Set entity owner
  • $ClearOwner
    • Remove 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)
  • $GetEntIndex <string>
    • Triggers the input of an entity, with entity index as parameter
    • parameter format: entity|input
    • example: !activator|$DisplayTextCenter
  • $RemoveOutput <string>
    • remove outputs with given name
  • $CancelPending
    • Remove all pending inputs this entity is going to fire
  • $SetForwardVelocity <float>
    • Set forward velocity of an entity, does not work on every entity
  • $FaceEntity <entity>
    • Rotate the entity so that it faces the target entity
  • $SetKey$(keyvalue name) <string>
    • Set keyvalue to specified value
  • $GetKey$(keyvalue name) <string>
    • Trigger the input of an entity, with keyvalue as a parameter (default value if not found)
    • example: $GetKey$startdisabled
    • parameter format: entity|input|default value
    • example: !activator|$DisplayTextCenter|def
  • $SetVar$(variable name) <string>
    • Set custom entity variable
  • $GetVar$(variable name) <string>
    • Trigger the input of an entity, with custom variable as set with $SetVar as a parameter (default value if not found)
    • example: $GetVar$customvar
    • parameter format: entity|input|default value
    • parameter example: !activator|$DisplayTextCenter|def
  • $SetData$(datamap prop name) <string>
    • Set datamap property to specified value
  • $GetData$(datamap prop name) <string>
    • Trigger the input of an entity, with datamap prop as a parameter (default value if not found)
    • example: $GetData$m_szNetname
      • Unlike send props, datamaps do not have arrays.
    • parameter format: entity|input|default value
    • parameter example: !activator|$DisplayTextCenter|def
      • Default value is not required to be defined, but can be useful for debugging.
  • $SetProp$(send prop name)[$(array)] <string>
    • Set send property to specified value. Can also set arrays.
    • example without array: $SetProp$m_bInUpgradeZone
      • sets player state if player is visiting an upgrade station
    • example with array: $SetProp$m_iAmmo$3
      • sets player ammo type array to 3, which is metal carried
  • $GetProp$(send prop name)[$(array)] <string>
    • Trigger the input of an entity, with the specified send prop's value as a parameter (default value if not found)
    • example without array: $GetProp$m_bInUpgradeZone
    • example with an array: $GetProp$m_iAmmo$3
    • parameter format: entity|input|default value
    • parameter example: !activator|$DisplayTextCenter|def
      • Default value is not required to be defined, but can be useful for debugging.
  • $SetClientProp$(send prop name)[$(array)] <string>
    • Set fake send prop value only seen by players. Can also set arrays. Useful for setting fake mission name or wave number, as $SetProp would trigger unwanted behavior
    • example without array: $SetClientProp$m_bInUpgradeZone
      • sets player state if player is visiting an upgrade station
    • example with array: $SetClientProp$m_iAmmo$3
      • sets player ammo type array to 3, which is metal carried
  • $ResetClientProp$(send prop name)[$(array)]
    • Reset fake prop value set by $SetClientProp
  • $AddModule <string>
  • $RemoveModule <string>
  • $SetCollisionFilter <entity>
    • Sets custom collision filter entity. If the filter passes, the entity collides as usual, otherwise the colliding entities pass through
  • $HideTo <player>
    • Hides this entity to specific player
  • $ShowTo <player>
    • Shows previously hidden entity to specific player
  • $HideToAll
    • Hides this entity to all players by default
  • $ShowToAll
    • Shows previously hidden entity to all players
  • $VScriptFunc$function <string>
    • Executes a VScript function with a single parameter, equivalent to runscriptcode function(param) input
  • $StopParticleEffects
    • Stops attached particle effects, some effects are not stoppable
  • $SetSolidFlags <int>
    • Set solid flags
  • $SetSolid <int>
    • Set solid type

Outputs

  • $OnUser5-8 <string>
    • Called when $FireUser5-8 input is used
  • $OnKilled
    • Fired when the entity is killed (removed from the world). The calling entity no longer exist and cannot be accessed unless input delay is set to -1
  • $OnDamageReceived <int>
    • Fired when the entity is damaged. Parameter is the damage received by the entity. !activator is the damage inflictor
  • $OnDamageBlocked <int>
    • Fired when damage was blocked by the entity. Parameter is the amount of damage blocked by the entity. !activator is the damage inflictor
  • $OnDeath <int>
    • Fired when the entity died. Parameter is the damage of the fatal blow. !activator is the damage inflictor