Difference between revisions of "Func tank"

From Sven Co-op
Jump to navigation Jump to search
m (Formatting, typos, links etc.)
m (Pitch / Yaw Tolerance does work, only when Only Direct flag is checked)
 
Line 13: Line 13:
 
{{Entity_keyvalue|Yaw Rate|yawrate|How fast the barrel rotates horizontally, in degrees per seconds.}}
 
{{Entity_keyvalue|Yaw Rate|yawrate|How fast the barrel rotates horizontally, in degrees per seconds.}}
 
{{Entity_keyvalue|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.}}
 
{{Entity_keyvalue|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.}}
{{Entity_keyvalue|Yaw Tolerance|yawtolerance|Seems to not affecting entity.}}
+
{{Entity_keyvalue|Yaw Tolerance|yawtolerance|Affects how soon the func_tank starts firing before being aimed perfectly at its target in the Yaw axis. Ignored if Only Direct flag is checked.}}
 
{{Entity_keyvalue|Pitch Rate|pitchrate|Vertical barrel rotating speed, in degrees per seconds.}}
 
{{Entity_keyvalue|Pitch Rate|pitchrate|Vertical barrel rotating speed, in degrees per seconds.}}
 
{{Entity_keyvalue|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.}}
 
{{Entity_keyvalue|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.}}
{{Entity_keyvalue|Pitch Tolerance|pitchtolerance|Seems to not affecting entity.}}
+
{{Entity_keyvalue|Pitch Tolerance|pitchtolerance|Affects how soon the func_tank starts firing before being aimed perfectly at its target in the Pitch axis. Ignored if Only Direct flag is checked.}}
 
{{Entity_keyvalue|Barrel Length|barrel|Determines where bullets comes from. Distance is counted from origin brush to barrel end.}}
 
{{Entity_keyvalue|Barrel Length|barrel|Determines where bullets comes from. Distance is counted from origin brush to barrel end.}}
 
{{Entity_keyvalue|Barrel Horizontal|barrely|Horizontal (x axis) distance between center of the barrel and the origin's center.}}
 
{{Entity_keyvalue|Barrel Horizontal|barrely|Horizontal (x axis) distance between center of the barrel and the origin's center.}}
Line 36: Line 36:
 
== Flags ==
 
== Flags ==
  
{{Entity_flag|1|Active|Makes this func_tank active on start, which means it will try to kill every enemies in it's view distance.}}
+
{{Entity_flag|1|Active|Makes this func_tank active on start, which means it will try to kill every enemies in its view distance.}}
{{Entity_flag|16|Only Direct|If selected, the automatic func_tank will fire it's target only when they are in it's line of sight.}}
+
{{Entity_flag|16|Only Direct|If selected, the automatic func_tank will fire it's target only when they are in its line of sight.}}
 
{{Entity_flag|32|Controllable|If selected, player can control this turret. Keep in mind that func_tankcontrols is required for this.}}
 
{{Entity_flag|32|Controllable|If selected, player can control this turret. Keep in mind that func_tankcontrols is required for this.}}
 
{{Entity_flag|512|Use Relations|Enables usage of relation keyvalues (which is very glitched though).}}
 
{{Entity_flag|512|Use Relations|Enables usage of relation keyvalues (which is very glitched though).}}

Latest revision as of 14:13, 17 March 2023

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

Affects how soon the func_tank starts firing before being aimed perfectly at its target in the Yaw axis. Ignored if Only Direct flag is checked.

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

Affects how soon the func_tank starts firing before being aimed perfectly at its target in the Pitch axis. Ignored if Only Direct flag is checked.

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 its view distance.

16 : Only Direct

If selected, the automatic func_tank will fire it's target only when they are in its 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.