Skip to main content

func_tank

Mesh Entity

Brush Gun Turret

Keyvalues

  • Disable shadows (disableshadows) <Boolean>

  • Global Entity Name (globalname) <String>
    Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.

  • Minimum CPU Level (mincpulevel) <Choices>

    • default (low)
    • low
    • medium
    • high
  • Maximum CPU Level (maxcpulevel) <Choices>

    • default (high)
    • low
    • medium
    • high
  • Minimum GPU Level (mingpulevel) <Choices>

    • default (very low)
    • very low
    • low
    • medium
    • high
  • Maximum GPU Level (maxgpulevel) <Choices>

    • default (high)
    • very low
    • low
    • medium
    • high
  • Disable X360 (disableX360) <Choices>

    • No
    • Yes
  • Render Mode (rendermode) <Choices>
    Used to set a non-standard rendering mode on this entity. See also 'FX Amount' and 'FX Color'.

    • Normal
    • Color
    • Texture
    • Glow
    • Solid
    • Additive
    • Additive Fractional Frame
    • World Space Glow
    • Dont Render
    • Dev Visualizer
  • Render FX (renderfx) <Choices>

    • Normal
    • Slow Pulse
    • Fast Pulse
    • Slow Wide Pulse
    • Fast Wide Pulse
    • Slow Strobe
    • Fast Strobe
    • Faster Strobe
    • Slow Flicker
    • Fast Flicker
    • Slow Fade Away
    • Fast Fade Away
    • Slow Become Solid
    • Fast Become Solid
    • Constant Glow
    • Distort
    • Hologram (Distort + fade)
    • Cull By Distance (TEST)
    • Spotlight FX
    • Fade Near
  • FX Amount (0 - 255) (renderamt) <Integer>
    The FX amount is used by the selected Render Mode.

  • FX Color (R G B) (rendercolor) <Color255>
    The FX color is used by the selected Render Mode.

  • Disable Receiving Shadows (disablereceiveshadows) <Boolean>

  • Light Group (lightgroup) <String>
    Will only be lit by lights affecting this group.

  • Start Fade Dist (fademindist) <Float>
    Distance at which the overlay starts to fade (<0 = subtract from fademaxdist).

  • End Fade Dist (fademaxdist) <Float>
    Maximum distance at which the overlay is visible (0 = don't fade out).

  • Fade Scale (fadescale) <Float>
    If you specify a fade in the worldspawn, or if the engine is running under low end/medium end/XBox360, then the engine will forcibly fade out props even if fademindist/fademaxdist isn't specified. This scale factor gives you some control over the fade. Using 0 here turns off the forcible fades. 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.

  • Render to Cubemaps (rendertocubemaps) <Boolean>
    If true, this geometry renders into baked cube maps

  • Lightmap Static (lightmapstatic) <Choices>
    How this geometry influences baked lighting.

    • No
    • Yes
    • Bounce Only
  • Parent (parentname) <TargetDestination>
    The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent.

  • Parent Model Bone/Attachment Name (parentAttachmentName) <ParentAttachment>
    The name of the bone or attachment to attach to on the entity's parent in the movement hierarchy. Use !bonemerge to use bone-merge style attachment.

  • Model Attachment position offset (local.origin) <Vector>
    Offset in the local space of the parent model's attachment/bone to use in hierarchy. Not used if you are not using parent attachment.

  • Model Attachment angular offset (local.angles) <Angle>
    Angular offset in the local space of the parent model's attachment/bone to use in hierarchy. Not used if you are not using parent attachment.

  • Model Attachment scale (local.scales) <Vector>
    Scale in the local space of the parent model's attachment/bone to use in hierarchy. Not used if you are not using parent attachment.

  • Use Model Attachment Offset (useLocalOffset) <Boolean>
    Whether to respect the specified local offset when doing the initial hierarchical attachment to its parent.

  • Entity Scripts (vscripts) <ScriptList>
    Name(s) of script files that are executed after all entities have spawned.

  • Name (targetname) <TargetSource>
    The name that other entities refer to this entity by.

  • Spawnflags (spawnflags) <Flags>

    • Active
    • Only Direct
    • Controllable
    • Damage Kick
    • NPC Controllable
    • NPC Set Controller
    • Allow friendlies to hit player
    • Non-solid.
    • Perfect accuracy every 3rd shot at player
  • Control Volume (control_volume) <TargetDestination>
    Name of a trigger the specifies the volume in which a player must be to control this tank.

  • (Team) Master (master) <String>

  • Yaw rate (yawrate) <String>

  • Yaw range (yawrange) <String>

  • Yaw tolerance (yawtolerance) <String>

  • Pitch rate (pitchrate) <String>

  • Pitch range (pitchrange) <String>

  • Pitch tolerance (pitchtolerance) <String>

  • Barrel Length (barrel) <String>

  • Barrel Horizontal (barrely) <String>

  • Barrel Vertical (barrelz) <String>

  • Smoke Sprite (spritesmoke) <Sprite>

  • Flash Sprite (spriteflash) <Sprite>

  • Sprite scale (spritescale) <String>

  • Rotate Start Sound (rotatestartsound) <Sound>

  • Rotate Loop Sound (rotatesound) <Sound>

  • Rotate Stop Sound (rotatestopsound) <Sound>

  • Rate of Fire (firerate) <String>

  • Damage Per Bullet (bullet_damage) <String>
    If set to 0, it'll use the base weapon bullet's damage.

  • Damage Per Bullet Vs Player (bullet_damage_vs_player) <String>
    If set to 0, it'll use the Damage Per Bullet value.

  • Firing persistence (persistence) <String>
    (Seconds) How long to keep firing at last known position after lose sight of target

  • Firing persistence2 (persistence2) <String>
    (Seconds) After lost enemy and persistence time has passed, how long to occasionally fire at enemy's last known position

  • Bullet accuracy (firespread) <Choices>

    • Perfect Shot
    • Small cone
    • Medium cone
    • Large cone
    • Extra-large cone
  • Minmum target range (minRange) <String>

  • Maximum target range (maxRange) <String>

  • Minimum light level (_minlight) <String>

  • Gun Base Attachment (gun_base_attach) <String>
    If Parent is specified, this is the attachment point on the parent to aim from.

  • Gun Barrel Attachment (gun_barrel_attach) <String>
    If Parent is specified, this is the attachment point on the parent to fire from. If you specify this, you'll want to specify the Gun Base Attachment too.

  • Gun Yaw Pose Param (gun_yaw_pose_param) <String>
    If Parent + the Gun Pitch Pose Param is specified, then the gun itself will be invisible and the func_tank will steer a gun on the parent using the pose parameters.

  • Gun Yaw Pose Center (gun_yaw_pose_center) <Float>
    The center yaw pose parameter of the gun on the parent

  • Gun Pitch Pose Param (gun_pitch_pose_param) <String>
    If Parent + the Gun Yaw Pose Param is specified, then the gun itself will be invisible and the func_tank will steer a gun on the parent using the pose parameters.

  • Gun Pitch Pose Center (gun_pitch_pose_center) <Float>
    The center pitch pose parameter of the gun on the parent

  • Ammunition Count (ammo_count) <Integer>
    Only applies to player use. -1 = unlimited ammo.

  • Lead Target (LeadTarget) <Boolean>

  • NPC Man Point (npc_man_point) <TargetDestination>
    Point where NPC must stand to man this func_tank.

  • Post-NPC Attack Grace Period (playergraceperiod) <Float>
    If specified, NPC's manning this func tank won't fire at the player, after firing at a non-player, for this amount of time.

  • Ignore Grace Upto (ignoregraceupto) <Float>
    The player grace period is ignored if the player's under this distance from the func_tank.

  • Player Lock Time (playerlocktimebeforefire) <Float>
    The tank must have the player as a target for this amount of time before it's allowed to fire.

  • Effect Handling (effecthandling) <Choices>

    • Use Individual Settings.
    • AR2
    • Combine Cannon
  • Ammo type (ammotype) <Choices>

    • None
    • Pistol
    • SMG1
    • AR2
    • Combine Heavy Cannon
  • Spawnflags (spawnflags) <Flags>

    • Ignore range when making viewcone checks
    • Aiming Assistance (Player Only)

Inputs

  • DisableShadow <Void>
    Turn shadow off.

  • EnableShadow <Void>
    Turn shadow on.

  • Alpha <Integer>
    Set the sprite's alpha (0 - 255).

  • Color <Color255>
    Set the sprite's color (R G B).

  • SetParent <TargetDestination>
    Changes the entity's parent in the movement hierarchy.

  • SetParentAttachment <String>
    Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.

  • SetParentAttachmentMaintainOffset <String>
    Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the parent at the time it is attached.

  • ClearParent <Void>
    Removes this entity from the the movement hierarchy, leaving it free to move independently.

  • RunScriptFile <String>
    Load and execute a script file

  • RunScriptCode <String>
    Execute a fragment of script code

  • CallScriptFunction <String>
    Call a script function

  • CallPrivateScriptFunction <String>
    Calls a script function from this entity's private script scope.

  • CallGlobalScriptFunction <String>
    Calls a script function in the global script scope.

  • Kill <Void>
    Removes this entity from the world.

  • KillHierarchy <Void>
    Removes this entity and all its children from the world.

  • AddOutput <String>
    Adds an entity I/O connection to this entity. Parameter format: outputname>targetname>inputname>parameter>delay>max times to fire (-1 == infinite). Very dangerous, use with care.

  • FireUser1 <Void>
    Causes this entity's OnUser1 output to be fired.

  • FireUser2 <Void>
    Causes this entity's OnUser2 output to be fired.

  • FireUser3 <Void>
    Causes this entity's OnUser3 output to be fired.

  • FireUser4 <Void>
    Causes this entity's OnUser4 output to be fired.

  • Activate <Void>
    Turn the tank on

  • Deactivate <Void>
    Turn the tank off (go dormant)

  • SetFireRate <String>
    How fast to fire (0 = don't fire)

  • SetDamage <String>
    Set the Damage Per Bullet

  • SetTargetPosition <String>
    World position that I should aim at

  • SetTargetDir <Vector>
    Direction to aim at.

  • SetTargetEntityName <String>
    Name of entity I should follow/attack

  • SetTargetEntity <String>
    Entity I should follow/attack (output from other entity only)

  • ClearTargetEntity <Void>
    Clear the entity I should be attacking.

  • FindNPCToManTank <String>
    Find a nearby NPC to man this func_tank.

  • StartFindingNPCs <Void>
    Start searching for NPCs to man this func_tank.

  • StopFindingNPCs <Void>
    Stop searching for NPCs to man this func_tank.

  • ForceNPCOff <Void>
    Force the NPC manning this func_tank (if any) to leave.

  • SetMaxRange <Float>
    Set the max range of the func_tank.

Outputs

  • OnUser1 <Void>
    Fired in response to FireUser1 input.

  • OnUser2 <Void>
    Fired in response to FireUser2 input.

  • OnUser3 <Void>
    Fired in response to FireUser3 input.

  • OnUser4 <Void>
    Fired in response to FireUser4 input.

  • OnKilled <Void>
    Fired when the entity is killed and removed from the game.

  • OnFire <Void>
    Fires when the tank fires its bullets

  • OnAquireTarget <Void>
    Fires when target is newly in range and can be shot

  • OnLoseTarget <Void>
    Fires when when target goes out of range

  • OnAmmoDepleted <Void>
    Fires when tank runs out of ammo

  • OnGotController <Void>
    Fires when an NPC starts to control this tank. Players do NOT fire this input.

  • OnLostController <Void>
    Fires when the NPC controller of the tank stops controlling it. Players do NOT fire this input.

  • OnGotPlayerController <Void>
    Fires when a Player starts to control this tank. NPCs do NOT fire this input.

  • OnLostPlayerController <Void>
    Fires when the Player controller of the tank stops controlling it. NPCs do NOT fire this input.

  • OnReadyToFire <Void>
    Fires once when the tank is done waiting to fire between rounds