# APM Of Difficulty Level
Grammar — Actions Per Minute for difficulty level difficulty
Flags —Native
|Function
Returns the actions per minute for the difficulty level specified.
# Arguments
int
<difficulty> — Difficulty
Returns — int
native int DifficultyAPM(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/core.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:107
int attackersLimit;
AIStart(player, false, DifficultyAPM(diff));
if (diff == c_skirChInsane) {
mods/core.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:244
int diff = AIPlayerDifficulty(player);
AIStart(player, true, DifficultyAPM(diff));
AIDeclareTown(player, c_townOne, PlayerStartLocation(player));
AISetMainTown(player, c_townOne);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:143
int attackersLimit;
AIStart(player, false, DifficultyAPM(diff));
if (diff == c_skirChInsane) {
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:287
int attackersLimit;
AIStart(player, true, DifficultyAPM(diff));
AIDeclareTown(player, c_townOne, PlayerStartLocation(player));
AISetMainTown(player, c_townOne);