Skip to content

mission_task_dialogue

Source: base/tealdef/mission/tasks/dialogue/mission_task_dialogue.d.tl

Notes

Task that plays a dialogue (voice-overs, subtitles, portraits).

MissionTaskDialogue

record global base/tealdef/mission/tasks/dialogue/mission_task_dialogue.d.tl:3

global record MissionTaskDialogue is MissionInterface.TaskScript<MissionTaskDialogue.State, MissionTaskDialogue.Params>

Load: local dialogue = ug_require "::/mission/tasks/dialogue/dialogue.tl"

Notes

Task (dialogue) that plays a dialogue in the dialogue overlay when it starts and completes when the dialogue ends. If the GUI reloads while it plays, it is started again.

Example

-- urbangames_campaign_mission_01
taskScript = dialogue as MissionInterface.TaskScript<any, any>,
taskParams = {
    filePath = "urbangames_campaign_mission_01::/mission/keyframes/MISSION_01_CUTSCENE_BUILD_PATH.script@get",
    syncWithCutscene = true,
},
followup = { { taskKey = "bulldoze" } },

MissionTaskDialogue.Params

record base/tealdef/mission/tasks/dialogue/mission_task_dialogue.d.tl:4

record Params

Notes

Params of the task.

Used in the base game: 2 times in 1 file

base/content/mission/mission/tasks/dialogue/dialogue.tl:3

local type P = MissionTaskDialogue.Params

Fields

Name Type Description
filePath string Dialogue script. The campaign mods pass a languages.script key that maps to a per-language keyframe file.
syncWithCutscene boolean Plays the dialogue in sync with a cutscene running at the same time.

MissionTaskDialogue.State

enum base/tealdef/mission/tasks/dialogue/mission_task_dialogue.d.tl:8

enum State

Notes

Playback state.

Used in the base game: 3 times in 1 file

base/content/mission/mission/tasks/dialogue/dialogue.tl:2

local type S = MissionTaskDialogue.State

Value Description
"Initial" Not started (or restarted after a GUI reload).
"Playing" Playing.
"Complete" Ended.