# Remove Weapon From Unit
Grammar — Remove weapon from unit
Flags —Native
|Action
Removes the specified weapon from the specified unit.
# Arguments
unit
— Unitstring
<gamelink::Weapon> — Weapon
Returns — void
native void UnitWeaponRemove(unit inUnit, string inWeapon);
# 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/heroesbrawlmods/arenamodemods/gardenarena.stormmod — base.stormdata/LibAMGT.galaxy:361
UnitBehaviorAdd(lv_plantTerror, "HallOfStormsKnockbackImmunity", lv_plantTerror, 1);
UnitWeaponAdd(lv_plantTerror, "VehiclePlantHorrorVictoryWeapon", null);
UnitWeaponRemove(lv_plantTerror, "VehiclePlantHorror");
libNtve_gf_MakeUnitInvulnerable(lv_plantTerror, true);
UnitGroupAdd(libAMGT_gv_victoryPlantTerrorUnitGroup, lv_plantTerror);
mods/novastoryassets.sc2mod — base3.sc2maps/maps/campaign/nova/nova09.sc2map/MapScript.galaxy:1433
gv_s2_Davis = UnitFromId(530);
UnitBehaviorAdd(gv_s2_Davis, "Benign", gv_s2_Davis, 1);
UnitWeaponRemove(gv_s2_Davis, "OfficersPistol");
UnitSetPropertyFixed(UnitFromId(605109900), c_unitPropLife, 30.0);
UnitSetPropertyFixed(UnitFromId(641606793), c_unitPropLife, 17.0);
mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova09.sc2map — MapScript.galaxy:1433
gv_s2_Davis = UnitFromId(530);
UnitBehaviorAdd(gv_s2_Davis, "Benign", gv_s2_Davis, 1);
UnitWeaponRemove(gv_s2_Davis, "OfficersPistol");
UnitSetPropertyFixed(UnitFromId(605109900), c_unitPropLife, 30.0);
UnitSetPropertyFixed(UnitFromId(641606793), c_unitPropLife, 17.0);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:21116
if ((UnitGetType(EventUnit()) == "MutaliskBroodlord")) {
UnitWeaponRemove(EventUnit(), "GlaiveWurm");
UnitWeaponAdd(EventUnit(), "CoopGlaiveWurm", null);
return true;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:26797
if ((UnitGetType(EventUnit()) == "HunterKiller")) {
UnitWeaponRemove(EventUnit(), "HunterKillerMelee");
UnitWeaponRemove(EventUnit(), "HunterKiller");
UnitWeaponAdd(EventUnit(), "ZagaraHunterKillerMelee", null);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:26798
if ((UnitGetType(EventUnit()) == "HunterKiller")) {
UnitWeaponRemove(EventUnit(), "HunterKillerMelee");
UnitWeaponRemove(EventUnit(), "HunterKiller");
UnitWeaponAdd(EventUnit(), "ZagaraHunterKillerMelee", null);
UnitWeaponAdd(EventUnit(), "ZagaraHunterKiller", null);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:26805
if ((UnitGetType(EventUnit()) == "Roach")) {
UnitWeaponRemove(EventUnit(), "AcidSaliva");
UnitWeaponRemove(EventUnit(), "RoachMelee");
UnitWeaponAdd(EventUnit(), "ZagaraAcidSaliva", null);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:26806
if ((UnitGetType(EventUnit()) == "Roach")) {
UnitWeaponRemove(EventUnit(), "AcidSaliva");
UnitWeaponRemove(EventUnit(), "RoachMelee");
UnitWeaponAdd(EventUnit(), "ZagaraAcidSaliva", null);
UnitWeaponAdd(EventUnit(), "ZagaraRoachMelee", null);