Skip to main content

func_tankmortar

func_tankmortar icon
Brush entity

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:

KeyDescriptionDefault
Move withSpirit of Half-Lifemovewith

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.

Axis locksparentflags

Keeps 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.

Default 0
Player weapon volumeFeaturefulplayer_weapon_volume

Sets 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.

Default 0
(Team) Mastermaster

Names 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.

Fire MasterFeaturefulfiremaster

Names a master, and the gun only fires while that master is on. It still aims and turns while the master is off.

Yaw rateyawrate

Sets 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.

Default 30
Yaw rangeyawrange

Sets 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.

Default 180
Yaw toleranceyawtolerance

Sets 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.

Default 15
Pitch ratepitchrate

Sets how fast the gun turns up and down, in degrees per second.

Default 0
Pitch rangepitchrange

Sets how far the gun turns up and down from where it faces in the map, in degrees to each side.

Default 0
Pitch tolerancepitchtolerance

Sets 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.

Default 5
Barrel Lengthbarrel

Sets 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.

Default 0
Barrel Horizontalbarrely

Sets 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.

Default 0
Barrel Verticalbarrelz

Sets how far the end of the barrel is above the origin of the entity, in units. A negative value is below it.

Default 0
Smoke Spritespritesmoke

Sets a sprite that drifts up from the end of the barrel with each shot.

Flash Spritespriteflash

Sets a muzzle flash sprite shown at the end of the barrel with each shot.

Sprite scalespritescale

Sets 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.

Default 1
Rotate Soundrotatesound

Sets a sound that plays while the gun turns.

Rate of Firefirerate

Sets how many shots the gun fires per second, and 0 means 1.

Default 1
Firing persistencepersistence

Sets 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.

Default 1
Minimum target rangeminRange

Sets the distance, in units, below which the gun ignores targets.

Default 0
Maximum target rangemaxRange

Sets 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.

Default 0
Bullet countFeaturefulbulletCount

Sets how many shots the gun has, and 0 or less means no limit. When the gun is empty, it clicks instead of firing.

Default 0
Behavior/ClassificationFeaturefulm_iClass

Sets 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
Default Attack only players (0)
Extra barrels nameFeaturefulextra_barrels

Names other guns, without Active, that turn with this one and fire when it fires.

Trigger on firingFeaturefulSpirit of Half-Lifem_iszLocusFire

The gun fires this at each shot, and passes on a point at the end of the barrel as the activator.

Smoke sprite render modeFeaturefulsmokerendermode

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 Default (Solid) (0)
Explosion MagnitudeiMagnitude

Sets 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.

Default 100
Bullet accuracyfirespread

Sets 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)
Default Perfect Shot (0)

Flags​

1Active

The gun starts switched on, so it aims at targets and fires by itself. Triggering it switches it on or off

16Only Direct

The gun only fires when a line from its barrel hits the target, and then it fires even when its aim is outside the tolerances

32Controllable

Players can take the controls of the gun through a func_tankcontrols, and it aims where they look

64Laser SpotFeaturefulSpirit of Half-Life

A red laser dot shows where the barrel points while the gun is on or a player has the controls

128Match TargetFeaturefulSpirit of Half-Life

A player at the controls aims the gun at the exact point they look at, instead of the gun copying their view angles

256Smoke on emptyFeatureful

A puff of smoke comes out of the barrel when the gun fires its last bullet, with a Bullet count set

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​

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