# Set Player Difficulty Level

Grammar — Set player player difficulty level to difficultyLevel
FlagsNative | Action

Sets the difficulty level for the specified player.

# Arguments

  • int — Player
  • int [ difficulty ] — Difficulty Level

Returns — void

native void PlayerSetDifficulty(
	int inPlayer,
	int inDifficulty,
);

Category: Player / Difficulty Levels

# Examples

# campaigns/void.sc2campaign

MapScript.galaxy

// L1345
PlayerSetDifficulty(autoF0CFB556_var, 4)
// L1345
PlayerSetDifficulty(autoF0CFB556_var, 4)

# campaigns/voidstory.sc2campaign

VoidCampaignStoryLib.galaxy

// L5469
PlayerSetDifficulty(1, libVCUI_gf_PU_MissionSelectedDifficulty())
// L5492
PlayerSetDifficulty(1, libVCUI_gf_PU_MissionSelectedDifficulty())

# campaigns/voidstory.sc2campaign

VoidCampaignUILib.galaxy

// L7868
PlayerSetDifficulty(1, libVCUI_gf_PU_MissionSelectedDifficulty())

# mods/missionpacks/novacampaign.sc2mod

LibNCUI.galaxy

// L5703
PlayerSetDifficulty(1, libNCUI_gf_NU_MissionSelectedDifficulty())

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L1090
PlayerSetDifficulty(lp_player, libCOMI_gf_GetMissionDifficulty())
// L12343
PlayerSetDifficulty(1, PlayerDifficulty(3))
// L12347
PlayerSetDifficulty(2, PlayerDifficulty(4))

# mods/starcoop/starcoop.sc2mod

LibCOOC.galaxy

// L4629
PlayerSetDifficulty(lv_indexPlayer, 2)
// L4698
PlayerSetDifficulty(lv_indexPlayer, 2)