# Unit Is Created
Grammar — creator creates a unit with ability ability or behavior behavior
Flags —Native
|Event
This event fires when a unit is created. Use “Created Unit” to refer to the unit created. Use “Ability That Created Unit” to get the ability that created the unit. Use “Behavior That Created Unit” to get the behavior that created the unit.
# Arguments
unitref
[ unit ] — Creatorstring
[ gamelink::Abil ] — Abilitystring
[ gamelink::Behavior ] — Behavior
Returns — void
native void TriggerAddEventUnitCreated(
trigger t,
unitref u,
string creatorAbil,
string creatorBehavior,
);
# Event parameters
- Created Unit — EventUnitCreatedUnit
- Behavior That Created Unit — EventUnitCreatedBehavior
- Ability That Created Unit — EventUnitCreatedAbil
- Triggering Unit — EventUnit
# Related
Category: Ability / Basic
- [F] —
void
— Remove Ability — ( UnitAbilityRemove ) - [F] —
void
— Add Ability — ( UnitAbilityAdd ) - [F] —
void
— Unit Uses Ability — ( TriggerAddEventUnitAbility ) - [F] —
void
— Unit Changes Ability Auto Cast State — ( TriggerAddEventUnitAbilityAutoCastChange ) - [F] —
abilcmd
— Triggering Ability — ( EventUnitAbility ) - [F] —
int
[ preset::AbilityStage ] — Triggering Ability Stage — ( EventUnitAbilityStage ) - [F] —
point
— Triggering Ability Target Point — ( EventUnitTargetPoint ) - [F] —
unit
— Triggering Ability Target Unit — ( EventUnitTargetUnit ) - [F] —
unit
— Triggering Ability Other Unit — ( EventUnitAbilityOtherUnit ) - [F] —
abilcmd
— Ability From Item or Trigger — ( libNtve_gf_EventItemAbilityOrUnitAbility ) - [F] —
void
— Unit Is Created — ( TriggerAddEventUnitCreated ) - [F] —
unit
— Created Unit — ( EventUnitCreatedUnit ) - [F] —
string
[ gamelink::Behavior ] — Behavior That Created Unit — ( EventUnitCreatedBehavior ) - [F] —
string
[ gamelink::Abil ] — Ability That Created Unit — ( EventUnitCreatedAbil ) - [F] —
void
— Show/Hide Ability For Unit — ( UnitAbilityShow ) - [F] —
bool
— Ability Enabled For Unit — ( UnitAbilityCheck ) - [F] —
int
— Number Of Abilities On Unit — ( UnitAbilityCount ) - [F] —
string
[ gamelink::Abil ] — Unit Ability — ( UnitAbilityGet ) - [F] —
string
[ gamelink::Abil ] — Unit Ability By Class — ( libNtve_gf_UnitAbilityGetByType ) - [F] —
bool
— Unit Ability Command State — ( UnitCheckAbilCmdState ) - [F] —
int
— Unit Ability Order State (Flags) — ( UnitAbilOrderStateFlags ) - [F] —
bool
— Unit Has Ability — ( UnitAbilityExists ) - [F] —
void
— Enable/Disable Ability For Unit — ( UnitAbilityEnable ) - [F] —
void
— Add Level To Unit Ability — ( UnitAbilityChangeLevel ) - [F] —
void
— Replace Unit Ability — ( UnitAbilityChangeLink ) - [F] —
void
— Set Ability Default Submenu — ( UnitAbilityChangeCardId ) - [F] —
int
— Current Level For Unit Ability — ( UnitAbilityGetLevel ) - [F] —
int
— Maximum Level For Unit Ability — ( UnitAbilityMaxLevel ) - [F] —
bool
— Ability Matches Filters — ( libNtve_gf_AbilityMatchesFilters ) - [F] —
string
[ gamelink::Abil ] — Unit Ability By Filters — ( libNtve_gf_UnitAbilityByFilters ) - [F] —
string
— Unit Ability Default Submenu — ( UnitAbilityGetCardId )
# Examples
# campaigns/liberty.sc2campaign
// L2799
TriggerAddEventUnitCreated(gt_CatchtheMutaPart1, null, null, null)
// L2799
TriggerAddEventUnitCreated(gt_CatchtheMutaPart1, null, null, null)
// L1190
TriggerAddEventUnitCreated(gt_CreatedUnit, null, null, null)
// L1610
TriggerAddEventUnitCreated(gt_CreatedUnit, null, null, null)
// L1527
TriggerAddEventUnitCreated(gt_UpdateProtossRemainingTemplarArchonCreated, null, "ArchonWarp", null)
// L2115
TriggerAddEventUnitCreated(gt_RevealNewRedBaseFrontUnits, null, null, null)
// L2189
TriggerAddEventUnitCreated(gt_RevealNewRedBaseBackUnits, null, null, null)
// L1663
TriggerAddEventUnitCreated(gt_AttachInfoTextUmojans, null, null, null)
// L1690
TriggerAddEventUnitCreated(gt_AttachInfoTextPlayer, null, null, null)
// L1775
TriggerAddEventUnitCreated(gt_SentryBotUnitInfo, null, null, null)
// L2001
TriggerAddEventUnitCreated(gt_PlayerUnitSpawned, null, null, null)
// L4933
TriggerAddEventUnitCreated(gt_BattlecruiserTrained, null, "SJMercStarportTrain", null)
// L6227
TriggerAddEventUnitCreated(gt_AchievementControl70Mutalisks, null, null, null)
// L2021
TriggerAddEventUnitCreated(gt_ArchonsMerged, null, "ArchonWarp", null)
// L1047
TriggerAddEventUnitCreated(gt_UltraliskEscaped, UnitRefFromUnit(UnitFromId(48)), "FreeUltralisk", null)
// L2013
TriggerAddEventUnitCreated(gt_TorrasqueCreatedRevived, null, null, null)
// L2021
TriggerAddEventUnitCreated(gt_ArchonsMerged, null, "ArchonWarp", null)
// L1047
TriggerAddEventUnitCreated(gt_UltraliskEscaped, UnitRefFromUnit(UnitFromId(48)), "FreeUltralisk", null)
// L2013
TriggerAddEventUnitCreated(gt_TorrasqueCreatedRevived, null, null, null)
// L1190
TriggerAddEventUnitCreated(gt_CreatedUnit, null, null, null)
// L1610
TriggerAddEventUnitCreated(gt_CreatedUnit, null, null, null)
// L1527
TriggerAddEventUnitCreated(gt_UpdateProtossRemainingTemplarArchonCreated, null, "ArchonWarp", null)
// L2115
TriggerAddEventUnitCreated(gt_RevealNewRedBaseFrontUnits, null, null, null)
// L2189
TriggerAddEventUnitCreated(gt_RevealNewRedBaseBackUnits, null, null, null)
// L1663
TriggerAddEventUnitCreated(gt_AttachInfoTextUmojans, null, null, null)
// L1690
TriggerAddEventUnitCreated(gt_AttachInfoTextPlayer, null, null, null)
// L1775
TriggerAddEventUnitCreated(gt_SentryBotUnitInfo, null, null, null)
// L2001
TriggerAddEventUnitCreated(gt_PlayerUnitSpawned, null, null, null)
// L4933
TriggerAddEventUnitCreated(gt_BattlecruiserTrained, null, "SJMercStarportTrain", null)
// L6227
TriggerAddEventUnitCreated(gt_AchievementControl70Mutalisks, null, null, null)
# campaigns/swarmstory.sc2campaign
// L15950
TriggerAddEventUnitCreated(libSwaC_gt_ZS_CinematicModeGlowOff, null, null, null)
// L16377
TriggerAddEventUnitCreated(libSwaC_gt_ZS_CampaignUnitCreated, null, null, null)
// L17240
TriggerAddEventUnitCreated(libSwaC_gt_ZS_OverlordRally, null, null, null)
// L18734
TriggerAddEventUnitCreated(libSwaC_gt_ZS_CampaignStatsUnitCreated, null, null, null)
# campaigns/void.sc2campaign
// L3224
TriggerAddEventUnitCreated(gt_InfoTextUnitCreated, null, null, null)
// L8545
TriggerAddEventUnitCreated(gt_TerranMakeMarinesUpdateObjective, null, null, null)
// L8714
TriggerAddEventUnitCreated(gt_TerranMakeMarinesComplete, null, null, null)
// L10302
TriggerAddEventUnitCreated(gt_ZergMakeOverlordComplete, null, null, null)
// L10750
TriggerAddEventUnitCreated(gt_ZergMakeDronesReminderController, UnitRefFromVariable("gv_zergHatchery"), null, null)
// L10818
TriggerAddEventUnitCreated(gt_ZergMakeDronesComplete, null, null, null)
// L11925
TriggerAddEventUnitCreated(gt_ZergMakeZerglingsMorphStarted, UnitRefFromVariable("gv_zergHatchery"), null, null)
// L12005
TriggerAddEventUnitCreated(gt_ZergMakeZerglingsComplete, null, null, null)
// L14119
TriggerAddEventUnitCreated(gt_ZergMakeRoachesMorphStarted, UnitRefFromVariable("gv_zergHatchery"), null, null)
// L14200
TriggerAddEventUnitCreated(gt_ZergMakeRoachesComplete, null, null, null)
// L5335
TriggerAddEventUnitCreated(gt_VictoryAmonBeamController, UnitRefFromVariable("gv_amonUnit"), "AmonHostDeathBeam", null)
// L944
TriggerAddEventUnitCreated(gt_CyberspaceColoringUnitCreated, null, null, null)
// L3654
TriggerAddEventUnitCreated(gt_HybridCreated, null, null, null)
// L6335
TriggerAddEventUnitCreated(gt_VoidThrasherSpawnsUnitGroup, UnitRefFromVariable("gv_voidThrasher"), "NarudEpilogueTrain", null)
// L3224
TriggerAddEventUnitCreated(gt_InfoTextUnitCreated, null, null, null)
// L8545
TriggerAddEventUnitCreated(gt_TerranMakeMarinesUpdateObjective, null, null, null)
// L8714
TriggerAddEventUnitCreated(gt_TerranMakeMarinesComplete, null, null, null)
// L10302
TriggerAddEventUnitCreated(gt_ZergMakeOverlordComplete, null, null, null)
// L10750
TriggerAddEventUnitCreated(gt_ZergMakeDronesReminderController, UnitRefFromVariable("gv_zergHatchery"), null, null)
// L10818
TriggerAddEventUnitCreated(gt_ZergMakeDronesComplete, null, null, null)
// L11925
TriggerAddEventUnitCreated(gt_ZergMakeZerglingsMorphStarted, UnitRefFromVariable("gv_zergHatchery"), null, null)
// L12005
TriggerAddEventUnitCreated(gt_ZergMakeZerglingsComplete, null, null, null)
// L14119
TriggerAddEventUnitCreated(gt_ZergMakeRoachesMorphStarted, UnitRefFromVariable("gv_zergHatchery"), null, null)
// L14200
TriggerAddEventUnitCreated(gt_ZergMakeRoachesComplete, null, null, null)
// L5335
TriggerAddEventUnitCreated(gt_VictoryAmonBeamController, UnitRefFromVariable("gv_amonUnit"), "AmonHostDeathBeam", null)
// L944
TriggerAddEventUnitCreated(gt_CyberspaceColoringUnitCreated, null, null, null)
// L3654
TriggerAddEventUnitCreated(gt_HybridCreated, null, null, null)
// L6335
TriggerAddEventUnitCreated(gt_VoidThrasherSpawnsUnitGroup, UnitRefFromVariable("gv_voidThrasher"), "NarudEpilogueTrain", null)
# campaigns/voidstory.sc2campaign
// L10699
TriggerAddEventUnitCreated(libVoiC_gt_PC_StatUnitCreated, null, null, null)
# campaigns/voidstory.sc2campaign
— VoidCampaignMissionLib.galaxy
// L8012
TriggerAddEventUnitCreated(libVCMI_gt_PM_CampaignUnitCreated, null, null, null)
# mods/heroes.stormmod
// L2034
TriggerAddEventUnitCreated(gt_IntroRaynorIsCreated, null, null, null)
// L6347
TriggerAddEventUnitCreated(gt__2A_EscapeAbathurUsedNest, null, null, null)
// L2034
TriggerAddEventUnitCreated(gt_IntroRaynorIsCreated, null, null, null)
// L6347
TriggerAddEventUnitCreated(gt__2A_EscapeAbathurUsedNest, null, null, null)
# mods/heroesbrawlmods/arenamodemods/gardenarena.stormmod
// L1508
TriggerAddEventUnitCreated(libAMGT_gt_ARMGardenSeedDropped, null, null, null)
# mods/heroesbrawlmods/brawlmapmods/blackheartsrevenge.stormmod
// L2619
TriggerAddEventUnitCreated(libMDoE_gt_CannonballIsFired, null, null, null)
# mods/heroesbrawlmods/brawlmapmods/coop/deadmansstand.stormmod
// L5767
TriggerAddEventUnitCreated(libPEB1_gt_ToxicNestDamageBehavior, null, "AbathurToxicNest", null)
// L7273
TriggerAddEventUnitCreated(libPEB1_gt_ScourgeMissileCreated, null, null, null)
// L7479
TriggerAddEventUnitCreated(libPEB1_gt_ArchangelManageAdds, null, "ArchangelDropUltralisk", null)
// L7480
TriggerAddEventUnitCreated(libPEB1_gt_ArchangelManageAdds, null, "ArchangelChaserBanelings", null)
// L7481
TriggerAddEventUnitCreated(libPEB1_gt_ArchangelManageAdds, null, "ArchangelHellfireMissiles", null)
// L7482
TriggerAddEventUnitCreated(libPEB1_gt_ArchangelManageAdds, null, "ArchangelToxicSludgling", null)
// L7483
TriggerAddEventUnitCreated(libPEB1_gt_ArchangelManageAdds, null, "ArchangelVileTumor", null)
// L7484
TriggerAddEventUnitCreated(libPEB1_gt_ArchangelManageAdds, null, "ArchangelBileLauncher", null)
// L4487
TriggerAddEventUnitCreated(libPEB1_gt_ToxicNestDamageBehavior, null, "AbathurToxicNest", null)
# mods/heroesdata.stormmod
// L4242
TriggerAddEventUnitCreated(libGDHL_gt_SummonedUnitAPApplication, null, null, null)
// L5454
TriggerAddEventUnitCreated(libGDHL_gt_HeroAbathurLocustNestSetFacing, null, "AbathurLocustNest", null)
// L5492
TriggerAddEventUnitCreated(libGDHL_gt_HeroAbathurLocustNestCast, null, "AbathurLocustNest", null)
// L5958
TriggerAddEventUnitCreated(libGDHL_gt_HeroAbathurMonstrosityAddSymbioteStacks, null, null, null)
// L6211
TriggerAddEventUnitCreated(libGDHL_gt_HeroArtanisSpearofAdunPurifierBeamUnitCreated, null, null, null)
// L6501
TriggerAddEventUnitCreated(libGDHL_gt_HeroArthasArmyoftheDeadGhoulSpawned, null, "ArthasGhoulMagazine", null)
// L6942
TriggerAddEventUnitCreated(libGDHL_gt_HeroAzmodanDemonicInvasionAddUnitstoUnitGroup, null, null, null)
// L10472
TriggerAddEventUnitCreated(libGDHL_gt_HeroJainaWaterElementalCreated, null, "JainaSummonWaterElemental", null)
// L10759
TriggerAddEventUnitCreated(libGDHL_gt_HeroJainaFrostbiteIceblockItem, null, null, null)
// L11000
TriggerAddEventUnitCreated(libGDHL_gt_HeroKaelthasPhoenixSpawnSelection, null, "KaelthasPhoenix", null)
# mods/heroesdata.stormmod
// L16375
TriggerAddEventUnitCreated(libGame_gt_ConfineCreatedUnitsToBaseUntilCountdownEnds, null, null, null)
// L16452
TriggerAddEventUnitCreated(libGame_gt_RemoveUnitsCreatedOutsideOfBaseUntilCountdownEnds, null, null, null)
# mods/heroesdata.stormmod
// L4319
TriggerAddEventUnitCreated(libMapM_gt_SummonerMinionLanerScaling, null, null, null)
# mods/heroesmapmods/battlegroundmapmods/blackheartsbay.stormmod
// L1193
TriggerAddEventUnitCreated(libBBAY_gt_MMBBCannonballsHeroSpawned, null, null, null)
// L1757
TriggerAddEventUnitCreated(libBBAY_gt_MMBBCannonballsBattleshipShootingMissileCreated, null, null, null)
// L2201
TriggerAddEventUnitCreated(libBBAY_gt_MMBBCannonballsDoubloonDropped, null, null, null)
# mods/heroesmapmods/battlegroundmapmods/hanamura.stormmod
// L929
TriggerAddEventUnitCreated(libNPLD_gt_PlayerCreatesTurretFromMapMechanicAbility, null, "MapMechanicAbilityTarget", null)
# mods/heroesmapmods/battlegroundmapmods/hauntedmines.stormmod
// L1968
TriggerAddEventUnitCreated(libMHtM_gt_MMHMSkullDroppedShareVision, null, null, null)
// L2025
TriggerAddEventUnitCreated(libMHtM_gt_MMHMSkullDroppedVerifyPathable, null, null, null)
# mods/heroesmapmods/battlegroundmapmods/infernalshrines.stormmod
// L1379
TriggerAddEventUnitCreated(libMSHE_gt_MMISCursedEventMinionTracker, null, "CursedShrineSpawn", null)
# mods/heroesmapmods/battlegroundmapmods/overwatchdata.stormmod
// L528
TriggerAddEventUnitCreated(libOVER_gt_BioticEmitterScaling, null, "MapMechanicAbilityTarget2", null)