Ground of Aces Scripting API
Get Mission Result Text

Mission.get_mission_result_text

Parameters

mission_entity_id Entity ID of the mission currently accessing the mission script

Returns

String The localization key for the mission result text.

Description

Event handler that returns the localization key used to display the mission result in the mission result window. This event handler is invoked at the end of the mission.

# Set the localized term for mission_result_good and mission_result_bad
localization.SetTerm("en", "mission_result_good", "Mission result success")
localization.SetTerm("en", "mission_result_bad", "Mission result bad")
@event_handler(MissionEvent.GET_MISSION_RESULT_TEXT)
def get_mission_result_text(mission_entity_id):
is_mission_successful = missions_api.IsMissionSuccessful(mission_entity_id)
# Return the key for the localized mission result text based on mission outcome
if is_mission_successful:
return "mission_result_good"
else:
return "mission_result_bad"

⚠️ Localization key needs to be unique to avoid conflicts with other localization entries ⚠️