# Change Autocast Mode

Grammar — Turn abilCmd auto cast autocastOn|On/Off
FlagsNative | Function

Returns an order to change the autocast mode for an ability command. This is primarily for use in “Issue Order” and “Issue Order To Unit Group” actions.

# Arguments

  • abilcmd — Ability Command
  • bool [ preset::OnOffOption ] — Autocast On

Returns — order

native order OrderSetAutoCast(
	abilcmd inAbilCmd,
	bool inAutoCastOn,
);

Category: Order / Orders To Be Issued

# Examples

# campaigns/liberty.sc2campaign

TactCampAI.galaxy

// L18
OrderSetAutoCast(repaircmd, false)

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L661
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), true)
// L2053
OrderSetAutoCast(AbilityCommand("CarrierHangar", 0), true)
// L2852
OrderSetAutoCast(AbilityCommand("CarrierHangar", 0), true)
// L500
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L501
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L434
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), true)
// L3049
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L3162
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L3779
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L3820
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L3861
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L3902
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L575
OrderSetAutoCast(AbilityCommand("SapStructure", 0), true)
// L8313
OrderSetAutoCast(AbilityCommand("SapStructure", 0), true)
// L709
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), true)
// L775
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), false)
// L776
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), false)
// L782
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), false)
// L784
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), false)
// L785
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), false)
// L818
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), false)
// L826
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), false)
// L834
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), false)
// L898
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), false)
// L484
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), true)
// L485
OrderSetAutoCast(AbilityCommand("BurrowHydraliskUp", 0), true)
// L486
OrderSetAutoCast(AbilityCommand("BurrowRoachUp", 0), true)
// L487
OrderSetAutoCast(AbilityCommand("BurrowBanelingUp", 0), true)
// L1027
OrderSetAutoCast(AbilityCommand("SapStructure", 0), true)
// L661
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), true)
// L2053
OrderSetAutoCast(AbilityCommand("CarrierHangar", 0), true)
// L2852
OrderSetAutoCast(AbilityCommand("CarrierHangar", 0), true)
// L500
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L501
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L434
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), true)
// L3049
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L3162
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L3779
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L3820
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L3861
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L3902
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L575
OrderSetAutoCast(AbilityCommand("SapStructure", 0), true)
// L8313
OrderSetAutoCast(AbilityCommand("SapStructure", 0), true)
// L709
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), true)
// L775
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), false)
// L776
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), false)
// L782
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), false)
// L784
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), false)
// L785
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), false)
// L818
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), false)
// L826
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), false)
// L834
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), false)
// L898
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), false)
// L484
OrderSetAutoCast(AbilityCommand("BurrowZerglingUp", 0), true)
// L485
OrderSetAutoCast(AbilityCommand("BurrowHydraliskUp", 0), true)
// L486
OrderSetAutoCast(AbilityCommand("BurrowRoachUp", 0), true)
// L487
OrderSetAutoCast(AbilityCommand("BurrowBanelingUp", 0), true)
// L1027
OrderSetAutoCast(AbilityCommand("SapStructure", 0), true)

# campaigns/swarm.sc2campaign

TactCampAI.galaxy

// L18
OrderSetAutoCast(repaircmd, false)

# campaigns/swarm.sc2campaign

MapScript.galaxy

// L926
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L1298
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L1300
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L1302
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L3895
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L3899
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L3903
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L4170
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L4175
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L2315
OrderSetAutoCast(AbilityCommand("YetiCharge", 0), true)
// L1208
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L1216
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L799
OrderSetAutoCast(AbilityCommand("CritterFlee", 0), false)
// L467
OrderSetAutoCast(AbilityCommand("CritterFlee", 0), false)
// L3508
OrderSetAutoCast(AbilityCommand("CritterFlee", 0), false)
// L3539
OrderSetAutoCast(AbilityCommand("CritterFlee", 0), true)
// L743
OrderSetAutoCast(AbilityCommand("CritterFlee", 0), false)
// L926
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L1298
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L1300
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L1302
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L3895
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L3899
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L3903
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L4170
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L4175
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L2315
OrderSetAutoCast(AbilityCommand("YetiCharge", 0), true)
// L1208
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L1216
OrderSetAutoCast(AbilityCommand("Repair", 0), true)
// L799
OrderSetAutoCast(AbilityCommand("CritterFlee", 0), false)
// L467
OrderSetAutoCast(AbilityCommand("CritterFlee", 0), false)
// L3508
OrderSetAutoCast(AbilityCommand("CritterFlee", 0), false)
// L3539
OrderSetAutoCast(AbilityCommand("CritterFlee", 0), true)
// L743
OrderSetAutoCast(AbilityCommand("CritterFlee", 0), false)

# campaigns/void.sc2campaign

TactCampAI.galaxy

// L18
OrderSetAutoCast(repaircmd, false)

# mods/core.sc2mod

TactTerrAI.galaxy

// L1615
OrderSetAutoCast(autoCastCmd, !airOnly)

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L13993
OrderSetAutoCast(AbilityCommand("ObserverTargetLock", 0), true)
// L14040
OrderSetAutoCast(AbilityCommand("RavenTargetLock", 0), true)

# mods/starcoop/starcoop.sc2mod

TactCampAI.galaxy

// L368
OrderSetAutoCast(repaircmd, false)

# mods/starcoop/starcoop.sc2mod

TactTerrAI.galaxy

// L1562
OrderSetAutoCast(autoCastCmd, !airOnly)