# Enable/Disable Script Control For Unit

Grammarcontrolled script control for unit
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 AISetUnitScriptControlled(unit u, bool enable);

Category: AI / MiscCampaign / Actions

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L410
AISetUnitScriptControlled(lv_u, false)
// L3681
AISetUnitScriptControlled(EventUnit(), true)
// L632
AISetUnitScriptControlled(auto97A1CCEC_var, true)
// L2843
AISetUnitScriptControlled(EventUnitProgressUnit(), true)
// L2849
AISetUnitScriptControlled(EventUnitProgressUnit(), true)
// L6800
AISetUnitScriptControlled(UnitLastCreated(), true)
// L6803
AISetUnitScriptControlled(UnitLastCreated(), true)
// L6806
AISetUnitScriptControlled(UnitLastCreated(), true)
// L314
AISetUnitScriptControlled(UnitLastCreated(), false)
// L322
AISetUnitScriptControlled(UnitLastCreated(), false)
// L2061
AISetUnitScriptControlled(UnitLastCreated(), true)
// L2086
AISetUnitScriptControlled(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_escort, false)
// L4545
AISetUnitScriptControlled(UnitLastCreated(), true)
// L4558
AISetUnitScriptControlled(UnitLastCreated(), true)
// L4569
AISetUnitScriptControlled(autoAB0F86D0_var, false)
// L4630
AISetUnitScriptControlled(UnitLastCreated(), true)
// L4643
AISetUnitScriptControlled(UnitLastCreated(), true)
// L4654
AISetUnitScriptControlled(auto4C79756C_var, false)
// L4713
AISetUnitScriptControlled(UnitLastCreated(), true)
// L4724
AISetUnitScriptControlled(auto823F4E57_var, false)
// L617
AISetUnitScriptControlled(autoD10EC4F1_var, true)
// L3153
AISetUnitScriptControlled(lv_raven, true)
// L3210
AISetUnitScriptControlled(lv_raven, true)
// L3267
AISetUnitScriptControlled(lv_raven, true)
// L3324
AISetUnitScriptControlled(lv_raven, true)
// L502
AISetUnitScriptControlled(UnitFromId(2243), false)
// L503
AISetUnitScriptControlled(UnitFromId(2242), false)
// L1410
AISetUnitScriptControlled(UnitFromId(2), false)
// L1676
AISetUnitScriptControlled(UnitFromId(2), false)
// L1835
AISetUnitScriptControlled(UnitFromId(835), false)
// L3211
AISetUnitScriptControlled(UnitFromId(2), true)
// L2290
AISetUnitScriptControlled(gv_supplyDepotSCV, true)
// L2300
AISetUnitScriptControlled(gv_supplyDepotSCV, true)
// L2342
AISetUnitScriptControlled(gv_supplyDepotSCV, false)
// L6787
AISetUnitScriptControlled(autoF3942310_var, false)
// L6797
AISetUnitScriptControlled(auto664148D3_var, false)
// L6807
AISetUnitScriptControlled(autoFA9D59B5_var, false)
// L6817
AISetUnitScriptControlled(auto2C0BF552_var, false)
// L6906
AISetUnitScriptControlled(UnitLastCreated(), true)
// L2653
AISetUnitScriptControlled(auto7E78CD21_var, false)
// L435
AISetUnitScriptControlled(auto0AC6FF7D_var, true)
// L1113
AISetUnitScriptControlled(autoD1992A21_var, false)
// L1462
AISetUnitScriptControlled(auto8FCB7650_var, true)
// L1653
AISetUnitScriptControlled(UnitFromId(1341), false)
// L1654
AISetUnitScriptControlled(UnitFromId(344), false)
// L1360
AISetUnitScriptControlled(gv_initialMarines[lv_i], false)
// L1433
AISetUnitScriptControlled(gv_aOEMarines[lv_i], false)
// L1549
AISetUnitScriptControlled(lv_searcher, false)
// L3041
AISetUnitScriptControlled(auto87C9B864_var, false)
// L3050
AISetUnitScriptControlled(auto5B138040_var, false)
// L3154
AISetUnitScriptControlled(auto93529AFD_var, false)
// L3163
AISetUnitScriptControlled(auto190CD919_var, false)
// L3196
AISetUnitScriptControlled(EventUnit(), false)
// L3498
AISetUnitScriptControlled(lv_chosenTank, false)
// L957
AISetUnitScriptControlled(UnitFromId(109), false)
// L2755
AISetUnitScriptControlled(EventUnit(), true)
// L4719
AISetUnitScriptControlled(UnitLastCreated(), true)
// L4722
AISetUnitScriptControlled(UnitLastCreated(), true)
// L1416
AISetUnitScriptControlled(autoC51C3702_var, false)
// L487
AISetUnitScriptControlled(autoB5535D35_var, true)
// L496
AISetUnitScriptControlled(auto4F3CD872_var, false)
// L1311
AISetUnitScriptControlled(UnitFromId(83), true)
// L1722
AISetUnitScriptControlled(UnitFromId(539), false)
// L1736
AISetUnitScriptControlled(UnitFromId(539), false)
// L4046
AISetUnitScriptControlled(UnitLastCreated(), true)
// L4048
AISetUnitScriptControlled(UnitLastCreated(), true)
// L4050
AISetUnitScriptControlled(UnitLastCreated(), true)
// L2614
AISetUnitScriptControlled(gv_uNITDaMothership, true)
// L2619
AISetUnitScriptControlled(gv_uNITDaMothership, false)
// L2656
AISetUnitScriptControlled(gv_uNITDaMothership, true)
// L2661
AISetUnitScriptControlled(gv_uNITDaMothership, false)
// L5363
AISetUnitScriptControlled(UnitLastCreated(), true)
// L5373
AISetUnitScriptControlled(UnitLastCreated(), true)
// L5384
AISetUnitScriptControlled(UnitLastCreated(), true)
// L5437
AISetUnitScriptControlled(UnitLastCreated(), true)
// L5447
AISetUnitScriptControlled(UnitLastCreated(), true)
// L5458
AISetUnitScriptControlled(UnitLastCreated(), true)
// L5511
AISetUnitScriptControlled(UnitLastCreated(), true)
// L5521
AISetUnitScriptControlled(UnitLastCreated(), true)
// L5532
AISetUnitScriptControlled(UnitLastCreated(), true)
// L1219
AISetUnitScriptControlled(gv_leviathan, false)
// L1327
AISetUnitScriptControlled(gv_leviathan, false)
// L1415
AISetUnitScriptControlled(auto4CDF0813_var, false)
// L2836
AISetUnitScriptControlled(EventUnit(), true)
// L866
AISetUnitScriptControlled(gv_kerrigan, true)
// L2718
AISetUnitScriptControlled(gv_leviathan, false)
// L2725
AISetUnitScriptControlled(gv_leviathan, false)
// L3416
AISetUnitScriptControlled(gv_kerrigan, true)
// L3524
AISetUnitScriptControlled(auto8ED32D2A_var, false)
// L3527
AISetUnitScriptControlled(gv_kerrigan, false)
// L3989
AISetUnitScriptControlled(gv_zergDefenders[lv_unitIndex].lv_unit, false)
// L2077
AISetUnitScriptControlled(gv_hybridPhysical, false)
// L6296
AISetUnitScriptControlled(gv_omegalisk1, true)
// L6299
AISetUnitScriptControlled(gv_omegalisk2, true)
// L6302
AISetUnitScriptControlled(gv_omegalisk3, true)
// L410
AISetUnitScriptControlled(lv_u, false)
// L3681
AISetUnitScriptControlled(EventUnit(), true)
// L632
AISetUnitScriptControlled(auto97A1CCEC_var, true)
// L2843
AISetUnitScriptControlled(EventUnitProgressUnit(), true)
// L2849
AISetUnitScriptControlled(EventUnitProgressUnit(), true)