# Magazine Count Of Unit
Grammar — Number of rounds in abil magazine for u
Flags —Native
|Function
Returns the number of rounds in an ability magazine for a unit.
# Arguments
unit
— Unitstring
<gamelink::Abil> — Ability
Returns — int
native int UnitMagazineCount(unit inUnit, string inAbil);
# Related
Category: Unit / Weapons
- Remove Weapon From Unit —
void
— UnitWeaponRemove - Add Weapon To Unit —
void
— UnitWeaponAdd - Number Of Weapons On Unit —
int
— UnitWeaponCount - Unit Weapon —
string
<gamelink::Weapon> — UnitWeaponGet - Weapon Is Enabled —
bool
— UnitWeaponIsEnabled - Weapon Target Check —
bool
— UnitWeaponCheck - Weapon Cooldown —
fixed
— UnitWeaponPeriod - Weapon Range —
fixed
— UnitWeaponRange - Weapon Cooldown Remaining —
fixed
— UnitWeaponPeriodRemaining - Add Ammo To Magazine —
void
— UnitMagazineArm - Last Created Magazine Ammo Unit —
unit
— UnitMagazineLastCreated - Last Created Magazine Ammo Units —
unitgroup
— UnitMagazineLastCreatedGroup - Magazine Count Of Unit —
int
— UnitMagazineCount - Magazine Owner Of Unit —
unit
— UnitGetMagazine - Unit Can Attack Unit Old —
bool
— libNtve_gf_UnitCanAttackUnit - Unit Can Attack Unit Type —
bool
— UnitCanAttackTarget - Unit In Range And Able To Attack Target —
bool
— UnitInRangeAndAbleToAttackTarget - Weapon Damage —
fixed
— UnitWeaponDamage - Weapon Speed Multiplier —
fixed
— UnitWeaponSpeedMultiplier - Set Weapon Cooldown Remaining —
void
— UnitWeaponSetPeriodRemaining
# Examples
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:5116
}
if (((UnitMagazineCount(autoF73BCC8E_var, "HHBomberPlatformHangar") == 1) && (UnitHasBehavior2(autoF73BCC8E_var, "HHBomberPlatformAreaBombDisabler") == false) && (UnitHasBehavior2(autoF73BCC8E_var, "HHBomberDockCooldown") == false))) {
UnitGroupAdd(libCOMI_gv_cM_Horner_BomberPlatforms_Ready[lp_player], autoF73BCC8E_var);
}