# Set Next Mission Difficulty
Grammar — Set the difficulty level of the next mission to difficulty for players
Flags —Native
|Action
Sets the difficulty for the specified player for the next map. Only supported in single player offline games.
# Arguments
playergroup
— Playersint
<difficulty> — Difficulty
Returns — void
native void SetNextMissionDifficulty(
playergroup inPlayerGroup,
int inDifficultyLevel,
);
# Related
Category: Game / Transitions
- GameSetNextCampaignIndex —
void
— GameSetNextCampaignIndex - End Game For Player —
void
— GameOver - Restart Game —
void
— RestartGame - Kick From Game —
void
— KickFromGame - Set Next Map —
void
— GameSetNextMap - Set Transition Map —
void
— GameSetTransitionMap - Set Next Mission Difficulty —
void
— SetNextMissionDifficulty - Game Is Transitioned —
bool
— GameIsTransitionMap
# Examples
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:8350
// Implementation
SetNextMissionDifficulty(PlayerGroupAll(), lp_difficulty);
if ((lp_nextIsSimulation == false)) {
libCamp_gf_TS_SetCampaignDifficulty(lp_difficulty);
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:8448
}
SetNextMissionDifficulty(PlayerGroupSingle(1), lp_difficulty);
if (((libCamp_gv_tSX_IsSimulation == true) || (libCamp_gf_MissionStatusCheck(libCamp_ge_MapID_MapTValerian03, libCamp_ge_MissionStatus_Completed) == true))) {
lv_image = "HyperionLoadingScreenImage";
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:12781
// Automatic Variable Declarations
// Implementation
SetNextMissionDifficulty(PlayerGroupAll(), lp_difficulty);
if ((lp_nextIsSimulation == false)) {
libSwaC_gf_ZS_SetCampaignDifficulty(lp_difficulty);
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:12834
}
SetNextMissionDifficulty(PlayerGroupSingle(1), lp_difficulty);
libSwaC_gf_ZS_SaveAllTransitionData(false, false, (lp_victoryDefeat == c_gameOverDefeat));
libSwaC_gf_ZS_PrepareLoadingScreen(lv_nextMap, false);
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:6660
// Automatic Variable Declarations
// Implementation
SetNextMissionDifficulty(PlayerGroupAll(), lp_difficulty);
if ((lp_nextIsSimulation == false)) {
libVoiC_gf_PC_SetCampaignDifficulty(lp_difficulty);
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:6705
lv_nextMap = libVoiC_gf_PostMissionStoryMap(libVoiC_gf_CurrentMap(), libVoiC_gv_pCX_IsSimulation, lp_victoryDefeat, false);
}
SetNextMissionDifficulty(PlayerGroupSingle(1), lp_difficulty);
libVoiC_gf_PS_SaveAllTransitionData(false, false, (lp_victoryDefeat == c_gameOverDefeat));
libVoiC_gf_PC_PrepareLoadingScreen(lv_nextMap, false);
mods/missionpacks/campaigncommon.sc2mod — base.sc2data/LibComC.galaxy:2900
void libComC_gf_CC_TransitionPrepareMissionLaunch (string lp_nextMission, bool lp_nextIsSimulation, bool lp_nextIsVictoryAgain, int lp_difficulty) {
// Implementation
SetNextMissionDifficulty(PlayerGroupAll(), lp_difficulty);
if ((lp_nextIsSimulation == false)) {
libComC_gf_CC_SetCampaignDifficulty(lp_difficulty);
mods/missionpacks/campaigncommon.sc2mod — base.sc2data/LibComC.galaxy:2936
}
SetNextMissionDifficulty(PlayerGroupSingle(1), lp_difficulty);
libComC_gf_NS_SaveAllTransitionData(false, false, (lp_victoryDefeat == c_gameOverDefeat));
libComC_gf_NC_PrepareLoadingScreen(libComC_gv_cC_TransitionNextMap, false);
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:5937
// Automatic Variable Declarations
// Implementation
SetNextMissionDifficulty(PlayerGroupAll(), lp_difficulty);
if ((lp_nextIsSimulation == false)) {
libA3DDD02B_gf_PP_SetCampaignDifficulty(lp_difficulty);
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:5978
}
SetNextMissionDifficulty(PlayerGroupSingle(1), lp_difficulty);
libA3DDD02B_gf_PP_SaveAllTransitionData(false, false, (lp_victoryDefeat == c_gameOverDefeat));
libA3DDD02B_gf_PP_PrepareLoadingScreen(lv_nextMap, false);