tank_boss

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)
C++ Class hierarchy
CTFTankBoss
CTFBaseBoss
NextBotCombatCharacter
CBaseCombatCharacter
CBaseFlex
CBaseAnimatingOverlay
CBaseAnimating
CBaseEntity
C++ tf_tank_boss.cpp
The Robot Tank
Robot Tank deploying its bomb at the hatch
Tank falling through grating (animated)

tank_boss is a model entity available in Team Fortress 2 Team Fortress 2. It's used in Mann Vs Machine as an unstoppable bomb carrier.

Having movement and spawning similar to func_tracktrain, it uses path_track as waypoints to move through the map, use branching paths and invoke path-related inputs and outputs. When it reaches the end of the track, it will deploy a bomb for roughly 8 seconds, giving players a chance to destroy it at the last moment. It creates a tank_destruction entity when destroyed.


Warning.pngWarning: It cannot teleport to track points.
Warning.pngWarning: When spawned using ent_create, the tank will attempt to travel in a straight line from the point it was spawned at to the bomb hatch.


Population Variables

Listed below are all Population file variables to define how it functions in-game when spawned by the tf_populator entity.


Popfile Formatting
WaveSchedule { Wave { WaveSpawn { //Do not use "Where" KeyValue TotalCount 5 SpawnCount 2 MaxActive 4 //etc... Tank { Health 50000 Name "Tank Name" OnBombDroppedOutput { Target LogicEntity_Name Action InValue Param CaseValueName } OnKilledOutput { Target LogicEntity_Name Action InValue Param CaseValueName } Skin 1 Speed 75.0 StartingPathTrackNode PathTrack_Name } } } }


Variable Type Default Description
Health integer 50000 Maximum health it spawns with.
Name string Unused, was most likely used for Deathcams at some point. [confirm]
OnBombDroppedOutput Output When the deploy animation is complete.
OnKilledOutput Output When health drops to 0%.
Skin integer 0 What the tank looks like using defined indexes from the model file?
Speed float 75.0 How fast does the Tank move?
Note.pngNote: Rotation isn't as fast, so higher values may look less immersive.
StartingPathTrackNode string Where it will spawn and start its journey?

Hammer Editor

Icon-Bug.pngBug:If there are no path_tracks present in the map, the game will crash.
Icon-Bug.pngBug:Tanks pass through any brush geometry with a transparent texture (grates, glass, etc.) and most tool textures excluding tools/toolsblack, tools/toolsnodraw and tools/toolsskybox. Turning the geometry into an entity doesn't prevent this, with the exception of func_detail.
Confirm:Is it only func_detail or do other internal entities work, e.g. func_ladder?
Note.pngNote: If you wish to avoid cutting Visleafs with Wedges (or ramps), you can turn the geometry into a Displacement.


Keyvalues

Name (targetname) <string>
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also: Generic Keyvalues, Inputs and Outputs available to all entities
Health (health) <integer>
Health of the tank.
Model (model) <string>
Model the tank uses.
Speed (speed) <integer>
Boss' max movement speed, higher speeds can cause the tank to clip through geometry.
Start Disabled (start_disabled) <boolean>
Start Disabled
Initial Team (TeamNum) <integer choices>
Which team the entity belongs / is assigned to on spawn
  • 0: None
  • 1: Spectator/Halloween Souls Team Fortress 2
  • 2: RED Team Fortress 2
  • 3: BLU/Robots Team Fortress 2
  • 5: Halloween Bosses (only in Team Fortress 2) !FGD

BaseFadeProp:

Start Fade Dist (fademindist) <float>
Distance at which the entity starts to fade.
End Fade Dist (fademaxdist) <float>
Max fade distance at which the entity is visible.
  • If start fade is <0, the entity will disappear instantly when end fade is hit.
  • If end fade is <0, the entity won't disappear at all. (This is the default behavior.)
The values will scale appropriately if the entity 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 Source 2006), 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, while those 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
Change the speed of the Boss. Must be a positive value.
Note.pngNote: 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.
Icon-Bug.pngBug:Changes to the tank's health will not be reflected in the HUD until the tank is damaged by a player.
DestroyIfAtCapturePoint
Destroys the tank if it reached its final path_track node.
AddCaptureDestroyPostfix
Sets the tank's destruction animation name's postfix. See external links for a demo
SetTeam <integerRedirectInput/integer>
Changes the entity's team.
0: Any
2: Red
3: Blue
Ignite
Ignite, burst into flames.
IgniteLifetime <floatRedirectInput/float>
Ignite with the given lifetime.
Todo: Before the flames extinguish, or before health reaches zero?
IgniteNumHitboxFires <integerRedirectInput/integer>
Ignite with the given number of hitbox fires.
IgniteHitboxFireScale <floatRedirectInput/float>
Ignite with the given hitbox fire scale.

Outputs

OnHealthBelow90Percent
Fired when Health drops below 90%
OnHealthBelow80Percent
Fired when Health drops below 80%
OnHealthBelow70Percent
Fired when Health drops below 70%
OnHealthBelow60Percent
Fired when Health drops below 60%
OnHealthBelow50Percent
Fired when Health drops below 50%
OnHealthBelow40Percent
Fired when Health drops below 40%
OnHealthBelow30Percent
Fired when Health drops below 30%
OnHealthBelow20Percent
Fired when Health drops below 20%
OnHealthBelow10Percent
Fired when Health drops below 10%
OnKilled
Fired when the tank's health drops to 0%
Studiomodel:
OnIgnite
Fired when this object catches fire.

External Links