Editing Custom Entities

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 1: Line 1:
== $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 [[Entity Modules|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
*$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 ==
== $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 [https://developer.valvesoftware.com/wiki/Trigger_multiple trigger_multiple]
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 [https://developer.valvesoftware.com/wiki/Trigger_multiple trigger_multiple]
Line 96: Line 44:
*$charge <number>
*$charge <number>
**Spawn with custom medigun charge amount in (0-1) range
**Spawn with custom medigun charge amount in (0-1) range
*$lifetime <number> (Default: 30)
**Lifetime of the dropped weapon in seconds


=== Inputs ===
=== Inputs ===
Line 129: Line 75:
**Value to compare against
**Value to compare against
*$compare <string>
*$compare <string>
**The condition for passing the filter. Should only be set for numeric values.
**The condition for passing the filter (default: equal). Should only be set for numeric values
**Possible values:
**Possible values:
***equal
***equal
Line 144: Line 90:
**Value to compare against
**Value to compare against
*$compare <string>
*$compare <string>
**The condition for passing the filter. Should only be set for numeric values.
**The condition for passing the filter (default: equal). Should only be set for numeric values
**Possible values:
**Possible values:
***equal
***equal
Line 159: Line 105:
**Value to compare against
**Value to compare against
*$compare <string>
*$compare <string>
**The condition for passing the filter. Should only be set for numeric values.
**The condition for passing the filter (default: equal). Should only be set for numeric values
**Possible values:
**Possible values:
***equal
***equal
Line 174: Line 120:
**Value to compare against
**Value to compare against
*$compare <string>
*$compare <string>
**The condition for passing the filter. Should only be set for numeric values.
**The condition for passing the filter (default: equal). Should only be set for numeric values
**Possible values:
**Possible values:
***equal
***equal
Line 201: Line 147:


== $filter_itemname ==
== $filter_itemname ==
Custom damage filter that filters damage by the weapon item name and others
Custom damage filter that filters damage by the weapon item name
===Keyvalues===
===Keyvalues===
*$item <string>
*$item <string>
**Name of the weapon to filter against
**Name of the weapon to filter against
*$type <string>
**What to test against. Possible values:
***ItemName (default)
***Classname
***SimilarToItem
***ItemSlot
***DefIndex


== $filter_specialdamagetype ==
== $filter_specialdamagetype ==
Line 218: Line 157:
*$type <number>
*$type <number>
**Number of the special damage type required to pass the trigger
**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>
[[Category:Misc Additions]]
[[Category:Misc Additions]]
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)