# Enable/Disable Script Control For Unit Group

Grammarcontrolled script control for group|Unit Group
FlagsNative | Action

If script control is enabled for a unit, the AI will not use that unit. Script-controlled bullies are not replaced unless they die.

# Arguments

Returns — void

native void AISetGroupScriptControlled(
	unitgroup ug,
	bool enable,
);

Category: AI / MiscCampaign / Actions

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L337
AISetGroupScriptControlled(UnitLastCreatedGroup(), false)
// L349
AISetGroupScriptControlled(UnitLastCreatedGroup(), false)
// L353
AISetGroupScriptControlled(UnitLastCreatedGroup(), false)
// L421
AISetGroupScriptControlled(UnitCargoGroup(lv_dropship), true)
// L4070
AISetGroupScriptControlled(UnitGroup("SCV", gv_p03_DOMINION_SIEGE, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), false)
// L1609
AISetGroupScriptControlled(gv_initialStalkers, false)
// L2355
AISetGroupScriptControlled(lv_dropPodGroup, true)
// L2358
AISetGroupScriptControlled(lv_dropPodGroup, false)
// L2654
AISetGroupScriptControlled(lv_extraUnits, true)
// L2657
AISetGroupScriptControlled(lv_extraUnits, false)
// L2667
AISetGroupScriptControlled(lv_extraUnits, true)
// L2670
AISetGroupScriptControlled(lv_extraUnits, false)
// L2680
AISetGroupScriptControlled(lv_extraUnits, true)
// L2683
AISetGroupScriptControlled(lv_extraUnits, false)
// L2837
AISetGroupScriptControlled(gv_zergSpeedBumpUnits, false)
// L3885
AISetGroupScriptControlled(gv_gROUP_ZERG_SITE1_SHARKS, true)
// L4704
AISetGroupScriptControlled(gv_zergRushGroup03, false)
// L4716
AISetGroupScriptControlled(gv_zergRushGroup01, false)
// L4728
AISetGroupScriptControlled(gv_zergRushGroup02, false)
// L2517
AISetGroupScriptControlled(lv_dropPodGroup, true)
// L2541
AISetGroupScriptControlled(lv_dropPodGroup, false)
// L337
AISetGroupScriptControlled(UnitLastCreatedGroup(), false)
// L349
AISetGroupScriptControlled(UnitLastCreatedGroup(), false)
// L353
AISetGroupScriptControlled(UnitLastCreatedGroup(), false)
// L421
AISetGroupScriptControlled(UnitCargoGroup(lv_dropship), true)
// L4070
AISetGroupScriptControlled(UnitGroup("SCV", gv_p03_DOMINION_SIEGE, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), false)
// L1609
AISetGroupScriptControlled(gv_initialStalkers, false)
// L2355
AISetGroupScriptControlled(lv_dropPodGroup, true)
// L2358
AISetGroupScriptControlled(lv_dropPodGroup, false)
// L2654
AISetGroupScriptControlled(lv_extraUnits, true)
// L2657
AISetGroupScriptControlled(lv_extraUnits, false)
// L2667
AISetGroupScriptControlled(lv_extraUnits, true)
// L2670
AISetGroupScriptControlled(lv_extraUnits, false)
// L2680
AISetGroupScriptControlled(lv_extraUnits, true)
// L2683
AISetGroupScriptControlled(lv_extraUnits, false)
// L2837
AISetGroupScriptControlled(gv_zergSpeedBumpUnits, false)
// L3885
AISetGroupScriptControlled(gv_gROUP_ZERG_SITE1_SHARKS, true)
// L4704
AISetGroupScriptControlled(gv_zergRushGroup03, false)
// L4716
AISetGroupScriptControlled(gv_zergRushGroup01, false)
// L4728
AISetGroupScriptControlled(gv_zergRushGroup02, false)
// L2517
AISetGroupScriptControlled(lv_dropPodGroup, true)
// L2541
AISetGroupScriptControlled(lv_dropPodGroup, false)
// L408
AISetGroupScriptControlled(gv_swarmlingMassWave, true)
// L5351
AISetGroupScriptControlled(UnitLastCreatedGroup(), true)
// L5353
AISetGroupScriptControlled(UnitLastCreatedGroup(), true)
// L5355
AISetGroupScriptControlled(UnitLastCreatedGroup(), true)
// L5357
AISetGroupScriptControlled(UnitLastCreatedGroup(), true)
// L453
AISetGroupScriptControlled(lp_dROPGROUP, false)
// L625
AISetGroupScriptControlled(lv_aTTACK_GROUP, false)
// L542
AISetGroupScriptControlled(lv_attackingUnitGroup, true)
// L4726
AISetGroupScriptControlled(lv_fleeingunits, true)
// L4738
AISetGroupScriptControlled(lv_fleeingunits, false)
// L4265
AISetGroupScriptControlled(lv_rockAttackGroup, false)
// L2102
AISetGroupScriptControlled(UnitGroup("Sentry", gv_pLAYER_02_TALDARIM, RegionFromId(3), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), false)
// L2107
AISetGroupScriptControlled(UnitGroup("Sentry", gv_pLAYER_02_TALDARIM, RegionFromId(5), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), false)
// L2112
AISetGroupScriptControlled(UnitGroup("Sentry", gv_pLAYER_02_TALDARIM, RegionFromId(7), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), false)
// L408
AISetGroupScriptControlled(gv_swarmlingMassWave, true)
// L5351
AISetGroupScriptControlled(UnitLastCreatedGroup(), true)
// L5353
AISetGroupScriptControlled(UnitLastCreatedGroup(), true)
// L5355
AISetGroupScriptControlled(UnitLastCreatedGroup(), true)
// L5357
AISetGroupScriptControlled(UnitLastCreatedGroup(), true)
// L453
AISetGroupScriptControlled(lp_dROPGROUP, false)
// L625
AISetGroupScriptControlled(lv_aTTACK_GROUP, false)
// L542
AISetGroupScriptControlled(lv_attackingUnitGroup, true)
// L4726
AISetGroupScriptControlled(lv_fleeingunits, true)
// L4738
AISetGroupScriptControlled(lv_fleeingunits, false)
// L4265
AISetGroupScriptControlled(lv_rockAttackGroup, false)
// L2102
AISetGroupScriptControlled(UnitGroup("Sentry", gv_pLAYER_02_TALDARIM, RegionFromId(3), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), false)
// L2107
AISetGroupScriptControlled(UnitGroup("Sentry", gv_pLAYER_02_TALDARIM, RegionFromId(5), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), false)
// L2112
AISetGroupScriptControlled(UnitGroup("Sentry", gv_pLAYER_02_TALDARIM, RegionFromId(7), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), false)
// L1059
AISetGroupScriptControlled(gv_smartZerglings, true)
// L1067
AISetGroupScriptControlled(gv_smartHydras, true)
// L1075
AISetGroupScriptControlled(gv_smartMutas, true)
// L1225
AISetGroupScriptControlled(UnitLastCreatedGroup(), true)
// L1319
AISetGroupScriptControlled(lv_dropPodUnits, true)
// L3569
AISetGroupScriptControlled(gv_nextAttackWave, false)
// L3582
AISetGroupScriptControlled(gv_nextAttackWave, false)
// L3596
AISetGroupScriptControlled(gv_nextAttackWave, false)
// L3609
AISetGroupScriptControlled(gv_nextAttackWave, false)
// L3624
AISetGroupScriptControlled(gv_nextAttackWave, false)
// L3637
AISetGroupScriptControlled(gv_nextAttackWave, false)
// L3503
AISetGroupScriptControlled(lv_battlecruisers, false)
// L2223
AISetGroupScriptControlled(gv_sentryIntroAttackWaveGroup, false)
// L727
AISetGroupScriptControlled(gv_purifierStasisChambers[lp_containmentTowerIndex].lv_warpathGroup, false)
// L2318
AISetGroupScriptControlled(gv_mothershipEscort[1], false)
// L2334
AISetGroupScriptControlled(gv_mothershipEscort[2], false)
// L3055
AISetGroupScriptControlled(lv_waveGroup, false)
// L928
AISetGroupScriptControlled(lv_mutaGroup1, true)
// L939
AISetGroupScriptControlled(lv_mutaGroup2, true)
// L952
AISetGroupScriptControlled(lv_mutaGroup1, false)
// L953
AISetGroupScriptControlled(lv_mutaGroup2, false)
// L1059
AISetGroupScriptControlled(gv_smartZerglings, true)
// L1067
AISetGroupScriptControlled(gv_smartHydras, true)
// L1075
AISetGroupScriptControlled(gv_smartMutas, true)
// L1225
AISetGroupScriptControlled(UnitLastCreatedGroup(), true)
// L1319
AISetGroupScriptControlled(lv_dropPodUnits, true)
// L3569
AISetGroupScriptControlled(gv_nextAttackWave, false)
// L3582
AISetGroupScriptControlled(gv_nextAttackWave, false)
// L3596
AISetGroupScriptControlled(gv_nextAttackWave, false)
// L3609
AISetGroupScriptControlled(gv_nextAttackWave, false)