func_tankairboatgun
From Valve Developer Community
Contents |
Entity Description
A brush entity that functions as an airboat gun turret.
Availability
This brush-based entity is available in: HL2.
In code it is represented by class CFuncTankAirboatGun, defined in hl2_dll\func_tank.cpp.
Keyvalues
Targetname:
- Name <string>
- The targetname other entities refer to this entity by.
Parentname:
- Parent
<targetname> - Specifies the targetname of this entity's movement parent. Entities with parents move with their parent.
Origin:
- Origin
<origin> - The position of this entity's center in the world. Rotating entities typically rotate around their origin.
Angles:
- Pitch Yaw Roll (Y Z X)
<angle> - This entity's angular orientation in the world.
RenderFields:
- Render Mode
<choices> - Set a non-standard rendering mode on this entity. See Render Modes for details.
- FX Amount (0 - 255)
<int> - Intensity of the selected render mode.
- FX Color (R G B)
<color255> - Color used by the selected render mode (if applicable).
- Disable Receiving Shadows
<bool> - Prevents the entity from receiving shadows.
To do: RTT and/or shadow map?
RenderFXChoices:
- Render FX
<choices> - Several GoldSrc-era visibility modes which change the way the entity is rendered, typically by fading it in and out.
Global:
- Global Entity Name
<string> - Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with global names matching entities in the previous map will have the previous map's state copied over to them.
Shadow:
- Disable shadows
<bool> - Prevent the entity from creating cheap render-to-texture shadows. Does not affect shadow mapping.
- control_volume
- <target_destination> Name of a trigger the specifies the volume in which a player must be to control this tank.
- master
- <target_destination> (Team) Master.
- yawrange
- <float> Yaw range.
- yawtolerance
- <float> Yaw tolerance.
- pitchrate
- <float> Pitch rate.
- pitchrange
- <float> Pitch range.
- pitchtolerance
- <float> Pitch tolerance.
- barrel
- <float> Barrel Length.
- barrely
- <float> Barrel Horizontal.
- barrelz
- <float> Barrel Vertical.
- spritesmoke
- <sprite> Smoke Sprite.
- spriteflash
- <sprite> Flash Sprite.
- spritescale
- <float> Sprite scale.
- rotatestartsound
- <sound> Rotate Start Sound.
- rotatesound
- <sound> Rotate Loop Sound.
- rotatestopsound
- <sound> Rotate Stop Sound.
- firerate
- <float> Rate of Fire. Number of bullets fired before the tank pauses.
- bullet_damage
- <integer> If set to 0, it'll use the base weapon bullet's damage.
- bullet_damage_vs_player
- <integer> If set to 0, it'll use the Damage Per Bullet value.
- persistence
- <float> (Seconds) How long to keep firing at last known position after lose sight of target.
- persistence2
- <float> (Seconds) After lost enemy and persistence time has passed, how long to occasionally fire at enemy's last known position.
- firespread
- <choices> Bullet accuracy.
Literal value Description 0 Perfect Shot 1 Small cone 2 Medium cone 3 Large cone 4 Extra-large cone
- minRange
- <float> Minmum target range.
- maxRange
- <float> Maximum target range.
- _minlight
- <integer> Minimum light level.
- gun_barrel_attach
- <string> If Parent is specified, this is the attachment point on the parent to fire from. If you specify this, you'll want to specify the Gun Base Attachment too.
- gun_yaw_pose_param
- <string> If Parent + the Gun Pitch Pose Param is specified, then the gun itself will be invisible and the func_tank will steer a gun on the parent using the pose parameters.
- gun_yaw_pose_center
- <float> The center yaw pose parameter of the gun on the parent.
- gun_pitch_pose_param
- <string> If Parent + the Gun Yaw Pose Param is specified, then the gun itself will be invisible and the func_tank will steer a gun on the parent using the pose parameters.
- gun_pitch_pose_center
- <float> The center pitch pose parameter of the gun on the parent.
- ammo_count
- <integer> Only applies to player use. -1 = unlimited ammo.
- LeadTarget
- <choices> Lead Target.
Literal value Description 0 No 1 Yes
- npc_man_point
- <target_destination> Point where NPC must stand to man this func_tank.
- playergraceperiod
- <float> If specified, NPC's manning this func tank won't fire at the player, after firing at a non-player, for this amount of time.
- ignoregraceupto
- <float> The player grace period is ignored if the player's under this distance from the func_tank.
- playerlocktimebeforefire
- <float> The tank must have the player as a target for this amount of time before it's allowed to fire.
- effecthandling
- <choices> Effect Handling.
Literal value Description 0 Use Individual Settings. 1 AR2 2 Combine Cannon
- airboat_gun_model
- <target_destination> Name of a prop_dynamic which is the airboat gun model.
Flags
- 1 : Active
- 16 : Only Direct
- 32 : Controllable
- 64 : Damage Kick
- 1024 : NPC Controllable
- 2048 : NPC Set Controller
- 4096 : Allow friendlies to hit player
- 32768 : Non-solid.
- 131072 : Cheat when shooting player
- Every third shot is direct hit
Inputs
Targetname:
-
Kill - Removes this entity from the world.
-
KillHierarchy - Removes this entity and all its children from the world.
-
AddOutput <string> - Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
- Format:
<key> <value> - Format:
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite> -
FireUser1toFireUser4 - Fire the
OnUseroutputs; see User Inputs and Outputs.
Parentname:
-
SetParent <targetname> - Move with this entity. See Entity Hierarchy (parenting).
-
SetParentAttachment <string> - Attach to a named attachment on the current parent. The entity will teleport so that the position of its root bone matches that of the attachment.
-
SetParentAttachmentMaintainOffset <string> - As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
-
ClearParent - Removes this entity from its current movement hierarchy.
Shadow:
- EnableShadow
- DisableShadow
- Control the entity's cheap render-to-texture shadow. Does not affect shadow mapping.
- Activate
- Turn the tank on
- Deactivate
- Turn the tank off (go dormant)
- SetFireRate <string>
- How fast to fire (0 = don't fire)
- SetDamage <string>
- Set the Damage Per Bullet
- SetTargetPosition <string>
- World position that I should aim at
- SetTargetDir <vector>
- Direction to aim at.
- SetTargetEntityName <target_destination>
- Name of entity I should follow/attack
- SetTargetEntity <targetname>
- Entity I should follow/attack (output from other entity only
To do: really?)
- ClearTargetEntity
- Clear the entity I should be attacking.
- FindNPCToManTank <string>
- Find a nearby NPC to man this func_tank.
- StartFindingNPCs
- Start searching for NPCs to man this func_tank.
- StopFindingNPCs
- Stop searching for NPCs to man this func_tank.
- ForceNPCOff
- Force the NPC manning this func_tank (if any) to leave.
- SetMaxRange <float>
- Set the max range of the func_tank.
Outputs
Targetname:
-
OnUser1toOnUser4 - Fired in response to the
FireUserinputs; see User Inputs and Outputs. -
OnKilled(New with Left 4 Dead) - Fired when the entity is killed and removed from the game.
- OnFire
- Fires when the tank fires its bullets
- OnAquireTarget
- Fires when target is newly in range and can be shot
- OnLoseTarget
- Fires when when target goes out of range
- OnAmmoDepleted
- Fires when tank runs out of ammo
- OnGotController
- Fires when an NPC starts to control this tank. Players do NOT fire this input.
- OnLostController
- Fires when the NPC controller of the tank stops controlling it. Players do NOT fire this input.
- OnGotPlayerController
- Fires when a Player starts to control this tank. NPCs do NOT fire this input.
- OnLostPlayerController
- Fires when the Player controller of the tank stops controlling it. NPCs do NOT fire this input.
- OnReadyToFire
- Fires once when the tank is done waiting to fire between rounds
