# Unit Is Being Removed

Grammaru is being removed from the game
FlagsNative | Event

This event fires when a unit is removed from the game. Use “Triggering Player” to get the owner of the unit. Use “Triggering Unit” to get the unit.

# Arguments

  • unitref<unit> — Unit

Returns — void

native void TriggerAddEventUnitRemoved(
	trigger t,
	unitref u,
);

# Event parameters

Category: Unit / Combat

# Examples

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:8111

    libVCMI_gt_PM_CampaignCyberneticsRemoved = TriggerCreate("libVCMI_gt_PM_CampaignCyberneticsRemoved_Func");
    TriggerEnable(libVCMI_gt_PM_CampaignCyberneticsRemoved, false);
    TriggerAddEventUnitRemoved(libVCMI_gt_PM_CampaignCyberneticsRemoved, null);
}

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:8196

void libVCMI_gt_PM_UnitBeingRemoved_Init () {
    libVCMI_gt_PM_UnitBeingRemoved = TriggerCreate("libVCMI_gt_PM_UnitBeingRemoved_Func");
    TriggerAddEventUnitRemoved(libVCMI_gt_PM_UnitBeingRemoved, null);
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:13433

    libGDHL_gt_HeroLostVikingsVikingRemoved = TriggerCreate("libGDHL_gt_HeroLostVikingsVikingRemoved_Func");
    TriggerEnable(libGDHL_gt_HeroLostVikingsVikingRemoved, false);
    TriggerAddEventUnitRemoved(libGDHL_gt_HeroLostVikingsVikingRemoved, null);
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:19635

    libGDHL_gt_HeroRexxarRemoveMisha = TriggerCreate("libGDHL_gt_HeroRexxarRemoveMisha_Func");
    TriggerEnable(libGDHL_gt_HeroRexxarRemoveMisha, false);
    TriggerAddEventUnitRemoved(libGDHL_gt_HeroRexxarRemoveMisha, null);
}

mods/heromods/chogall.stormmodbase.stormdata/LibHCHO.galaxy:2214

    libHCHO_gt_HeroChoGallChoRemovedRemoveGall = TriggerCreate("libHCHO_gt_HeroChoGallChoRemovedRemoveGall_Func");
    TriggerEnable(libHCHO_gt_HeroChoGallChoRemovedRemoveGall, false);
    TriggerAddEventUnitRemoved(libHCHO_gt_HeroChoGallChoRemovedRemoveGall, null);
}

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCMI.galaxy:6594

void libNCMI_gt_NM_UnitBeingRemoved_Init () {
    libNCMI_gt_NM_UnitBeingRemoved = TriggerCreate("libNCMI_gt_NM_UnitBeingRemoved_Func");
    TriggerAddEventUnitRemoved(libNCMI_gt_NM_UnitBeingRemoved, null);
}