npc_helicopter

From Source Entities
Jump to navigation Jump to search
Npc helicopter.png

npc_helicopter is a point entity present in the Hl2.pngHalf-Life 2 series and Asw.pngAlien Swarm. The hunter-chopper outruns any target and can shoot them with a barrage of bullets, or harass them with an endless supply of bombs. Helicopters move via path_tracks.

Flags[edit | edit source]

  • 65536: Loud rotor wash sound - Makes the propeller noise ten times as loud.
  • 131072: Electrical drone - Some unfinished concept. Replaces the helicopter with a bomb, makes zapping noises, and damages enemies within a small radius.
  • 262144: Helicopter lights - Puts red blinking lights on the helicopter.
  • 1048576: More aggressive attacks - Repositions more frequently to enemy movement, holds gun charges if the enemy suddenly hides from it, and always knows where its current target is.
  • 2097152: Cast long shadow - Makes the helicopter's shadow go down 2048 units below it. To do: Default...?

Keyvalues[edit | edit source]

Grace Period (GracePeriod) <float>
How many seconds to wait after turning to the enemy to begin charging the gun.
Patrol Speed (PatrolSpeed) <float>
No effect.
Non-combat (noncombat) <boolean>
Micro-optimization: If the helicopter will never engage in combat, don't bother caching the grenades, the fire particle, the gibs, or the soldier model.
Always Transition (Not in FGD) (AlwaysTransition) <boolean>
If set, if the player enters a trigger_changelevel and the helicopter is not touching the associated trigger_transition, it will send an OutsideTransition input to the NPC, causing it to teleport to Transition Target.
Transition Target (Not in FGD) (TransitionTarget) <target_destination>
When the OutsideTransition input is received, the helicopter will teleport here.

Inputs[edit | edit source]

ResetIdleTime
If waiting for its refire time to expire, allows the helicopter to charge and fire the gun immediately.
StartDefaultBehavior
Tells the helicopter to behave how it usually does. (Shoot only, no bombs.)
StartTrailingVehicle
Tells the helicopter to trail behind enemy vehicles.
StartBombingVehicle
Tells the helicopter to get in front of the enemy vehicle and bomb and shoot them.
StartAlwaysLeadingVehicle
Tells the helicopter to get in front of the enemy vehicle, bomb them, but NOT shoot them.
StartBullrushBehavior
Makes the helicopter shoot randomly and deploy bombs rapidly. Intended to be used when the enemy hides in a particularly troublesome spot, such as inside a cargo container.
OutsideTransition (Not in FGD)
Teleports the helicopter to Transition Target.
EnableAlwaysTransition (Not in FGD)
Sets Always Transition to 1.
DisableAlwaysTransition (Not in FGD)
Sets Always Transition to 0.
SetTransitionTarget (Not in FGD)
Sets Transition Target.
DropBomb
Drops a bomb, if AI thinks it should.
DropBombStraightDown
Drops a bomb regardless of AI.
DropBombAtTargetAlways <target_destination>
Drops a bomb at a specified entity if AI thinks it should, without checking if the bomb is avoidable.
DropBombAtTarget <target_destination>
Drops a bomb at a specified entity if AI thinks it should, and the bomb would be avoidable.
DropBombDelay <float>
Drops a bomb after this many seconds if AI thinks it should.
StartCarpetBombing
Tells the helicopter to start bombing rapidly.
StopCarpetBombing
Tells the helicopter to stop bombing rapidly.
BecomeIndestructible
Makes the helicopter invulnerable to damage. Cannot be undone!
EnableDeadlyShooting
Enables deadly shooting; enemy can get hit by any number of shots per burst, if not in a vehicle. (Otherwise, limited to 9.)
DisableDeadlyShooting
Disables deadly shooting.
StartNormalShooting
Tells the helicopter to use it's usual shooting pattern.
StartLongCycleShooting
Tells the helicopter to shoot in longer bursts.
StartContinuousShooting
Tells the helicopter to fire indefinitely.
StartFastShooting
Tells the helicopter to use it's usual shooting pattern, but skip the charging phase.
SetHealthFraction <float>
Sets the helicopter's health as a percentage of its maximum (so 45 = 45%).
StartBombExplodeOnContact (Not in FGD)
Makes bombs explode on contact with anything, including the ground.
StopBombExplodeOnContact (Not in FGD)
Stops making bombs explode on instant contact.
SelfDestruct
Makes the helicopter die.
DisablePathVisibilityTests
Allows the helicopter to move to path_tracks that won't give it sight to the enemy.
EnablePathVisibilityTests
Forces the helicopter to only go to path_tracks with LOS to the enemy, even if other ones would take them closer to the enemy.

Outputs[edit | edit source]

OnHealthChanged <integer>
Fires when the helicopter takes more than 1% of its max health in damage. Automatically puts the new health amount as a percent of max health from 0 to 100 as the input parameter, unless overridden by the mapper.
OnShotDown
Fires when the helicopter dies.