HomeGamesUpdatesPricingMethodology
Steam News9 April 20262mo ago

class controls the behavior of a police (or enemy) helicopter in your game

What the CRHelliControl Class Does This class controls the behavior of a police (or enemy) helicopter in your game.

Full notes

Full City-Racing update

Read the full published notes in a cleaner layout. The original post stays linked below.

What changed

0 fixes0 additions14 changes0 removals
  • Gameplay
  • Balance
changedReacting to player actions (driving, stopping, attacking the helicopter)
changedHandling damage and retaliation logic
changedSets the initial target (the player’s car) and health.
changedPositioning and Movement
changed"Return to your vehicle immediately!" when targeting the player on foot and the player is not attacking.
changedOnly shoots if the player is attacking the helicopter (e.g., shooting at it). Stops shooting if the player stops attacking.

City-Racing changes

changedReacting to player actions (driving, stopping, attacking the helicopter)
changedHandling damage and retaliation logic
changedSets the initial target (the player’s car) and health.
changedPositioning and Movement
changed"Return to your vehicle immediately!" when targeting the player on foot and the player is not attacking.

What the CRHelliControl Class Does

This class controls the behavior of a police (or enemy) helicopter in your game. It manages:

  • Following the player (whether in the car or on foot)

  • Coordinating with other helicopters to surround the player (front, back, left, right)

  • Displaying warning messages to the player

  • Deciding when to shoot missiles at the player or their car

  • Reacting to player actions (driving, stopping, attacking the helicopter)

  • Handling damage and retaliation logic

---

How the Class Works (Key Sections)

  1. Initialization

  • Sets up message styles for GUI/TextMeshPro.

  • Registers the helicopter with a coordinator (if present) to get its assigned position (side) around the player.

  • Sets the initial target (the player’s car) and health.

  1. Target Tracking

  • The helicopter always tracks either the player’s car or the player on foot.

  • If the player gets out of the car, the helicopter targets the player; otherwise, it targets the car.

  1. Positioning and Movement

  • Each helicopter uses its assigned “side” (front, back, left, right) to calculate a unique offset around the player/car.

  • The helicopter moves smoothly to its assigned position and rotates to face the player/car.

  1. Warning Messages

  • Shows context-sensitive warnings:

  • "Pull over and turn off the car!" when targeting the car.

  • "Return to your vehicle immediately!" when targeting the player on foot and the player is not attacking.

  • "CEASE FIRE! Helicopter retaliating!" when the player attacks the helicopter.

  • Messages are displayed using either GUI labels or TextMeshPro, depending on your settings.

  1. Shooting Logic

  • At the car:

Shoots missiles if the car is moving or the engine is on. Stops shooting when the car is stopped and the engine is off.

  • At the player on foot:

Only shoots if the player is attacking the helicopter (e.g., shooting at it). Stops shooting if the player stops attacking.

  • Retaliation:

After being attacked, the helicopter will keep shooting for a set retaliation time, then stop if the player stops attacking.

  1. Damage Handling

  • When the helicopter takes damage from the player, it enters retaliation mode and updates the warning message.

  • If health drops to zero, the helicopter is destroyed.

  1. Missile Firing

  • When allowed to shoot, the helicopter fires homing missiles at its current target at set intervals.

---

Why This Design?

  • Fairness:

The helicopter only attacks when the player is a threat (driving away or attacking). If the player complies (stops and turns off the car, or gets out and doesn’t attack), the helicopter stops shooting.

  • Immersion:

Contextual warnings and coordinated helicopter movement create a realistic and engaging police chase experience.

  • Scalability:

The coordinator system allows for multiple helicopters to work together without overlapping, surrounding the player from all sides.

  • Clarity:

The code is organized so each responsibility (movement, targeting, messaging, shooting, damage) is clear and easy to maintain.

---

In summary:

Your CRHelliControl class creates a dynamic, fair, and immersive helicopter AI that responds intelligently to the player’s actions, coordinates with other helicopters, and provides clear feedback through warnings and attacks. This makes for exciting and believable gameplay!

Source

Steam News / 9 April 2026

Open original post

Changelog.gg summarizes and formats this update. How we read updates.