# Set APM
Grammar — Set the APM count for player player to aPM
Flags —Native
|Action
Limits the actions per minute of a computer player.
# Arguments
int
— Playerint
— APM
Returns — void
native void AISetAPM(int player, int apm);
# Related
Category: AI Advanced / Utility / Actions
- [F] —
void
— Start AI — ( AIStart ) - [F] —
void
— Accept Surrender — ( AIGoodGame ) - [F] —
void
— Init Melee AI — ( AIMeleeStart ) - [F] —
void
— Set APM — ( AISetAPM ) - [F] —
void
— Release Unit — ( AIReleaseUnit ) - [F] —
void
— Set State — ( AISetSpecificState ) - [F] —
void
— Set All States — ( AISetAllStates ) - [F] —
void
— Set Flag — ( AISetFlag ) - [F] —
void
— Set Coop Flag — ( AISetCoopFlag ) - [F] —
void
— Set Tech Flag State — ( AITechFlag ) - [F] —
void
— Set Unit Evaluation Custom Index — ( AIEvalSetCustomIndex ) - [F] —
void
— Enable/Disable AI Option For Unit — ( UnitSetAIOption ) - [F] —
void
— Set Defense Radii — ( AISetDefenseRadii )
# Examples
# campaigns/liberty.sc2campaign
// L1201
AISetAPM(gv_p2_ENEMY_ZERG, 3000)
// L1202
AISetAPM(gv_p3_ENEMY_PROTOSS, 3000)
// L3217
AISetAPM(gv_p2_RAYNOR_LIGHTBLUE, 10000)
// L3229
AISetAPM(gv_p2_RAYNOR_LIGHTBLUE, 3000)
// L3230
AISetAPM(gv_p8_ALLIED_PINK, 3000)
// L3231
AISetAPM(gv_p9_ALLIED_GREEN, 3000)
// L3232
AISetAPM(gv_p3_DOMINION_RED, libNtve_gf_DifficultyValueInt(400, 800, 3000, 3000))
// L1669
AISetAPM(gv_pLAYER_ZERG_MAIN, 9001)
// L1670
AISetAPM(gv_pLAYER_ZERG_SOUTH, 9001)
// L1671
AISetAPM(gv_pLAYER_ZERG_EAST, 9001)
// L1672
AISetAPM(gv_pLAYER_ZERG_SPECIAL, 9001)
// L3217
AISetAPM(gv_p2_RAYNOR_LIGHTBLUE, 10000)
// L3229
AISetAPM(gv_p2_RAYNOR_LIGHTBLUE, 3000)
// L3230
AISetAPM(gv_p8_ALLIED_PINK, 3000)
// L3231
AISetAPM(gv_p9_ALLIED_GREEN, 3000)
// L3232
AISetAPM(gv_p3_DOMINION_RED, libNtve_gf_DifficultyValueInt(400, 800, 3000, 3000))
// L1669
AISetAPM(gv_pLAYER_ZERG_MAIN, 9001)
// L1670
AISetAPM(gv_pLAYER_ZERG_SOUTH, 9001)
// L1671
AISetAPM(gv_pLAYER_ZERG_EAST, 9001)
// L1672
AISetAPM(gv_pLAYER_ZERG_SPECIAL, 9001)
// L1201
AISetAPM(gv_p2_ENEMY_ZERG, 3000)
// L1202
AISetAPM(gv_p3_ENEMY_PROTOSS, 3000)
// L4126
AISetAPM(gv_pLAYER_02_ZERG, 10000)
// L4553
AISetAPM(gv_PLAYER_07_DOMINION_GREEN22, 10000)
// L4126
AISetAPM(gv_pLAYER_02_ZERG, 10000)
// L4553
AISetAPM(gv_PLAYER_07_DOMINION_GREEN22, 10000)
// L1346
AISetAPM(autoF0CFB556_var, 3000)
// L4366
AISetAPM(gv_pLAYER_02_DOMINION, 10000)
// L4367
AISetAPM(gv_pLAYER_02_DOMINION2, 10000)
// L1346
AISetAPM(autoF0CFB556_var, 3000)
// L4366
AISetAPM(gv_pLAYER_02_DOMINION, 10000)
// L4367
AISetAPM(gv_pLAYER_02_DOMINION2, 10000)
// L2734
AISetAPM(gv_pLAYER_03_FERALZERG_MIDDLEBULLIES, 3000)
// L2734
AISetAPM(gv_pLAYER_03_FERALZERG_MIDDLEBULLIES, 3000)