Gunship
Jump to navigation
Jump to search
GPhys.Types.Objects.FlyingNPCs.GunShip

The Gunship is a powerful flying GNPC in GPhys. It is equipped with a rapid-fire machine gun and a devastating belly cannon, and features advanced AI for patrolling, hunting, and attacking targets.
Accessible Variables
- Max Speed (maxSpeed)
- Maximum flight speed. Default: 25.
- Acceleration (acceleration)
- Acceleration rate. Default: 6.
- Turn Speed (turnSpeed)
- How quickly the Gunship can turn. Default: 0.08.
- Detection Range (detectionRange)
- How far the Gunship can detect targets. Default: 300.
- Attack Range (attackRange)
- Maximum range for attacking. Default: unlimited.
- Machine Gun Damage (machineGunDamage)
- Damage per bullet. Default: 8.
- Hover Height (hoverHeight)
- Preferred altitude when hovering. Default: 30.
- Min/Max Flight Height (minFlightHeight, maxFlightHeight)
- Altitude limits for flight.
- Obstacle Avoidance (obstacleAvoidanceRange, obstacleAvoidanceForce)
- Range and force for avoiding obstacles.
- Boundary (boundaryMin, boundaryMax, boundaryForce)
- World boundaries and force applied to stay within them.
- Is Live Event Ship (isLiveEventShip)
- If true, triggers network events on spawn.
- Don't Play Music (dontPlayMusic)
- If true, disables music on spawn/death.
Inputs
- SetTargetPosition <Vector3, float>
- Overrides the Gunship's target position and speed.
- HandleForceChangeState <string>
- Forces the Gunship into a specific state (Patrol, Hunt, Attack, Dead, BellyCannonAttack).
- AddSequence <GunShipSequence>
- Adds a custom AI sequence to the Gunship.
- TakeDamage <float>
- Applies damage to the Gunship.
- Destroy
- Destroys the Gunship.
Outputs
- OnBellyCannonHit
- Fires when the belly cannon successfully hits a target.
- OnDie
- Fires when the Gunship is destroyed.
- OnTakeDamage
- Fires when the Gunship takes damage.
Dedicated Console Variables
- sk_gunship_burst_rate (float)
- Minimum time before attacking again. Default: 0.01.
- sk_gunship_burst_rate_max (float)
- Maximum time before attacking again. Default: 0.03.
- sk_gunship_burst_size (int)
- Number of bullets per attack burst. Default: 35.
- g_debug_gunship (int)
- Enables debug information for the Gunship. Default: 0.
- gunship_omniscient (int)
- If enabled, the Gunship always knows the player's position, even through walls.
- gunship_blindfire (int)
- If enabled, the Gunship will shoot at the player's last known position after losing sight.