tank_boss

From Valve Developer Community
Jump to: navigation, search
The MvM tank.

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

Bug: If there are no path_tracks present in the map, the game will crash.

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: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.

Keyvalues

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>
Team.

Targetname:

Name <string>
The targetname that other entities refer to this entity by.
Entity Scripts <scriptlist> (New with 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 <string> (New with 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:Try to avoid expensive operations in this function, as it may cause performance problems.

BaseFadeProp:

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.

Inputs

SetSpeed
Set the speed of the tank. Must be a positive value.
Note:High values will cause the tank to have difficulties navigating the path_tracks.
SetHealth
Set the tank's health.
SetMaxHealth
Set the tank's max health.
AddHealth
Add health to the tank.
RemoveHealth
Remove health from the tank.
Bug: Changes to the tank's health will not be reflected in the HUD until the tank is damaged by a player.
DestroyIfAtCapturePoint
To do: add description
AddCaptureDestroyPostfix
To do: add description
SetTeam  <integer>
Changes the entity's team.
0: Any
2: Red
3: Blue
Ignite
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.

Targetname:

Kill
Removes this entity and any entities parented to it from the world.
KillHierarchy
Functions the same as Kill, although this entity and any entities parented to it are killed on the same frame, being marginally faster than Kill.
AddOutput  <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
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. Can also be invoked by creating an output that does not specify an input.
This input is not included in Valve's FGDs.
RunScriptFile  <script> (New with 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> (New with 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: 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: 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> (New with Left 4 Dead 2) !FGD
Execute a VScript function in the scope of the receiving entity.
SetLocalOrigin  <coordinates> (New with 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> (New with Alien Swarm) !FGD
Set this entity's angles.

EnableDisable:

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

Studiomodel:

Skin <int>
Changes the model's skin to the specified number.
SetBodyGroup <int>
Set the model's body group.
EnableShadow
DisableShadow
Control the model's cheap render-to-texture shadow.
AlternativeSorting <bool>
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  <float> (New with Team Fortress 2)
Sets the model scaling factor

DamageFilter:

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

RenderFields:

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.

Parentname:

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.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.

Outputs

OnHealthBelow90Percent
Fired when the tank's health drops below 90 percent.
OnHealthBelow80Percent
Fired when the tank's health drops below 80 percent.
OnHealthBelow70Percent
Fired when the tank's health drops below 70 percent.
OnHealthBelow60Percent
Fired when the tank's health drops below 60 percent.
OnHealthBelow50Percent
Fired when the tank's health drops below 50 percent.
OnHealthBelow40Percent
Fired when the tank's health drops below 40 percent.
OnHealthBelow30Percent
Fired when the tank's health drops below 30 percent.
OnHealthBelow20Percent
Fired when the tank's health drops below 20 percent.
OnHealthBelow10Percent
Fired when the tank's health drops below 10 percent.

Studiomodel:

OnIgnite
Fired when this object catches fire.

Targetname:

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.
OnKilled  (Only in the Left 4 Dead series)
This Output fires when the entity is killed and removed from the game.