Func tank: Difference between revisions
Jump to navigation
Jump to search

Bug:Doesn't create bullets or projectiles in
Black Mesa even if used one of the weapons ammo types or from item_ammo_crate list, although it still can waste the ammo and fire inputs and outputs.
Warning:Brushes with the
If the brush is a few units away from the gun, the model used will pitch up or down in an attempt to "avoid" the block_los.
Bug:In
Half-Life 2 series,
Half-Life 2: Deathmatch, and some other games, bullets from the func_tank won't fire. Therefore it won't be able to deal any damage.
Fix:Quickfix: Turn off Smart Edit, add the "bullet" keyvalue then use 1-4 for its value depending on what ammotype you want.
(Gave the proper name for Bullet type) |
MyGamepedia (talk | contribs) No edit summary |
||
(30 intermediate revisions by 17 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{LanguageBar}} | ||
{{tabs|func_tank|goldsrc=1|source=1|main=source}} | |||
{{CD|CFuncTankGun|file1=func_tank.cpp}} | |||
{{this is a|brush entity|game=Half-Life 2 series|game1=Portal series|game2=Counter-Strike: Global Offensive|game3=Black Mesa|game4=Half-Life: Source|name=func_tank}} | |||
It simulates a gun turret that can aim and shoot things. Make sure '''Control Volume''' is set, as it's required. | |||
{{bug|hidetested=1|Doesn't create bullets or projectiles in {{Bms|4}} even if used one of the weapons ammo types or from {{ent|item_ammo_crate}} list, although it still can waste the ammo and fire inputs and outputs.}} | |||
{{in | {{warning|Brushes with the <code>tools/toolsblock_los.vmt</code> texture have an effect on func_tank, even if used by the player! If the block_los is right in front of the func_tank, the gun refuses to aim straight ahead.<br>If the brush is a few units away from the gun, the model used will pitch up or down in an attempt to "avoid" the block_los.}} | ||
{{bug|hidetested=1|In {{hl2series|4}}, {{hl2dm|4.1}}, and some other games, bullets from the func_tank won't fire. Therefore it won't be able to deal any damage. | |||
{{fix|Quickfix: Turn off Smart Edit, add the "bullet" keyvalue then use 1-4 for its value depending on what ammotype you want. | |||
{{expand|title=Expand for long term solution |startcollapsed={{{startcollapsed|1}}}|noborder={{#ifeq:{{{startcollapsed}}}|0|1|0}}|bgcolor=initial| | |||
Open <code>bin/halflife2.fgd</code>, search for <code>func_tank : "Brush Gun Turret"</code>. | |||
You will see two definitions of this entity. The top one has the comment "Fixme", which means Valve forgot to do that themselves.<br> | |||
The top one is working, whereas the bottom one is not. Delete the comments <code>//</code> on the top one, and delete or comment out the bottom definition entirely.<br> | |||
Should your FGD not have this comment, replace your broken func_tank definition with the following: | |||
<source>@SolidClass base(BaseTank) = func_tank : "Brush Gun Turret" | |||
[ | |||
bullet(choices) : "Bullets" : 0 = | |||
[ | |||
0: "None" | |||
: | 1: "Pistol" | ||
2: "SMG1" | |||
3: "AR2" | |||
4: "Laser" | |||
] | |||
spawnflags(flags) = | |||
[ | |||
8192: "Ignore range when making viewcone checks" : 0 | |||
256 : "Aiming Assistance (Player Only)" : 0 | |||
] | |||
]</source> }} }} }} | |||
== Flags == | ==Flags== | ||
{{fl|256|Aiming Assistance (Player Only)}} | |||
{{fl|8192|Ignore range when making viewcone checks}} | |||
{{Fl BaseTank}} | {{Fl BaseTank}} | ||
== Inputs == | ==Keyvalues== | ||
{{KV Targetname}} | |||
{{KV BaseTank}} | |||
==Inputs== | |||
{{I BaseTank}} | {{I BaseTank}} | ||
== Outputs == | ==Outputs== | ||
{{O BaseTank}} | {{O BaseTank}} | ||
{{ | ==External links== | ||
*[https://www.interlopers.net/forum/viewtopic.php?t=1782 Mounted Machine Gun tutorial - Interlopers.net] | |||
*[http://web.archive.org/web/20080915061515/http://www.editlife.net/tutorial.php?tutid=42 editlife.net tutorial for player and npc turrets] {{archived|date=September 15, 2008}} | |||
[[Category:Immobile NPCs]] |
Latest revision as of 01:33, 28 July 2025


![]() |
---|
CFuncTankGun |
![]() |
func_tank
is a brush entity available in Half-Life 2 series,
Portal series,
Counter-Strike: Global Offensive,
Black Mesa, and
Half-Life: Source.
It simulates a gun turret that can aim and shoot things. Make sure Control Volume is set, as it's required.



tools/toolsblock_los.vmt
texture have an effect on func_tank, even if used by the player! If the block_los is right in front of the func_tank, the gun refuses to aim straight ahead.If the brush is a few units away from the gun, the model used will pitch up or down in an attempt to "avoid" the block_los.




Open @SolidClass base(BaseTank) = func_tank : "Brush Gun Turret"
[
bullet(choices) : "Bullets" : 0 =
[
0: "None"
1: "Pistol"
2: "SMG1"
3: "AR2"
4: "Laser"
]
spawnflags(flags) =
[
8192: "Ignore range when making viewcone checks" : 0
256 : "Aiming Assistance (Player Only)" : 0
]
] |
Flags
- Aiming Assistance (Player Only) : [256]
- Ignore range when making viewcone checks : [8192]
|
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
|
Inputs
|
Outputs
|
External links
- Mounted Machine Gun tutorial - Interlopers.net
- editlife.net tutorial for player and npc turrets (Archived version retrieved on September 15, 2008)
Categories:
- Brush entities
- Half-Life 2 series entities
- Half-Life 2 series brush entities
- Portal series entities
- Portal series brush entities
- Counter-Strike: Global Offensive entities
- Counter-Strike: Global Offensive brush entities
- Black Mesa entities
- Black Mesa brush entities
- Half-Life: Source entities
- Half-Life: Source brush entities
- Pages with uncategorized bugs
- Immobile NPCs