From Valve Developer Community
- Control Volume
- Name of a trigger the player must be inside to control the tank.
- (Team) Master
- (Team) Master
- Yaw rate
- How fast tank can look left or right.
- Yaw range
- How far tank can turn left or right.
- Yaw tolerance
- Additional left-right range. If the gun tries to turn beyond Yaw range + Yaw tolerance, the gun will snap back to the maximum Yaw range.
- Pitch rate
- How fast tank can look up or down
- Pitch range
- How far tank can turn up or down
- Pitch tolerance
- Additional up-down range. If the gun tries to turn beyond Pitch range + Pitch tolerance, the gun will snap back to the maximum Pitch range.
- Barrel Length
- Solid length of the tank barrel. Any part of the barrel beyond this length may clip through objects.
- Barrel Horizontal
- How wide the barrel is, horizontally.}
- Barrel Vertical
- How wide the barrel is, vertically.
- Smoke Sprite
- Smoke sprite to emit when gun fires. Bug:Transparency may not work.
- Flash Sprite
- Flash sprite to emit when gun fires.
- Sprite scale
- Sprite scale for both sprites above.
- Rotate Start Sound
- Sound to play when tank starts to turn.
- Rotate Loop Sound
- Sound to play when tank is turning.
- Rotate Stop Sound
- Sound to play when tank stops turning.
- Rate of Fire
- Number of bullets to fire in a second.
- Damage Per Bullet
- How much a single bullet hurts everything except the player. If
0, takes amount from the type of bullet/damage.
- Damage Per Bullet Vs Player
- How much a single bullet hurts the player only. If
0, takes amount from the type of bullet/damage.
- Firing persistence
- How many seconds to keep firing at target's last known position after losing LOS (for NPCs).
- Firing persistence2
- After Firing persistence is over, how many seconds to periodically fire at target's last known position (for NPCs).
- Bullet accuracy
- How accurately the gun can fire.
- 0 : Perfect Shot
- 1 : Small cone
- 2 : Medium cone
- 3 : Large cone
- 4 : Extra-large cone
- Minimum target range
- Minimum range to target something (for NPCs). If a target is closer than this amount, the NPC will probably switch to any weapon they have on them.
- Maximum target range
- Maximum range to target something (for NPCs). Confirm:This may actually be the distance for aim assistance instead?
- Minimum light level
- Minimum amount of light this entity should receive.
- Gun Base Attachment
- If Parent is specified, this is the attachment point on the parent to aim from.
- Gun Barrel Attachment
- 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
- If Parent and Gun Pitch Pose Param are specified, then the gun itself will be invisible and the tank will steer a gun on the parent using the pose parameters.
- Gun Yaw Pose Center
- The center yaw pose parameter of the gun on the parent.
- Gun Pitch Pose Param
- If Parent and Gun Yaw Pose Param are specified, then the gun itself will be invisible and the tank will steer a gun on the parent using the pose parameters.
- Gun Pitch Pose Center
- The center pitch pose parameter of the gun on the parent.
- Ammunition Count
- Amount of ammo when player is using. -1 = unlimited ammo.
- Lead Target
- Aim ahead to hit moving targets (for NPCs).
- NPC Man Point
- Point where NPC must stand to use.
- Post-NPC Attack Grace Period
- 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.
- Ignore Grace Upto
- The player grace period is ignored if the player is under this distance from the tank.
- Player Lock Time
- The tank must be aiming right on the player for this amount of time before it's allowed to fire.
- Effect Handling
- Produce these sound and particle effects when firing.
- 0 : Use Individual Settings.
- 1 : AR2
- 2 : Combine Cannon
- Entity Scripts
<scriptlist>(New with Left 4 Dead 2)
- Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
- Script think function
<string>(New with Left 4 Dead 2)
- Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call. Note:Try to avoid expensive operations in this function, as it may cause performance problems.
- Origin (X Y Z)
- The position of this entity's center in the world. Rotating entities typically rotate around their origin.
- Pitch Yaw Roll (Y Z X)
- This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
- Render Mode
- Set a non-standard rendering mode on this entity. See Render Modes for details.
- FX Amount (0 - 255)
- Intensity of the selected render mode.
- FX Color (R G B)
- Color used by the selected render mode (if applicable).
- Disable Receiving Shadows
- Prevents the entity from receiving shadows.
- Render FX
- Several GoldSrc-era visibility modes which change the way the entity is rendered, typically by fading it in and out.
- Global Entity Name
- 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.
- Disable shadows
- Prevent the entity from creating cheap render-to-texture shadows. Does not affect shadow mapping.
- Disable ShadowDepth
<boolean>(New with Portal 2)
- Used to disable rendering into shadow depth (for projected textures) for this entity.
- Projected Texture Cache
<choices>(New with Portal 2)
- Used to hint projected texture system whether it is sufficient to cache shadow volume of this entity or to force render it every frame instead.
- 0 : Default
- 1 : No cache - render every frame
- 2 : Cache it - render only once
- Bullet type
- If you are mapping for HL2 and don't see this keyvalue, it's probably because you updated hammer for Episode 1. Simply add in a keyvalue named
bulletwith SmartEdit turned off. This keyvalue must be used with HL2. This is also the case for Portal 2.
Literal value Description 0 None 1 Pistol 2 SMG1 3 AR2 4 Laser
- Ammo type
- Ammo type. Cannot be used with HL2 or Portal 2 (see above).
Value Description None
Combine Heavy Cannon
- 1 : Active
- 16 : Only Direct: The tank will only fire if it's target is in direct line of sight.
- 32 : Controllable
- 64 : Damage Kick
- 1024 : NPC Controllable
- 2048 : NPC Set Controller
- 4096 : Allow friendlies to hit player
- 32768 : Non-solid.
- 131072 : Perfect accuracy every 3rd shot at player
- 8192 : Ignore range when making viewcone checks
- 256 : Aiming Assistance (Player Only)
- Turn the tank on
- Turn the tank off (go dormant)
- How fast to fire (0 = don't fire)
- Set the Damage Per Bullet
- World position that I should aim at
- Direction to aim at.
- Name of entity I should follow/attack
- Entity I should follow/attack (output from other entity only To do: really?)
- Clear the entity I should be attacking.
- Find a nearby NPC to man this func_tank.
- Start searching for NPCs to man this func_tank.
- Stop searching for NPCs to man this func_tank.
- Force the NPC manning this func_tank (if any) to leave.
- Set the max range of the func_tank.
- Removes this entity and any entities parented to it from the world.
- Functions the same as
Kill, although entities with a large number of children are killed marginally faster.
- Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
- Fire the
OnUseroutputs; see User Inputs and Outputs.
- Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input.
This input is not included in Valve's FGDs.
<script>(New with Left 4 Dead 2)
- Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
<string>(New with Left 4 Dead 2)
- Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console. Bug:Warning:Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
<string>(New with Left 4 Dead 2) !FGD
- Execute a VScript function in the scope of the receiving entity. Note:This input is missing from some games FGD files.
<origin>(New with Alien Swarm) !FGD
- Set this entity's origin in the map. Note:This input is missing from some games FGD files.
<angles>(New with Alien Swarm) !FGD
- Set this entity's angles in the map. Note:This input is missing from some games FGD files.
- Move with this entity. See Entity Hierarchy (parenting).
- Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
- As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
- Removes this entity from the the movement hierarchy, leaving it free to move independently.
- Fires when the tank fires its bullets
- Fires when target is newly in range and can be shot
- Fires when when target goes out of range
- Fires when tank runs out of ammo
- Fires when an NPC starts to control this tank. Players do NOT fire this input.
- Fires when the NPC controller of the tank stops controlling it. Players do NOT fire this input.
- Fires when a Player starts to control this tank. NPCs do NOT fire this input.
- Fires when the Player controller of the tank stops controlling it. NPCs do NOT fire this input.
- Fires once when the tank is done waiting to fire between rounds
- These Outputs each fire in response to the firing of the like-numbered
FireUser4Input; see User Inputs and Outputs.
OnKilled(New with Left 4 Dead)
- This Output fires when the entity is killed and removed from the game.
- editlife.net tutorial for player and npc turrets (Archived version retrieved on September 15, 2008)
Lessons created by Project-S