# Ability That Created Unit

Grammar — Ability that created unit
FlagsNative | Function

Returns the ability that created the unit. Used in response to “Unit Is Created”.

Returns — string<gamelink::Abil>

native string EventUnitCreatedAbil();

# Supported triggers

Category: Ability / Basic

# Examples

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:18704

        }

        if (!(((EventUnitCreatedAbil() != null) || (EventUnitCreatedBehavior() != null)))) {
            return false;
        }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:10666

        }

        if (!(((EventUnitCreatedAbil() != null) || (EventUnitCreatedBehavior() != null)))) {
            return false;
        }

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

    lv_alliedPlayersAnnouncementGroup = libGame_gf_AlliedPlayerGroupOfPlayer(lv_medicPlayer);
    PlayerGroupRemove(lv_alliedPlayersAnnouncementGroup, lv_medicPlayer);
    if ((EventUnitCreatedAbil() == "MedicMedivacDropship")) {
        UnitPutInTransport(lv_medic, lv_dropship);
    }

mods/heromods/samuro.stormmodbase.stormdata/LibHSAM.galaxy:1065

        UnitModifyCooldown(lv_mirrorImage, lv_cooldownLink, UnitGetCooldown(lv_samuro, lv_cooldownLink), c_cooldownOperationSet);
    }
    if ((EventUnitCreatedAbil() == "SamuroWindwalk")) {
        libHSAM_gf_SamuroKawarimi(lv_mirrorImage);
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:18303


    libCOMI_gv_cM_Fenix_ActiveHero[lv_fenixPlayer] = lv_fenixUnitNew;
    libCOMI_gv_cM_Fenix_ActiveHero_Abil[lv_fenixPlayer] = EventUnitCreatedAbil();
    auto0DA865BB_g = libCOMI_gv_cM_Fenix_HeroGroup[lv_fenixPlayer];
    auto0DA865BB_u = UnitGroupCount(auto0DA865BB_g, c_unitCountAll);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:18725

    }

    if (((EventUnitCreatedAbil() == "WarpGateTrain") || (EventUnitCreatedAbil() == "StargateTrain"))) {
        Wait(5.0, c_timeGame);
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:18725

    }

    if (((EventUnitCreatedAbil() == "WarpGateTrain") || (EventUnitCreatedAbil() == "StargateTrain"))) {
        Wait(5.0, c_timeGame);
    }