func_tank

From Sven Co-op
Revision as of 23:29, 27 January 2019 by GeckonCZ (talk | contribs) (Import of converted entguide pages from Sven Manor.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
func_tank
Type

brush

Status

supported

 


The func_tank 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_tank to be controllable by player, you need to specify a name of func_tank 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.

Bullets : bullet

Bullets visual appearance type.

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

2 Flags

1 : Active

Makes this func_tank 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_tank 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 func_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_tank. 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_tank entities cannot be set to higher that 2048.

5 Changes

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