CBaseHelicopter
Jump to navigation
Jump to search
Code classes:
CBaseHelicopter
CAI_BaseNPC
(NPCs)CBaseCombatCharacter
CBaseFlex
CBaseAnimatingOverlay
CBaseAnimating
(models)CBaseEntity
(all ents)
CBaseHelicopter
is a code class shared by large flying NPCs. Unlike most NPCs, these ones are told where to go by path_track
s.
Note: These NPCs are not designed to be within touching distance of a player while alive. They tend to make the player lose momentum when touching.
Flags[edit | edit source]
- 32: No Rotorwash - Makes the NPC not emit rotor wash (effect of air being pushed downward).
- 64: Await Input - NPC waits for the Activate input to begin flying.
Keyvalues[edit | edit source]
- Initial Speed
(InitialSpeed)
<float>
- Sets the helicopter's desired speed that it should try to reach as soon as it's spawned. To do: Seems to be ignored?
Inputs[edit | edit source]
- Activate
- If Await Input was checked, makes the NPC start flying.
- SetTrack
<target_destination>
- Tells the NPC to fly to the specified
path_track
, unless it's already on a path that includes that entity. - GunOn
- Allows the NPC to shoot.
- GunOff
- Disallows the NPC to shoot.
MissileOn- Does nothing.
MissileOff- Does nothing.
- EnableRotorWash
- Enables rotor wash.
- DisableRotorWash
- Disabled rotor wash.
- MoveTopSpeed
- Tells the NPC to move at its top speed in its current direction of travel.
- MoveSpecifiedSpeed
<float>
- Tells the NPC to move at this speed (units per second) in its current direction of travel.
- Note: Movement is visibly choppy at very high speeds.
- SetAngles
<angle>
- Teleports the NPC to face the specified way. It may then immediately reorient itself however it sees fit.
- EnableRotorSound
- Enables flying sounds. (I.e. propeller blades.)
- DisableRotorSound
- Disables flying sounds.
- FlyToSpecificTrackViaPath
<target_destination>
- Tells the NPC to fly to the specified
path_track
. - StartPatrol
- Tells the NPC to go back and forth on the track it's currently following. Will not go in circles.
- StopPatrol
- Tells the NPC to stop patrolling its track.
- StartBreakableMovement
- Allows the NPC to move freely along its current path if it wants to attack an enemy it found.
- StopBreakableMovement
- Forces the NPC to fly on its patrol path again.
- ChooseFarthestPathPoint
- If breaking from patrol movement, tells the NPC it should try to go to the track node farthest away from the enemy within firing range.
- ChooseNearestPathPoint
- If breaking from patrol movement, tells the NPC it should try to go to the track node closest to the enemy.
- InputStartLeading (Not in FGD)
<integer>
- Tells the NPC to lead in front of its enemy by this distance.
- InputStopLeading (Not in FGD)
- Tells the NPC to stop leading in front of its enemy.
- SetMaxSpeed (only available in )
- Sets how fast the NPC can fly.