# Difficulty Level Is Enabled
Grammar — Difficulty level difficulty is enabled
Flags —Native
|Function
Returns true if the difficulty level is enabled.
# Arguments
int
<difficulty> — Difficulty
Returns — bool
native bool DifficultyEnabled(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
campaigns/liberty.sc2campaign — base.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.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));