Custom Entities
$tf_bot_spawn
Tries to spawn a tf_bot with given TFBot keyvalues at its location. If spawning succeds, deletes itself, otherwise tries again next tick. Uses the robot player pool, and is affected by RobotLimit keyvalue. The spawned bot inherits this entity targetname, all its custom outputs and variables, teamnum, angles, velocity. If this entity is parented, the spawned player will be fake parented to this entity parent.
Inputs
- $Spawn
- Spawns a bot, used when manual bot spawning is enabled.
Keyvalues
- =(keyvalue) <value>
- Sets a TFBot spawner keyvalue. Only simple key value pairs are allowed
- $spawnlimit <int>
- A maximum number of bots spawned from $tf_bot_spawn entities active at one. By default there is no limit
- $spawnlimitname <string>
- If set, $spawnlimit only counts bots spawned by $tf_bot_spawn entities, that also have the same spawn limit name
- $spawnlimitaction <string>
- What to do when a $spawnlimit is reached. By default, the additional bot refuses to spawn. Possible values:
- killoldest - Kills the oldest bot spawned by $tf_bot_spawn
- specoldest - Send the oldest bot spawned by $tf_bot_spawn to spectator team
- What to do when a $spawnlimit is reached. By default, the additional bot refuses to spawn. Possible values:
- $disallowspawnstuck <1/0> (Default: 0)
- Prevent the bot from being spawned if there is no room for the spawned bot
- $nospawnbetwenenwaves <1/0> (Default: 0)
- Prevent the bot from being spawned if the wave is not running
- $failspawnnoretry <1/0> (Default: 0)
- If spawning fails, remove itself
- $manualspawn <1/0> (Default: 0)
- Do not spawn a bot automatically, require $Spawn input to spawn a bot
Output
- $onbotspawn
- Called when the bot is spawned. The spawned bot is the !activator
- $onbotspawnfail
- Called every time this entity fails to spawn a bot
$tf_bot
Creates a new tf_bot with given TFBot keyvalues directly, if player limit is not reached. The classname is changed to player after spawning. Inherits all player Inputs/Outputs. The bot is kicked when the entity is removed
Keyvalues
- =(keyvalue) <value>
- Sets a TFBot spawner keyvalue. Only simple key value pairs are allowed
- $kickafterdeathdelay <float>
- Kicks the bot after specified delay. If the bot is not kicked after death, it will be send to spectator and used in a robot player pool
$func_block_los
Blocks line of sight
Keyvalues
- $filter <string>
- Name of a filter that allows for blocking vision of specific bots
$trigger_detector
Checks for entities inside the trigger and the radius (if specified). The closest entity to the origin inside the trigger is marked as target. Shares inputs and outputs with trigger_multiple
Keyvalues
- $checklineofsight <1/0> (Default: 0)
- Should the line of sight between the detector origin and the target be clear.
- $radius <number> (Default: 65000)
- Maximum distance between the the detector origin and the target
- $fov <number> (Default: 180)
- If set, only detect entities in field of view angle defined in degrees
- $keeptarget <1/0> (Default: 0)
- Should the detector keep targeting the entity as long as it remains in range, even if there is another closer suitable target
Inputs
- $TargetTest
- Check if there is a detectable entity inside the the detector
Outputs
- $OnNewTarget
- Fired when a new target is being found. The new target is the !activator
- $OnLostTarget
- Fired when the target is no longer in range, or a new target is being choosen. The lost target is the !activator
- $OnLostTargetAll
- Fired when there are no more targets in range
- $TargetTestPass
- Fired after $TargetTest input if there is an entity in range currently detected by the detector. The detected entity is the !activator
- $TargetTestFail
- Fired after $TargetTest input if there are no entities in range detected by the detector
$weapon_spawner
Spawns dropped weapons
Keyvalues
- $item <string>
- Name of the item to spawn
- $nomotion <1/0> (Default: 0)
- Spawn items without gravity
- $ammo <number> (Default: -1)
- Spawn with this much ammo
- $clip <number> (Default: -1)
- Spawn with this much ammo in the clip
- $energy <number>
- Spawn with custom amount of energy in (0-1) range
- $charge <number>
- Spawn with custom medigun charge amount in (0-1) range
- $lifetime <number> (Default: 30)
- Lifetime of the dropped weapon in seconds
Inputs
- $DropWeapon
- Drop weapon
Outputs
- $OnPickup
- Fired when a player picks up the weapon. The player is the !activator
$entity_spawn_detector
Detects if an entity with a specified classname had spawned
Keyvalues
- $name <string>
- Name of the classname to check
Outputs
- $OnEntitySpawned
- Fired when an entity with the specified classname spawns. The spawned entity is the !activator
$filter_keyvalue
Custom filter that lets you filter entities matching the key value. Shares inputs with 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. 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 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. 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 datamap prop. Shares inputs with 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. 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 send prop. Shares inputs with 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. Should only be set for numeric values.
- Possible values:
- equal
- less than
- greater than
- less than or equal
- greater than or equal
$filter_proximity
Custom filter that lets you filter entities by proximity to the target entity
Keyvalues
- $target <string>
- Name of the target entity, or coordinates in x y z format
- $range <number>
- Maximum distance to pass the filter
$filter_bbox
Custom filter that lets you filter entities inside a bounding box
Keyvalues
- $target <string>
- Name of the target entity or coordinates in x y z format
- $min <vector>
- the negative box bounds in x y z format
- $max <vector>
- the positive box bounds in x y z format
$filter_itemname
Custom damage filter that filters damage by the weapon item name and others
Keyvalues
- $item <string>
- Name of the weapon to filter against
- $type <string>
- What to test against. Possible values:
- ItemName (default)
- Classname
- SimilarToItem
- ItemSlot
- DefIndex
- What to test against. Possible values:
$filter_specialdamagetype
Custom damage filter that filters damage by the existence of "special damage type" attribute of the weapon
Keyvalues
- $type <number>
- Number of the special damage type required to pass the trigger
$script_manager
Executes lua scripts. single $script_manager entity with targetname popscript is created when a mission includes lua code. When created manually, this entity persists after map reset, and executes scripts after spawn
Keyvalues
- $scriptfile <string>
- Script files separated by comma to be executed when this entity spawns
- $scrips <string>
- Script to be executed when this entity spawns
Inputs
- $ExecuteScript <string>
- Executes script provided in the string
- $ExecuteFile <string>
- Executes script file
- $<function name> <any>
- Calls a named global function with parameters: provided value, activator, caller
$bot_npc
Customizable npc bot that does not consume bot slots
Keyvalues
- $class <string>
- Mimic a given player class (sniper by default)
- $movespeed <float>
- $duckmovespeed <float>
- $acceleration <float>
- $deceleration <float>
- $jumpheight <float>
- $gravity <float>
- $skill <easy/normal/hard/expert>
- $aimtrackinginterval <float>
- $aimleadtime <float>
- $headrotatespeed <float>
- $autojumpmintime <float>
- $autojumpmaxtime <float>
- $forceduck <1/0>
- $forceshoot <1/0>
- $disableshoot <1/0>
- $freeze <1/0>
- $ignoreenemies <1/0>
- $dodge <1/0>
- $notsolidtoplayers <1/0>
- $ignoreclips <1/0>
- $allowtakefriendlyfire <1/0>
- $handattackdamage <float>
- $handattacktime <float>
- $handattackrange <float>
- $handattacksize <float>
- $handattackforce <float>
- $handattacksmacktime <float>
- $handattackcleave <1/0>
- $handattackicon <string>
- $handattacksound <string>
- $handattacksoundmiss <string>
- $crits <1/0>
- $hurtsound <1/0>
- $deathsound <string>
- $nofootsteps <1/0>
- $footstepsound <string>
- $waituntilfullreload <1/0>
- $deatheffecttype <gib/ragdoll/default/none>
- $robot <1/0>
- $zombie <1/0>
- $giant <1/0>
- $model <string>
- $useplayercollisionbounds <1/0>
Inputs
- $GiveWeapon <string/entity>
- Give item with given name, or give item entity directly
- $RemoveWeapon <string/entity>
- Remove item with given name, or give item entity directly
- $RemoveAllWeapons
- $SetHealth
- $SetMaxHealth
- $StartActivity <string>
- $StartSequence <string>
- $AddGestureActivity <string>
- $RestartGestureActivity <string>
- $AddGestureSequence <string>
- $RemoveGesture <string>
- $RemoveAllGesture
- $StopActivityOrSequence
- $SwitchClass <string>
- $BotCommand <string>