API Reference GE Extensions flowgraph nodes ui Mission End Screen (Flowgraph Node) - **Node Name:** `Mission End Screen`
Node Name: Mission End Screen
Category: once_instant
File: extensions/flowgraph/nodes/ui/missionEndScreen.lua
Shows the end screen of a scenario/mission with customizable buttons, progress data, and leaderboard information. Supports retry, continue, and user-defined custom buttons.
Pin Type Hidden Description textstring / table no Subtext of the menu (string or multiDescription table) failedbool yes Whether the player failed changetable no Aggregate attempt change data (from attempt node) progressKeystring no Key for the attempt progress customBtnsFirstbool yes If true, custom buttons appear before default buttons
Pin Type Description retryflow Fires when the player pressed "Retry" contStartflow Fires when the player pressed "Continue at mission Start" contHereflow Fires when the player pressed "Continue Here" (dynamic) flow Custom button outputs (added via editor)
Field Default Description includeRetryButtontrueWhether to show the Retry button includeScenarioButton- Whether to show a Scenarios button
Field Purpose self.openWhether the end screen is currently displayed self.optionsArray of custom button names self.oldOptionsPrevious button names for pin management
workOnce() - Calls openDialogue() to display the end screen.
openDialogue() - Builds the end screen data:
Creates default buttons : Retry, Continue at Start, Continue Here, and optionally next-mission buttons.
Creates custom buttons from self.options (added via the editor UI).
Orders buttons based on customBtnsFirst pin.
Builds statsData with fail/pass state and text content.
If change pin has data, builds missionData with leaderboard keys, formatted progress, and star data.
Triggers guihooks.trigger('ChangeState', {state = 'scenario-end', params = endData}).
buttonPushed(action) - Called from UI via Lua command string. Sets the matching output flow pin and closes the dialogue.
closeDialogue() - Triggers ChangeState back to 'play' mode.
drawCustomProperties() - Editor UI for adding/removing/renaming custom buttons.
updateButtons() - Dynamically creates/removes pins for custom buttons while preserving existing links.
Tutorial mode : If the linear tutorial is incomplete, only the "Continue Here" button is shown.
Career mode : "Continue Here" only available when using player's own vehicle or career is inactive.
Scenario mode : Shows "Scenarios" button instead of "Continue at Start".
onResetGameplay() - Auto-triggers retry if the end screen is open and retry is enabled.
-- The end screen is triggered via guihooks:
guihooks. trigger ( 'ChangeState' , {
state = 'scenario-end' ,
params = {
missionData = { ... },
stats = {
overall = { failed = false , medal = "none" },
buttons = {
{ label = 'ui.common.retry' , cmd = '...' , focus = true , active = true },
{ label = 'missions.missions.general.end.continueHere' , cmd = '...' },
},
title = "" ,
text = "You completed the mission!" ,
}
}
})
_onSerialize() - Saves options (custom button names).
_onDeserialized() - Restores options and rebuilds dynamic pins.
guihooks.trigger('ChangeState', ...) - State transition to scenario-end screen
gameplay_missions_progress - Leaderboard and progress formatting
gameplay_missions_missions - Mission lookup for next-mission buttons
career_career - Career state checks
career_modules_linearTutorial - Tutorial state checks
C:getCmd(action) - Function handling getCmd logic
Input Pin: _active (any)
Input Pin: timeStr (any)