func_tankmortar

A func_tankmortar is a mounted mortar whose shots are explosions where it aims. It aims at targets by itself, or a
player controls it from a func_tankcontrols, and it has the keys of a
func_tank.
Attributes
The entity also has these common keys:
- Naming and triggering: Name, Target and Global Entity Name
- Position: Pitch Yaw Roll
- Appearance: all except Model scale, Body and Skin
- Compiler keys of brush entities: all of them
Names the parent, an entity that this one moves and turns with. The entity keeps the place and the angles it has on the parent in the editor. If several entities have the name, the first one counts. A name ending in .1 to .4 puts a sprite or a model that isn't solid on that attachment point of the model of the parent. A solid brush on a parent that turns needs its own origin brush. Moving objects explains it all.
If you leave this key empty, the entity doesn't move with anything.
parentflagsKeeps some of the entity's own position or angles instead of following the parent. Add up the values of the axes to keep: 2 for X, 4 for Y, 8 for Z, 16 for pitch, 32 for yaw and 64 for roll. So 112 keeps the entity level. 0 follows the parent on every axis.
0Sets how loud the shots of a player at the controls are for monsters, and -1 makes them silent.
If you leave this key empty or set 0, the shots are loud, at 1000.
0masterNames a master, and while the master is off, no player can take the controls. A gun with Active still fires, so use Fire Master to stop that.
Names a master, and the gun only fires while that master is on. It still aims and turns while the master is off.
yawrateSets how fast the gun turns left and right, in degrees per second.
If you leave this key empty, it is 0 and the gun doesn't turn.
30yawrangeSets how far the gun turns left and right from where it faces in the map, in degrees to each side.
If you leave this key empty, it is 0 and the gun can't turn.
180yawtoleranceSets how far off its target the gun may point left or right and still fire by itself, in degrees.
If you leave this key empty, it is 0 and the gun never fires by itself, unless it has Only Direct.
15pitchrateSets how fast the gun turns up and down, in degrees per second.
0pitchrangeSets how far the gun turns up and down from where it faces in the map, in degrees to each side.
0pitchtoleranceSets how far off its target the gun may point up or down and still fire by itself, in degrees.
If you leave this key empty, it is 0 and the gun never fires by itself, unless it has Only Direct.
5barrelSets how far the end of the barrel is in front of the origin of the entity, in units. Shots, sprites and the aim start there.
0barrelySets how far the end of the barrel is to the right of the origin of the entity, in units. A negative value is to the left.
0barrelzSets how far the end of the barrel is above the origin of the entity, in units. A negative value is below it.
0spritesmokeSets a sprite that drifts up from the end of the barrel with each shot.
spriteflashSets a muzzle flash sprite shown at the end of the barrel with each shot.
spritescaleSets the size of the smoke and flash sprites, where 1 is their own size.
If you leave this key empty or set 0, they have their own size.
1rotatesoundSets a sound that plays while the gun turns.
firerateSets how many shots the gun fires per second, and 0 means 1.
1persistenceSets how many seconds the gun keeps firing after it loses sight of its target.
If you leave this key empty, it is 0 and the gun never fires by itself.
1minRangeSets the distance, in units, below which the gun ignores targets.
0maxRangeSets the distance, in units, beyond which the gun ignores targets. With 0, there is no limit when the gun attacks only players, and with another Behavior/Classification, 0 means 512.
0Sets how many shots the gun has, and 0 or less means no limit. When the gun is empty, it clicks instead of firing.
0Sets who a gun with Active shoots at. Monsters also see the gun as this class, as Monster classes shows.
- Attack only players (0) - The nearest player in view
- Human Military (4) - Players and monsters that the Feds hate, within Maximum target range
- Alien Military (5) - Players and monsters that alien soldiers hate, within Maximum target range
- Player Ally (11) - Players and monsters that the allies of players hate, within Maximum target range
Attack only players (0)Names other guns, without Active, that turn with this one and fire when it fires.
The gun fires this at each shot, and passes on a point at the end of the barrel as the activator.
Sets how the smoke sprite at the barrel is drawn each time the gun fires.
- Default (Solid) (0) - Solid
- Color (1)
- Texture (2)
- Glow (3)
- Solid (4)
- Additive (5)
Default (Solid) (0)iMagnitudeSets the damage of each explosion, and its damage reaches 2.5 times this value in units.
If you leave this key empty, it is 0 and each shot is a small blast that does no damage.
100firespreadSets how far each explosion can land from where the gun points, in a cone that gets wider with each choice.
- Perfect Shot (0) - Every shot goes where the gun points
- Small cone (1)
- Medium cone (2)
- Large cone (3)
- Extra-large cone (4)
Perfect Shot (0)Flags
1ActiveThe gun starts switched on, so it aims at targets and fires by itself. Triggering it switches it on or off
16Only DirectThe gun only fires when a line from its barrel hits the target, and then it fires even when its aim is outside the tolerances
32ControllablePlayers can take the controls of the gun through a func_tankcontrols, and it aims where they look
A red laser dot shows where the barrel points while the gun is on or a player has the controls
A player at the controls aims the gun at the exact point they look at, instead of the gun copying their view angles
Notes
- The player at the controls gets the kills of the gun: the frags, the Co-op XP and the line in the kill feed. While nobody is at the controls, no player gets them
See also
func_tank- a mounted gunfunc_tankcontrols- the place where a player takes the controlsfunc_mortar_field- drops mortar shells into an area- func_tankmortar on TWHL - the Half-Life entity
Changes since 1.38
- You can use the new keys and flags of
func_tank - The player at the controls gets the kills. In SBO 1.38, as in Half-Life, the kills went to the explosion and the player got nothing

