func_tankmortar

From Sven Co-op
Jump to navigation Jump to search
func_tankmortar
Type

brush

Status

supported

 


Same as func_tank but produces instant explosions. Func_tankmortar is used to represent a mounted cannon which can be controlled  by players as well as monsters, if allowed. For either to be able to use this, it must be hooked up to a single func_tankcontrols entity. If you want func_tankmortar to be controllable by player, you need to specify a name of func_tankmortar and use func_tankcontrols entity in addition of this entity. Automatic turret needs "Active" flag enabled. Entity requires origin brush tied to barrel, so it can rotate around it.

1 Keyvalues

(Team) Master : master

Currently unsupported.

Target : target

Entity to fire each shot. You might want to use it in combination with ambient_generic to produce shooting sound.

Yaw Rate : yawrate

How fast the barrel rotates horizontally, in degrees per seconds.

Yaw Range : yawrange

The range, in degrees, of the barrel horizontal rotation in each side- left and right. This value is doubled for the whole barrel range e.g. when it's set to 90, the barrel can rotate left by 90 degrees and right by 90 degrees, what gives the total of 180.

Yaw Tolerance : yawtolerance

Seems to not affecting entity.

Pitch Rate : pitchrate

Vertical barrel rotating speed, in degrees per seconds.

Pitch Range : pitchrange

Vertical range of the barrel rotation, up and down. This value is doubled for the whole barrel range e.g. when it's set to 10, the barrel can rotate up by 10 degrees and down by 10 degrees, what gives the total of 20.

Pitch Tolerance : pitchtolerance

Seems to not affecting entity.

Barrel Length : barrel

Determines where bullets comes from. Distance is counted from origin brush to barrel end.

Barrel Horizontal : barrely

Horizontal (x axis) distance between center of the barrel and the origin's center.

Barrel Vertical : barrelz

Vertical (z axis) distance between center of the barrel and the origin's center.

Smoke Sprite : spritesmoke

Name of the sprite to show whenever bullet is shoot. Starts with 'sprites/' folder.

Flash Sprite : spriteflash

Name of the sprite to show as a muzzle flash of the barrel. Starts with 'sprites/' folder.

Sprite Scale : spritescale

Scale of smoke and flash sprites.

Rotate Sound : rotatesound

Sound file to play in a loop while barrel is rotating.

Rate of Fire : firerate

Number of bullets per second.

Damage Per Bullet : bullet_damage

Damage to deal each shot.

Firing Persistence : persistence

How many seconds this entity will continue shooting after losing player from field of view. Works only for automatic turrets.

Bullet Accuracy : firespread

Allows to customize bullet spreading, from perfect shot to Star Wars Stormtrooper accuracy.

Minimum target range : minRange

Minimum view distance to shoot target, used for automatic turrets only.

Maximum target range : maxRange

Maximum view distance to shoot target, used for automatic turrets only. However values above 2048 doesn't work.

Explosion Magnitude : iMagnitude

The greater the magnitude, the more damage the explosion will cause. Note that explosion damage values above 200 are know to cause explosion damage to even go through walls.

And Several relation flags you can use to control func_tankmortar classification. Needs "Use Relation" flag enabled.

2 Flags

1 : Active

Makes this func_tankmortar active on start, which means it will try to kill every enemies in it's view distance.

16 : Only Direct

If selected, the automatic func_tankmortar will fire it's target only when they are in it's line of sight.

32 : Controllable

If selected, player can control this turret. Keep in mind that finc_tankcontrols is required for this.

512 : Use Relations

Enables usage of relation keyvalues (which is very glitched though).

1024 : Player can't fire

Prevent player from shooting (player might still control the tank).

3 Notes

Turret can be both controllable and automatic- attacks player until he gets control over this func_tankmortar. Entity must be facing east at x/y view of the editor, the angle of barrel must be customized with 'Yaw' compass in object properties.

4 Issues

Max range of all func_tankmortar entities cannot be set to higher that 2048.

5 Changes

5.0 Steam Release: Added 'Player can't fire' flag.