# Magazine Owner Of Unit
Grammar — Magazine owner that contains ammoUnit|Unit
Flags —Native
|Function
# Arguments
unit
— AmmoUnit
Returns — unit
native unit UnitGetMagazine(unit inUnit);
# 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/LibCOMU.galaxy:1659
lv_actualKiller = lp_killer;
if ((UnitGetMagazine(lp_killer) != null)) {
lv_actualKiller = UnitGetMagazine(lp_killer);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:1660
lv_actualKiller = lp_killer;
if ((UnitGetMagazine(lp_killer) != null)) {
lv_actualKiller = UnitGetMagazine(lp_killer);
}
else {