# Ability That Created Unit
Grammar — Ability that created unit
Flags —Native
|Function
Returns the ability that created the unit. Used in response to “Unit Is Created”.
Returns — string
<gamelink::Abil>
native string EventUnitCreatedAbil();
# Supported triggers
- Unit Is Created — TriggerAddEventUnitCreated
# Related
Category: Ability / Basic
- Remove Ability —
void
— UnitAbilityRemove - Add Ability —
void
— UnitAbilityAdd - Unit Uses Ability —
void
— TriggerAddEventUnitAbility - Unit Changes Ability Auto Cast State —
void
— TriggerAddEventUnitAbilityAutoCastChange - Triggering Ability —
abilcmd
— EventUnitAbility - Triggering Ability Stage —
int
<preset::AbilityStage> — EventUnitAbilityStage - Triggering Ability Target Point —
point
— EventUnitTargetPoint - Triggering Ability Target Unit —
unit
— EventUnitTargetUnit - Triggering Ability Other Unit —
unit
— EventUnitAbilityOtherUnit - Ability From Item or Trigger —
abilcmd
— libNtve_gf_EventItemAbilityOrUnitAbility - Unit Is Created —
void
— TriggerAddEventUnitCreated - Created Unit —
unit
— EventUnitCreatedUnit - Behavior That Created Unit —
string
<gamelink::Behavior> — EventUnitCreatedBehavior - Ability That Created Unit —
string
<gamelink::Abil> — EventUnitCreatedAbil - Show/Hide Ability For Unit —
void
— UnitAbilityShow - Ability Enabled For Unit —
bool
— UnitAbilityCheck - Number Of Abilities On Unit —
int
— UnitAbilityCount - Unit Ability —
string
<gamelink::Abil> — UnitAbilityGet - Unit Ability By Class —
string
<gamelink::Abil> — libNtve_gf_UnitAbilityGetByType - Unit Ability Command State —
bool
— UnitCheckAbilCmdState - Unit Ability Order State (Flags) —
int
— UnitAbilOrderStateFlags - Unit Has Ability —
bool
— UnitAbilityExists - Enable/Disable Ability For Unit —
void
— UnitAbilityEnable - Add Level To Unit Ability —
void
— UnitAbilityChangeLevel - Replace Unit Ability —
void
— UnitAbilityChangeLink - Set Ability Default Submenu —
void
— UnitAbilityChangeCardId - Current Level For Unit Ability —
int
— UnitAbilityGetLevel - Maximum Level For Unit Ability —
int
— UnitAbilityMaxLevel - Ability Matches Filters —
bool
— libNtve_gf_AbilityMatchesFilters - Unit Ability By Filters —
string
<gamelink::Abil> — libNtve_gf_UnitAbilityByFilters - Unit Ability Default Submenu —
string
— UnitAbilityGetCardId
# Examples
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:18704
}
if (!(((EventUnitCreatedAbil() != null) || (EventUnitCreatedBehavior() != null)))) {
return false;
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:10666
}
if (!(((EventUnitCreatedAbil() != null) || (EventUnitCreatedBehavior() != null)))) {
return false;
}
mods/heroesdata.stormmod — base.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.stormmod — base.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.sc2mod — base.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.sc2mod — base.sc2data/LibCOMI.galaxy:18725
}
if (((EventUnitCreatedAbil() == "WarpGateTrain") || (EventUnitCreatedAbil() == "StargateTrain"))) {
Wait(5.0, c_timeGame);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:18725
}
if (((EventUnitCreatedAbil() == "WarpGateTrain") || (EventUnitCreatedAbil() == "StargateTrain"))) {
Wait(5.0, c_timeGame);
}