# Name Of Difficulty Level
Grammar — Name of difficulty level difficulty
Flags —Native
|Function
Returns the name of the difficulty level.
# Arguments
int
<difficulty> — Difficulty
Returns — text
native text DifficultyName(int inDifficulty);
# Related
Category: Player / Difficulty Levels
- Set Player Difficulty Level —
void
— PlayerSetDifficulty - Difficulty Level For Player —
int
<difficulty> — PlayerDifficulty - Difficulty Level Is Enabled —
bool
— DifficultyEnabled - Name Of Difficulty Level —
text
— DifficultyName - Name Of Campaign Difficulty Level —
text
— DifficultyNameCampaign - APM Of Difficulty Level —
int
— DifficultyAPM
# Examples
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:2919
TextExpressionSetToken("Param/Expression/lib_COMI_91DF939C", "time", libCOOC_gf_FormatTimeCampaign(FixedToInt(GameGetMissionTime())));
TextExpressionSetToken("Param/Expression/lib_COMI_91DF939C", "player", IntToText(lp_player));
TextExpressionSetToken("Param/Expression/lib_COMI_91DF939C", "diff", DifficultyName(lv_difficulty));
TextExpressionSetToken("Param/Expression/lib_COMI_91DF939C", "total", FixedToText(lv_waveResourceTotal, c_fixedPrecisionAny));
TriggerDebugOutput(3, TextExpressionAssemble("Param/Expression/lib_COMI_91DF939C"), libCOMI_gv_showAIDebugging);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:796
DialogControlHookup(lv_lastFrame, c_triggerControlTypeLabel, "Label");
libCOUI_gv_cU_CommanderDifficultyLabelSelf = DialogControlLastCreated();
libNtve_gf_SetDialogItemText(libCOUI_gv_cU_CommanderDifficultyLabelSelf, DifficultyName(libCOMI_gf_DifficultyLevelForPlayerCoop(1)), PlayerGroupSingle(1));
libNtve_gf_SetDialogItemText(libCOUI_gv_cU_CommanderDifficultyLabelSelf, DifficultyName(libCOMI_gf_DifficultyLevelForPlayerCoop(2)), PlayerGroupSingle(2));
DialogControlHookup(lv_compositionAlly, c_triggerControlTypePanel, "Difficulty");
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:797
libCOUI_gv_cU_CommanderDifficultyLabelSelf = DialogControlLastCreated();
libNtve_gf_SetDialogItemText(libCOUI_gv_cU_CommanderDifficultyLabelSelf, DifficultyName(libCOMI_gf_DifficultyLevelForPlayerCoop(1)), PlayerGroupSingle(1));
libNtve_gf_SetDialogItemText(libCOUI_gv_cU_CommanderDifficultyLabelSelf, DifficultyName(libCOMI_gf_DifficultyLevelForPlayerCoop(2)), PlayerGroupSingle(2));
DialogControlHookup(lv_compositionAlly, c_triggerControlTypePanel, "Difficulty");
lv_lastFrame = DialogControlLastCreated();
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:802
DialogControlHookup(lv_lastFrame, c_triggerControlTypeLabel, "Label");
libCOUI_gv_cU_CommanderDifficultyLabelAlly = DialogControlLastCreated();
libNtve_gf_SetDialogItemText(libCOUI_gv_cU_CommanderDifficultyLabelAlly, DifficultyName(libCOMI_gf_DifficultyLevelForPlayerCoop(1)), PlayerGroupSingle(2));
libNtve_gf_SetDialogItemText(libCOUI_gv_cU_CommanderDifficultyLabelAlly, DifficultyName(libCOMI_gf_DifficultyLevelForPlayerCoop(2)), PlayerGroupSingle(1));
DialogControlHookup(libCOUI_gv_cU_CommanderPanel, c_triggerControlTypeButton, "LevelUpButton");
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:803
libCOUI_gv_cU_CommanderDifficultyLabelAlly = DialogControlLastCreated();
libNtve_gf_SetDialogItemText(libCOUI_gv_cU_CommanderDifficultyLabelAlly, DifficultyName(libCOMI_gf_DifficultyLevelForPlayerCoop(1)), PlayerGroupSingle(2));
libNtve_gf_SetDialogItemText(libCOUI_gv_cU_CommanderDifficultyLabelAlly, DifficultyName(libCOMI_gf_DifficultyLevelForPlayerCoop(2)), PlayerGroupSingle(1));
DialogControlHookup(libCOUI_gv_cU_CommanderPanel, c_triggerControlTypeButton, "LevelUpButton");
libCOUI_gv_cU_CommanderLevelUpButton = DialogControlLastCreated();