Func tank: Difference between revisions
Jump to navigation
Jump to search
m (changed header) |
m (→Keyvalues: updated description) |
||
Line 5: | Line 5: | ||
== Keyvalues == | == Keyvalues == | ||
{{KV BaseTank}} | {{KV BaseTank}} | ||
{{KV|Bullet type|choices| | {{KV|Bullet type|choices|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 <code>bullet<code> with [[SmartEdit]] turned off. This keyvalue '''must''' be used with HL2. This is also the case for Portal 2.}} | ||
:{| class=standard-table | :{| class=standard-table | ||
! Literal value || Description | ! Literal value || Description |
Revision as of 19:44, 13 June 2018
Template:Hl2 brush It simulates a gun turret that can aim and shoot things.
Keyvalues
|
- Bullet type ([todo internal name (i)]) <choices>
- 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
bullet
with 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 ([todo internal name (i)]) <choices>
- Ammo type. Cannot be used with HL2 or Portal 2 (see above).
Value
Description
None
Pistol
Pistol
SMG1
SMG1
AR2
AR2
CombineHeavyCannon
Combine Heavy Cannon
Flags
BaseTank flags
- Active : [1]
- Player : [2] !FGD
- Humans : [4] !FGD
- Aliens : [8] !FGD
- Only Direct
- The tank will only fire if it's target is in direct line of sight. : [16]
- Controllable (by player) : [32]
- Damage Kick : [64]
- Aim at a particular position : [128] !FGD
- Aim assistance : [256] !FGD
- NPC : [512] !FGD
- NPC Controllable : [1024]
- NPC Set Controller : [2048]
- Allow friendlies to hit player : [4096]
- Don't use range as a factor in determining if something is in view cone : [8192] !FGD
- Non-solid. : [32768]
- Sound on : [65536] !FGD
- Perfect accuracy every 3rd shot at player : [131072]
- 8192 : Ignore range when making viewcone checks
- 256 : Aiming Assistance (Player Only)
Inputs
BaseTank inputs
- Activate
- Turn the tank on.
- Deactivate
- Turn the tank off (go dormant).
- SetFireRate <float >
- How fast to fire (0 = don't fire).
- SetDamage <integer >
- Set the Damage Per Bullet keyvalue.
- SetTargetPosition <vector >
- World position (coordinates) that to aim at
- SetTargetDir <vector >
- Direction (pitch yaw roll) to aim at.
- SetTargetEntityName <targetname >
- "Set the entity I should follow/attack to the closest entity matching this name."[Clarify]
- SetTargetEntity <entity>
- "Set the entity I should follow/attack to the passed in entity. This requires an output which passes an entity through the output."[Clarify]
- ClearTargetEntity
- Clear the entity memory of any targets it was told to attack.
- FindNPCToManTank <string >
- Find a nearby capable NPC to man this tank.
- StartFindingNPCs
- Start searching for capable NPCs to man this tank.
- StopFindingNPCs
- Stop searching for capable NPCs to man this tank.
- ForceNPCOff
- Force the NPC manning this tank (if any) to leave.
- SetMaxRange <float >
- Set the max range of the tank.
Confirm:Maximum distance a shot can go?
Outputs
BaseTank outputs
- 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
- DO NOT USE. Exists in code, but never coded to fire at any point.
- OnGotController
- Fires when an NPC starts to control this tank. Players do NOT fire this input.
- OnGotPlayerController
- Fires when a Player starts to control this tank. NPCs do NOT fire this input.
- OnLostController
- Fires when the NPC controller of the tank stops controlling it. Players 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 spawns, or is done waiting to fire between rounds. Useful for playing a reloading/charging/searching sound possibly.
See Also
Lessons created by Project-S