# Last Created Loot Units

Grammar — Last created loot units
FlagsNative | Function

Returns the last group of units/items created via the “Drop Loot At Unit” or “Drop Loot At Point” actions. This function ignores units created by other triggers.

Returns — unitgroup

native unitgroup UnitLootLastCreatedGroup();

Category: Loot / Basic

# Examples

mods/warcoop/warcoopdata.sc2modbase.sc2data/TriggerLibs/WarCoopData.galaxy:3809

            if ((lv_heroitemcategory == UserDataGetUserInstance("LootDropLevels", lv_lootlevelinstance, "HeroItemCategory", 1)) && (lv_triggeringeffect == UserDataGetGameLink("LootDropLevels", lv_lootlevelinstance, "LootEffect", 1))) {
                UnitLootDropPoint(lv_legendplayer, EventPlayerEffectUsedPoint(c_effectLocationCasterUnit), UserDataGetGameLink("LootDropLevels", lv_lootlevelinstance, "LootDrop", 1), lv_legendplayer);
                autoD6406425_g = UnitLootLastCreatedGroup();
                autoD6406425_u = UnitGroupCount(autoD6406425_g, c_unitCountAll);
                for (;; autoD6406425_u -= 1) {