func_tow

From Valve Developer Community
Revision as of 08:16, 7 July 2024 by MyGamepedia (talk | contribs) (Created page with "350px|right {{this is a|brush entity|name=func_tow|game=Black Mesa}} This is {{WP|BGM-71 TOW}} used by the HECU. Can be used by player and HECU sold...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Towiimage.png

func_tow is a brush entity available in Black Mesa Black Mesa. This is Wikipedia icon BGM-71 TOW used by the HECU. Can be used by player and HECU soldiers. Unlike other entities based on func_tank entity, this entity needs manual reload after each shoot, the ammunition is item_tow_missile (must be holded by player, simple touching of this object to func_tow will not reload this weapon).

Note.pngNote:The fire, deploy and reload sounds are hardcoded. You still can change both in your Black Mesa mod by replacing the sounds with a blank sounds and playing your own sounds via input/output system.
Note.pngNote:Only certain NPCs (npc_human_commander, npc_human_grenadier, npc_human_grunt and npc_human_medic) can use this weapon via FindNPCToManTank input. Other will ignore this input.
Icon-Important.pngImportant:This entity can't be used without model combination (will not fire).
Warning.pngWarning:It is not recommended to use enabled collision for model, it will cause missiles to explode when fired.
Icon-Bug.pngBug:NPC's weapon breaks after this gun usage. It doesn't removes, but becomes invisible and unable to shoot (NPC still reload weapon several times, for some reason). This breaks the AI ​​partially, because such NPC still thinks that it have functional weapon. This bug not in Black Mesa (mod) Black Mesa (mod) (the mod version).  [todo tested in ?]
Icon-Bug.pngBug:This entity creates laser point. This laser point have issues with rendering, it can be seen through any object. Not in Black Mesa (mod) Black Mesa (mod) (the mod version).
The bug example.


  [todo tested in ?]
Note.pngNote:In Black Mesa (mod) Black Mesa (mod) (the mod version) this entity also have laser beam, not only laser point.
The bug example.


Dedicated ConVars

Black Mesa Black Mesa: Definitive Edition

Cvar/Command Parameters or default value Descriptor Effect
sk_detenator_tow_track_acceleration 300 arbitrary number Missile acceleration.
Icon-Bug.pngBug:Large values may cause missile to disappear.  [todo tested in ?]
sk_detenator_tow_max_speed 3000 arbitrary number Max missile speed.
sk_detenator_tow_intial_speed 1500 arbitrary number Intial missile speed.
Icon-Bug.pngBug:Large values may cause missile to disappear.  [todo tested in ?]
sk_detenator_tow_plr_dmg 150 arbitrary number Missile damage scale if it is launched by the player.
sk_detenator_tow_plr_dmg_radius 375 arbitrary number Missile damage radius if it is launched by the player.
sk_detenator_tow_npc_dmg 150 arbitrary number Missile damage scale if it is launched by NPC.
sk_detenator_tow_npc_dmg_radius 375 arbitrary number Missile damage radius if it is launched by NPC.
Note.pngNote:All these console commands are not directly related to func_tow and func_tow_mp. These console commands are parameters for grenade_tow.

Black Mesa (mod) Black Mesa (mod) (the mod version)

Cvar/Command Parameters or default value Descriptor Effect
sk_plr_dmg_grenade_tow 150 arbitrary number Missile damage scale if it is launched by the player.
sk_npc_dmg_grenade_tow 150 arbitrary number Missile damage scale if it is launched by NPC.
sk_grenade_tow_airspeed 1500 arbitrary number Missile air speed.
sk_grenade_tow_precision 1 arbitrary number TOW precision. Doesn't work.
Note.pngNote:All these console commands are not directly related to func_tow. These console commands are parameters for grenade_tow.

Flags

BaseTank flags
Active : [1]
Player : [2] !FGD
Humans : [4] !FGD
Aliens : [8] !FGD
Only Direct
The tank will only fire if it's target is in direct line of sight. : [16]
Controllable (by player) : [32]
Damage Kick : [64]
Aim at a particular position : [128] !FGD
Aim assistance : [256] !FGD
NPC : [512] !FGD
NPC Controllable : [1024]
NPC Set Controller : [2048]
Allow friendlies to hit player : [4096]
Don't use range as a factor in determining if something is in view cone : [8192] !FGD
Non-solid. : [32768]
Sound on : [65536] !FGD
Perfect accuracy every 3rd shot at player : [131072]

Keyvalues

Control Volume (control_volume) <targetname>
Name of a trigger the player must be inside to control the tank.
(Team) Master (master) <string>
Not used for Source. Provided for backwards compatibility with multisource or game_team_master.
Yaw rate (yawrate) <string>
How fast tank can look left or right.
Yaw range (yawrange) <string>
How far tank can turn left or right.
Yaw tolerance (yawtolerance) <string>
Additional left-right range. If the gun tries to turn beyond Yaw range + Yaw tolerance, the gun will snap back to the maximum Yaw range.
Pitch rate (pitchrate) <string>
How fast tank can look up or down
Pitch range (pitchrange) <string>
How far tank can turn up or down
Pitch tolerance (pitchtolerance) <string>
Additional up-down range. If the gun tries to turn beyond Pitch range + Pitch tolerance, the gun will snap back to the maximum Pitch range.
Barrel Length (barrel) <string>
Solid length of the tank barrel. Any part of the barrel beyond this length may clip through objects.
Barrel Horizontal (barrely) <string>
How wide the barrel is, horizontally.}
Barrel Vertical (barrelz) <string>
How wide the barrel is, vertically.
Smoke Sprite (spritesmoke) <sprite>
Smoke sprite to emit when gun fires.
Icon-Bug.pngBug:Transparency may not work.  [todo tested in ?]
Flash Sprite (spriteflash) <sprite>
Flash sprite to emit when gun fires.
Sprite scale (spritescale) <string>
Sprite scale for both sprites above.
Rotate Start Sound (rotatestartsound) <sound>
Sound to play when tank starts to turn.
Rotate Loop Sound (rotatesound) <sound>
Sound to play when tank is turning.
Rotate Stop Sound (rotatestopsound) <sound>
Sound to play when tank stops turning.
Rate of Fire (firerate) <string>
Number of bullets to fire in a second.
Damage Per Bullet (bullet_damage) <string>
How much a single bullet hurts everything except the player. If 0, takes amount from the type of bullet/damage.
Icon-Bug.pngBug:Doesn't work. If need your own damage value - use the console commands.  [todo tested in ?]
Damage Per Bullet Vs Player (bullet_damage_vs_player) <string>
How much a single bullet hurts the player only. If 0, takes amount from the type of bullet/damage.
Icon-Bug.pngBug:Doesn't work. If need your own damage value - use the console commands.  [todo tested in ?]
Firing persistence (persistence) <string>
How many seconds to keep firing at target's last known position after losing LOS (for NPCs).
Firing persistence2 (persistence2) <string>
After Firing persistence is over, how many seconds to periodically fire at target's last known position (for NPCs).
Bullet accuracy (firespread) <choices>
How accurately the gun can fire.
  • 0: Perfect Shot
  • 1: Small cone
  • 2: Medium cone
  • 3: Large cone
  • 4: Extra-large cone
