Func tankapcrocket
From Valve Developer Community
| Table of contents |
[edit]
Entity Description
A brush entity that functions as an APC rocket turret.
[edit]
Availability
This brush-based entity is available in: HL2.
In code it is represented by class CFuncTankAPCRocket (http://doxygen.page.needed/class_c_func_tank_a_p_c_rocket.html), defined in hl2_dll\func_tank.cpp (http://doxygen.page.needed/func__tank_8cpp-source.html).
[edit]
Keyvalues
- targetname <target_source>
- Defines the name that other entities refer to this entity by.
- hammerid [Episode Two Update]
- <integer readonly> This id is used for debugging purposes in Hammer.
- parentname <target_destination>
- Specifies the targetname of this entity's Parent in a movement hierarchy. Child entities move with their Parent.
- origin
- <origin> The position of this entity's center in the world. Rotating entities rotate around their origin.
- Pitch Yaw Roll (Y Z X)
- This entity's angular orientation in the world (also used for angular effect entities).
- renderfx
- <choices>
Literal Value Description 0 Normal 1 Slow Pulse 2 Fast Pulse 3 Slow Wide Pulse 4 Fast Wide Pulse 5 Slow Fade Away 6 Fast Fade Away 7 Slow Become Solid 8 Fast Become Solid 9 Slow Strobe 10 Fast Strobe 11 Faster Strobe 12 Slow Flicker 13 Fast Flicker 14 Constant Glow 15 Distort 16 Hologram (Distort + fade) 17 Scale up 22 Spotlight FX 23 Cull By Distance (TEST) 24 Fade Wider Pulse
- rendermode
- <choices> Used to set a non-standard rendering mode on this entity. See also 'FX Amount' and 'FX Color'.
Literal Value Render Mode Description (Click for more info.) 0 Normal Default rendering. 1 Color Obsolete. 2 Texture Plain opacity. 3 Glow No Z buffer checks. Fixed size on screen. 4 Solid / Alphatest Obsolete. (Use alphatest capabilities in materials instead.) 5 Additive Obsolete. Add this entity's color to what's behind it. 7 Additive Fractional Frame Obsolete? Blend between animation frames. 8 Alpha Add (Not in FGD.) Add alpha. 9 World Space Glow No Z buffer checks. Fixed size in world (as opposed to on screen). 10 Dont Render / None Don't render.
- renderamt
- <integer> FX Amount (0 - 255) - How opaque the entity will be rendered. (
0is fully transparent, while255is fully opaque). Will not work if the rendermode keyvalue is set to Normal or Dont Render.
- rendercolor
- <color255> FX Color - What color the entity will be rendered in (to the degree of the opacity set with renderamt).
- globalname
- <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 globalnames matching entities in the previous map will have the previous map's state copied over their state.
- disableshadows
- <boolean> Used to disable dynamic shadow casting from this entity.
- 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 [Episode One Update] Combine Cannon [Episode One Update]
- rocketspeed
- <float> Speed the rocket will travel at.
- burstcount
- <integer> Number of rockets to shoot in a burst.
[edit]
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 [Episode One Update]
- Every third shot is direct hit
[edit]
Inputs
- Kill
- Removes this entity from the world.
- 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 == infinite)>
- Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.
- SetParent <target_destination>
- Changes the entity's parent in the movement hierarchy.
- SetParentAttachment <string>
- Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
- SetParentAttachmentMaintainOffset <string> [Episode One Update]
- Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the Parent's Origin and Angles at the time it is attached.
- Removes this entity from its current movement hierarchy.
- DisableShadow
- Turn shadow off.
- EnableShadow
- Turn shadow on.
- 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 <ehandle>
- Entity I should follow/attack (output from other entity only)
- 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.
- DeathVolley
- Fire a burst of rockets because the entity is dying.
[edit]
Outputs
- Fired in response to FireUser1-4 inputs. See User Inputs and Outputs.
- !activator = activator
- 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
