From Valve Developer Community
Jump to: navigation, search
Tank falling through a grating (gif, needs to be opened to show)

<Team Fortress 2> tank_boss is a point entity available in Team Fortress 2.

Bug.png Bug: If there are no path_tracks present in the map, the game will crash.
Bug.png Bug: Tanks pass through any walls with a transparent texture (grates, glass, etc.) or tool textures but not tools/toolsblack, tools/toolsnodraw and tools/toolsskybox. Tying the wall into an entity doesn't prevent this. (Except for func_detail.)
The MvM tank.

Entity description

The tank deploying its bomb at the hatch.

The tank used in Mann vs Machine missions. When spawned in by a popfile, it will start at the path_track entity specified by the popfile and continue until it reaches the end of the path, where it will deploy the bomb. When destroyed, it creates a tank_destruction entity.

Note.png Note: When spawned using ent_create, the tank will attempt to travel in a straight line toward the bomb hatch from the point it was spawned at.


Health <integer>
Health of the tank.
Model <string>
Model the tank uses.
Speed <integer>
Speed the tank travels at, higher speeds can cause the tank to clip through geometry.
Start Disabled <boolean>
Start disabled.
TeamNum <choices>


Name (targetname) <string>
The targetname that other entities refer to this entity by.
Entity Scripts (vscripts) <scriptlist> (in all games since <Left 4 Dead 2>)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
Script think function (thinkfunction) <string> (in all games since <Left 4 Dead 2>)
Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call.
Note.png Note: Try to avoid expensive operations in this function, as it may cause performance problems.


Start Fade Dist (fademindist) <float>
Distance at which the prop starts to fade.
End Fade Dist (fademaxdist) <float>
Max fade distance at which the prop is visible.
  • If start fade is <0, the prop will disappear instantly when end fade is hit.
  • If end fade is <0, the prop won't disappear at all. (This is the default behaviour.)
The values will scale appropriately if the prop is in a 3D Skybox.
Fade Scale (fadescale) <float>
If you specify so in worldspawn, or if the engine is running below DirectX 8 (DX7 in Ep1), props will fade out even if the fade distances above aren't specified. This value gives you some control over when this happens: numbers smaller than 1 cause the prop to fade out at further distances, and greater than 1 cause it to fade out at closer distances. Using 0 turns off the forced fade altogether. See also the QC command $noforcedfade.


Set the speed of the tank. Must be a positive value.
Note.png Note: High values will cause the tank to have difficulties navigating the path_tracks.
Set the tank's health.
Set the tank's max health.
Add health to the tank.
Remove health from the tank.
Bug.png Bug: Changes to the tank's health will not be reflected in the HUD until the tank is damaged by a player.
Destructs the tank if it reached its final path_track node.
Sets the tank's destruction animation name's postfix. Can be used for these destruction animations.
SetTeam <integer>
Changes the entity's team.
0: Any
2: Red
3: Blue
Ignite, burst into flames.
IgniteLifetime <float>
Ignite with the given lifetime. To do: Before the flames extinguish, or before health reaches zero?
IgniteNumHitboxFires <integer>
Ignite with the given number of hitbox fires.
IgniteHitboxFireScale <float>
Ignite with the given hitbox fire scale.


Removes this entity from the world.
Removes this entity and its children from the world.
Note.png Note: Entities already remove orphaned children upon being removed, but this input removes all children on the same frame, being marginally faster than Kill.
AddOutput <string>
Adds a keyvalue/output to this entity. It can be potentially very dangerous, use with care.
KV Format: <key> <value>
I/O Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
Use  !FGD
Same as a player invoking +use; may not do anything depending on the entity. Can also be invoked by firing an output that does not specify an input.
RunScriptFile <script> (in all games since <Left 4 Dead 2>)
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode <string> (in all games since <Left 4 Dead 2>)
Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
Bug.png Bug: In <Left 4 Dead 2>, the code is executed in the script scope of the entity that fires the output, not the one receiving the input.
Warning.png Warning: Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
CallScriptFunction <string> (in all games since <Left 4 Dead 2>) !FGD
Execute a VScript function in the scope of the receiving entity.
SetLocalOrigin <coordinates> (in all games since <Alien Swarm>) !FGD
Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.
SetLocalAngles <angles> (in all games since <Alien Swarm>) !FGD
Set this entity's angles.


Enable/disable this entity from performing its task. It might also disappear from view.


Skin <integer>
Changes the model's skin to the specified number.
SetBodyGroup <integer>
Set the model's body group.
AlternativeSorting <boolean>
Uses an alternative method for telling which objects are in front of others. Use if this object draws incorrectly when seen through transparent things.
SetModelScale <string> (only in <Source><Source>)
Sets the model scale. Takes two values separated by a space. The first is the target model scale. The second value is the number of seconds the change in scale will be spread over. If there is no second value, the model will scale instantly.
Warning.png Warning: Negative or extremely high values can cause crashes!


Turn dynamic shadows off for this entity.
Turn dynamic shadows on for this entity.
DisableReceivingFlashlight  (in all games since [Portal 2])
This object will not receive light or shadows from projected textures.
EnableReceivingFlashlight  (in all games since [Portal 2])
This object may receive light or shadows from projected textures.


DisableDrawInFastReflection  (in all games since [Portal 2])
Turns off rendering of this entity in reflections when using $reflectonlymarkedentities in water material.
EnableDrawInFastReflection  (in all games since [Portal 2])
Turn on rendering of this entity in reflections when using $reflectonlymarkedentities in water material.


DisableDraw  (in all games since [Portal 2])
Add the EF_NODRAW flag to this entity. Some entities manage this on their own so be aware you can override that value.
EnableDraw  (in all games since [Portal 2])
Remove the EF_NODRAW flag from this entity. Some entities manage this on their own so be aware you can override that value.


SetDamageFilter <string>
Sets the entity to use as damage filter. Pass in an empty string (no parameter) to clear the damage filter.


Alpha <integer>
Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its Render Mode (rendermode) set to a number other than 0.
Color <color255>
Sets an RGB color for the entity.


SetParent <string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset <string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
Removes this entity from the the movement hierarchy, leaving it free to move independently.



Fired when the tank's health drops below 90 percent.
Fired when the tank's health drops below 80 percent.
Fired when the tank's health drops below 70 percent.
Fired when the tank's health drops below 60 percent.
Fired when the tank's health drops below 50 percent.
Fired when the tank's health drops below 40 percent.
Fired when the tank's health drops below 30 percent.
Fired when the tank's health drops below 20 percent.
Fired when the tank's health drops below 10 percent.
Fired when the tank's health drops to 0.


Fired when this object catches fire.


OnUser1 to OnUser4
These outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.