Icon-Bug.pngBug:This value can't be changed, func_tow will use Perfect Shot value in any case.  [todo tested in ?]
Minimum target range (minRange) <string>
Minimum range to target something (for NPCs). If a target is closer than this amount, the NPC will probably switch to any weapon they have on them.
Maximum target range (maxRange) <string>
Maximum range to target something (for NPCs).
Confirm:This may actually be the distance for aim assistance instead?
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 and Gun Pitch Pose Param are specified, then the gun itself will be invisible and the 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 and Gun Yaw Pose Param are specified, then the gun itself will be invisible and the 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>
Amount of ammo when player is using. -1 = unlimited ammo.
Lead Target (LeadTarget) <boolean>
Aim ahead to hit moving targets (for NPCs).
NPC Man Point (npc_man_point) <targetname>
Point where NPC must stand to use.
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 is under this distance from the tank.
Player Lock Time (playerlocktimebeforefire) <float>
The tank must be aiming right on the player for this amount of time before it's allowed to fire.
Effect Handling (effecthandling) <choices>
Produce these sound and particle effects when firing.
  • 0: Use Individual Settings.
  • 1: AR2
    Note.pngNote:Changes the color of the fire light to blue.
  • 2: Combine Cannon
    Icon-Bug.pngBug:Shooting will cause DispatchEffect: effect "ChopperMuzzleFlash" not found on client error message in the console.  [todo tested in ?]
Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
Please use {{Brush rendering note}} instead.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.
Note.pngNote:Archived page history
Icon-Important.pngImportant:These pages are linked often from page history logs so Special:WhatLinksHere will not show anything.


Inputs

BaseTank inputs
Activate
Turn the tank on.
Deactivate
Turn the tank off (go dormant).
SetFireRate <floatRedirectInput/float>
How fast to fire (0 = don't fire).
SetDamage <integerRedirectInput/integer>
Set the Damage Per Bullet keyvalue.
SetTargetPosition <vectorRedirectInput/Vector>
World position (coordinates) that to aim at
SetTargetDir <vectorRedirectInput/Vector>
Direction (pitch yaw roll) to aim at.
SetTargetEntityName <targetnameRedirectInput/string>
"Set the entity I should follow/attack to the closest entity matching this name."[Clarify]
SetTargetEntity <entity>
"Set the entity I should follow/attack to the passed in entity. This requires an output which passes an entity through the output."[Clarify]
ClearTargetEntity
Clear the entity memory of any targets it was told to attack.
FindNPCToManTank <stringRedirectInput/string>
Find a nearby capable NPC to man this tank.
StartFindingNPCs
Start searching for capable NPCs to man this tank.
StopFindingNPCs
Stop searching for capable NPCs to man this tank.
ForceNPCOff
Force the NPC manning this tank (if any) to leave.
SetMaxRange <floatRedirectInput/float>
Set the max range of the tank.
Confirm:Maximum distance a shot can go?
SetDamageFilter <targetnameRedirectInput/string>
Sets a filter for this entity for when it receives damage.
EnableDamageForces
Allows the entity to be pushed by damage done to it (usually force amount correlates with the damage done).
DisableDamageForces
Prevents the entity from being pushed by damage done to it.
Todo: move/mention at proper place


Outputs

BaseTank outputs
OnFire
Fires when the tank fires its bullets.
OnAquireTarget
Fires when target is newly in range and can be shot.
OnLoseTarget
Fires when when target goes out of range.
OnAmmoDepleted
DO NOT USE. Exists in code, but never coded to fire at any point.
OnGotController
Fires when an NPC starts to control this tank. Players do NOT fire this input.
OnGotPlayerController
Fires when a Player starts to control this tank. NPCs do NOT fire this input.
OnLostController
Fires when the NPC controller of the tank stops controlling it. Players do NOT fire this input.
OnLostPlayerController
Fires when the Player controller of the tank stops controlling it. NPCs do NOT fire this input.
OnReadyToFire
Fires once when the tank spawns, or is done waiting to fire between rounds. Useful for playing a reloading/charging/searching sound possibly.


See also