# Enable/Disable Tactical For Unit
Grammar — ForceTactical For Unit To Be Disabled (or ReEnabled) (unit, controlled)
Flags —Native
|Action
Forces tactical to be disabled for the unit (regardless of other unit properties such as ForceTactical / Computer Controlled). Or re-enables tactical that was previous disabled by this function.
# Arguments
unit
— Unitbool
<preset::AIDisableTactical> — Enable/Disable
Returns — void
native void AISetUnitTacticalDisabled(
unit u,
bool tacticalDisabled,
);
# Related
Category: AI Advanced / Tactical / Actions
- Set Ignored By Wave —
void
— AISetIgnoredByWave - Clear Cloaked Attacker —
void
— AIClearCloakedAttacker - Tactical AI - Cast —
int
— AICast - Tactical AI - Flee —
int
— AICastFlee - Call Original Tactical AI Think —
void
— AIBaseThink - Call Unit Ability Tactical Script —
void
— AIExecuteAbilTactical - Set Tactical AI Range —
void
— libNtve_gf_SetTacticalAIRange - Set Tactical AI Think —
void
— libNtve_gf_SetTacticalAIThink - Enable/Disable Tactical For Unit —
void
— AISetUnitTacticalDisabled - Enable/Disable Tactical For Unit Group —
void
— AISetGroupTacticalDisabled
# Examples
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:21947
UISetCommandAllowed(lv_targetPlayerGroup, c_uiCommandAllowSmartClick, false);
if ((libAIAI_gf_HeroAIIsAIEnabledForPlayer(lv_targetPlayer) == true)) {
AISetUnitTacticalDisabled(lv_mindControlledUnit, true);
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:21991
UISetCommandAllowed(lv_targetPlayerGroup, c_uiCommandAllowSmartClick, true);
if ((libAIAI_gf_HeroAIIsAIEnabledForPlayer(lv_targetPlayer) == true)) {
AISetUnitTacticalDisabled(lv_mindControlledUnit, false);
}