# Unit Is Created

Grammarcreator creates a unit with ability ability or behavior behavior
FlagsNative | 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 ] — Creator
  • string [ gamelink::Abil ] — Ability
  • string [ gamelink::Behavior ] — Behavior

Returns — void

native void TriggerAddEventUnitCreated(
	trigger t,
	unitref u,
	string creatorAbil,
	string creatorBehavior,
);

# Event parameters

Category: Ability / Basic

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L2799
TriggerAddEventUnitCreated(gt_CatchtheMutaPart1, null, null, null)
// L2799
TriggerAddEventUnitCreated(gt_CatchtheMutaPart1, 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)
// 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

SwarmCampaignLib.galaxy

// 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

MapScript.galaxy

// 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)
// L6324
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)
// L6324
TriggerAddEventUnitCreated(gt_VoidThrasherSpawnsUnitGroup, UnitRefFromVariable("gv_voidThrasher"), "NarudEpilogueTrain", null)

# campaigns/voidstory.sc2campaign

VoidCampaignLib.galaxy

// 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

MapScript.galaxy

// 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

LibAMGT.galaxy

// L1508
TriggerAddEventUnitCreated(libAMGT_gt_ARMGardenSeedDropped, null, null, null)

# mods/heroesbrawlmods/brawlmapmods/blackheartsrevenge.stormmod

LibMDoE.galaxy

// L2619
TriggerAddEventUnitCreated(libMDoE_gt_CannonballIsFired, null, null, null)

# mods/heroesbrawlmods/brawlmapmods/coop/deadmansstand.stormmod

LibPEB1.galaxy

// 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

GameDataHelperLib.galaxy

// 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

GameLib.galaxy

// L16375
TriggerAddEventUnitCreated(libGame_gt_ConfineCreatedUnitsToBaseUntilCountdownEnds, null, null, null)
// L16452
TriggerAddEventUnitCreated(libGame_gt_RemoveUnitsCreatedOutsideOfBaseUntilCountdownEnds, null, null, null)

# mods/heroesdata.stormmod

MapMechanicsLib.galaxy

// L4319
TriggerAddEventUnitCreated(libMapM_gt_SummonerMinionLanerScaling, null, null, null)

# mods/heroesmapmods/battlegroundmapmods/blackheartsbay.stormmod

LibBBAY.galaxy

// 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

LibNPLD.galaxy

// L929
TriggerAddEventUnitCreated(libNPLD_gt_PlayerCreatesTurretFromMapMechanicAbility, null, "MapMechanicAbilityTarget", null)

# mods/heroesmapmods/battlegroundmapmods/hauntedmines.stormmod

LibMHtM.galaxy

// L1968
TriggerAddEventUnitCreated(libMHtM_gt_MMHMSkullDroppedShareVision, null, null, null)
// L2025
TriggerAddEventUnitCreated(libMHtM_gt_MMHMSkullDroppedVerifyPathable, null, null, null)

# mods/heroesmapmods/battlegroundmapmods/infernalshrines.stormmod

LibMSHE.galaxy

// L1379
TriggerAddEventUnitCreated(libMSHE_gt_MMISCursedEventMinionTracker, null, "CursedShrineSpawn", null)

# mods/heroesmapmods/battlegroundmapmods/overwatchdata.stormmod

LibOVER.galaxy

// L528
TriggerAddEventUnitCreated(libOVER_gt_BioticEmitterScaling, null, "MapMechanicAbilityTarget2", null)