TWC GamePlay Methods

This page contains a comprehensive list of TWC gameplay methods used in IL-2 Cliffs of Dover scripting. Click on a function name to see detailed usage, examples, and Flug's insights.

Method Name Description Flug's Insight Example Usage
gpAllPlayers() Returns all human players currently in-game. Ensure to filter out spectators for accurate player counts. View Example
gpNumberOfPlayers() Returns the total number of human players. May include spectators; refine count as needed. View Example
gpGetNearestAirfield() Finds the nearest airfield to a given location. Useful for navigation but may not exclude inactive fields. View Example
gpCreateEffect() Spawns visual effects like smoke or fire at specified coordinates. Great for immersion but use sparingly to prevent performance issues. View Example
gpFlightTakeoffFrom() Handles aircraft takeoff from an airport. Ensure airfields are operational before calling. View Example
gpFlightLandAt() Handles aircraft landing at an airport. Effective for AI landings but may require tuning. View Example
gpHasAntiairDefence() Checks if an airport has anti-air defenses. Useful for planning bombing runs or airfield strikes. View Example