Ground of Aces Modding
Loading...
Searching...
No Matches
Get Enemy Count

Missions.get_enemy_count

Parameters

mission_entity_id Entity ID of the mission currently accessing the mission script

Returns

Int The number of enemy airplanes the intel report shows.

Description

Event handler that returns the number of enemy airplanes the pilots participating in the mission will have to face. It is called once, while the mission is created, and only for a mission without a .json - a mission with JSON shows its _enemyPlaneReport instead. When the handler is missing the game uses 0.

The mission info window draws one icon per enemy plane, so keep the count modest.

import random
from Blindflug.FlightMission import MissionEvent
@event_handler(MissionEvent.GET_ENEMY_COUNT)
def get_enemy_count(mission_entity_id):
# Return a random number of enemies between 2 and 10
return random.randrange(2, 10)
Definition FlightMissionEcsInstaller.cs:7