# Difficulty Level Is Enabled

Grammar — Difficulty level difficulty is enabled
FlagsNative | Function

Returns true if the difficulty level is enabled.

# Arguments

  • int<difficulty> — Difficulty

Returns — bool

native bool DifficultyEnabled(int inDifficulty);

Category: Player / Difficulty Levels

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10468

void gf_ZPlanetPanelAddDifficultyLevelToDropdown (int lp_difficulty) {
    // Implementation
    if ((DifficultyEnabled(lp_difficulty) == true)) {
        gv_zPlanetPanel_DropdownDifficultyCount += 1;
        DialogControlAddItem(DialogControlLastCreated(), PlayerGroupAll(), TextCase(DifficultyNameCampaign(lp_difficulty), true));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:10468

void gf_ZPlanetPanelAddDifficultyLevelToDropdown (int lp_difficulty) {
    // Implementation
    if ((DifficultyEnabled(lp_difficulty) == true)) {
        gv_zPlanetPanel_DropdownDifficultyCount += 1;
        DialogControlAddItem(DialogControlLastCreated(), PlayerGroupAll(), TextCase(DifficultyNameCampaign(lp_difficulty), true));