# Unit Has Ability

Grammaru has abil
FlagsNative | Function

Returns true if a unit has a specified ability.

# Arguments

  • unit — Unit
  • string [ gamelink::Abil ] — Ability

Returns — bool

native bool UnitAbilityExists(unit inUnit, string inAbil);

Category: Ability / Basic

# Examples

# campaigns/swarmstory.sc2campaign

SwarmCampaignLib.galaxy

// L4662
UnitAbilityExists(lp_hero, AbilityCommandGetAbility(lp_abilityCommand))

# mods/core.sc2mod

TactProtAI.galaxy

// L1293
UnitAbilityExists(aiUnit, c_AB_CoreEnvision)
// L1552
UnitAbilityExists(aiUnit, c_AB_Disintegration)
// L1600
UnitAbilityExists(aiUnit, c_AB_ReleaseInterceptors)
// L1642
UnitAbilityExists(aiUnit, c_AB_ImmortalBarrier)
// L1685
UnitAbilityExists(aiUnit, c_AB_VoidRayDamage)

# mods/core.sc2mod

TactTerrAI.galaxy

// L202
UnitAbilityExists(aiUnit, c_AB_Snipe)
// L257
UnitAbilityExists(aiUnit, c_AB_SteadyTargeting)
// L364
UnitAbilityExists(aiUnit, c_AB_KD8Charge)
// L485
UnitAbilityExists(aiUnit, c_AB_TacticalJump)

# mods/core.sc2mod

TactZergAI.galaxy

// L299
UnitAbilityExists(aiUnit, c_AB_ParasiticBomb)
// L383
UnitAbilityExists(aiUnit, c_AB_UltraliskBurrowCharge)
// L752
UnitAbilityExists(aiUnit, c_AB_VolatileBurstBuilding)
// L1056
UnitAbilityExists(aiUnit, c_AB_LeechResources)
// L1084
UnitAbilityExists(aiUnit, c_AB_CausticSpray)

# mods/heroesdata.stormmod

AILib.galaxy

// L716
UnitAbilityExists(lv_creepUnit, "StormVehicleAttack")
// L726
UnitAbilityExists(lv_creepUnit, "StormVehicleAttack")

# mods/heroesdata.stormmod

GameLib.galaxy

// L14429
UnitAbilityExists(lv_tauntedUnit, "attack")

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L13818
UnitAbilityExists(lv_unit, "BroodLordHangar")

# mods/starcoop/starcoop.sc2mod

TactProtAI.galaxy

// L1631
UnitAbilityExists(aiUnit, c_AB_ImmortalBarrier)
// L1674
UnitAbilityExists(aiUnit, c_AB_VoidRayDamage)

# mods/starcoop/starcoop.sc2mod

TactTerrAI.galaxy

// L204
UnitAbilityExists(aiUnit, c_AB_Snipe)
// L249
UnitAbilityExists(aiUnit, c_AB_SteadyTargeting)
// L346
UnitAbilityExists(aiUnit, c_AB_KD8Charge)
// L465
UnitAbilityExists(aiUnit, c_AB_TacticalJump)

# mods/starcoop/starcoop.sc2mod

TactZergAI.galaxy

// L594
UnitAbilityExists(aiUnit, c_AB_UltraliskBurrowCharge)
// L1265
UnitAbilityExists(aiUnit, c_AB_LeechResources)
// L1293
UnitAbilityExists(aiUnit, c_AB_CausticSpray)

# mods/voidprologue.sc2mod

LibA3DDD02B.galaxy

// L3527
UnitAbilityExists(lp_hero, AbilityCommandGetAbility(lp_abilityCommand))

# mods/warcoop/warcoopdata.sc2mod

WarCoopData.galaxy

// L1958
UnitAbilityExists(lp_sourceWayGate, libWCdr_gv_waygateAbility)