Ground of Aces Modding
Loading...
Searching...
No Matches
Get Completion Time

Missions.get_completion_time

Parameters

mission_entity_id Entity ID of the mission currently accessing the mission script

Returns

Int The time duration of a mission in game minutes

Description

Event handler that returns how long the flight lasts, in game minutes. It is called once, while the mission is created, and only for a mission without a .json - a mission with JSON takes the duration from its _timeToCompleteRange and never calls this handler. When the handler is missing the game uses 120 minutes.

import random
from Blindflug.FlightMission import MissionEvent
@event_handler(MissionEvent.GET_COMPLETION_TIME)
def get_completion_time(mission_entity_id):
# Return a random completion time between ten and twenty hours (600 to 1200 game minutes)
return random.randrange(600, 1200)
Definition FlightMissionEcsInstaller.cs:7