# Attach Text Tag To Unit

Grammar — Attach tag|Text Tag to unit with height offset heightOffset
FlagsNative | Action

Attaches a text tag to a unit at a certain height.

# Arguments

  • int [ preset::TextTag ] — Tag
  • unit — Unit
  • fixed — Height Offset

Returns — void

native void TextTagAttachToUnit(
	int inTag,
	unit inUnit,
	fixed inHeightOffset,
);

Category: Text Tag / Basic

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L2369
TextTagAttachToUnit(TextTagLastCreated(), lv_chosenUnit, 1.0)
// L1105
TextTagAttachToUnit(gv_supplyHelperTXT, gv_supplySCV, 1.0)
// L2369
TextTagAttachToUnit(TextTagLastCreated(), lv_chosenUnit, 1.0)
// L1105
TextTagAttachToUnit(gv_supplyHelperTXT, gv_supplySCV, 1.0)

# campaigns/libertystory.sc2campaign

CampaignLib.galaxy

// L1556
TextTagAttachToUnit(libCamp_gv__CB_Current_ChatBubble[lp_playerIndex], libCamp_gv__CB_Unit[lp_unitIndex], 2.5)
// L11893
TextTagAttachToUnit(lv_p_TextTag, lv_p_Unit, 2.5)

# campaigns/swarm.sc2campaign

MapScript.galaxy

// L624
TextTagAttachToUnit(TextTagLastCreated(), lp_cHOSEN_UNIT, lp_tEXT_OFFSET)
// L688
TextTagAttachToUnit(TextTagLastCreated(), gv_hyperion, 0.0)
// L4211
TextTagAttachToUnit(TextTagLastCreated(), EventUnit(), 1.0)
// L624
TextTagAttachToUnit(TextTagLastCreated(), lp_cHOSEN_UNIT, lp_tEXT_OFFSET)
// L688
TextTagAttachToUnit(TextTagLastCreated(), gv_hyperion, 0.0)
// L4211
TextTagAttachToUnit(TextTagLastCreated(), EventUnit(), 1.0)

# campaigns/swarmstory.sc2campaign

SwarmCampaignLib.galaxy

// L4364
TextTagAttachToUnit(TextTagLastCreated(), lp_target, 0.0)

# campaigns/voidstory.sc2campaign

VoidCampaignMissionLib.galaxy

// L4316
TextTagAttachToUnit(TextTagLastCreated(), lp_target, 1.0)

# mods/frontiers.sc2mod

Lib6CB3363F.galaxy

// L644
TextTagAttachToUnit(TextTagLastCreated(), lib6CB3363F_gv_fT_PlayerUnit[lp_playerFiring], 1.0)
// L1445
TextTagAttachToUnit(TextTagLastCreated(), EventUnit(), 2.0)
// L1707
TextTagAttachToUnit(TextTagLastCreated(), lib6CB3363F_gv_fT_PlayerUnit[EventPlayer()], 1.0)

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

LibPEB1.galaxy

// L6455
TextTagAttachToUnit(lv_marineTag, libPEB1_gv_textTagMarine, 2.0)

# mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmod

LibLNYF.galaxy

// L591
TextTagAttachToUnit(TextTagLastCreated(), lp_unit, 1.0)

# mods/heroesdata.stormmod

GameLib.galaxy

// L8439
TextTagAttachToUnit(TextTagLastCreated(), libGame_gv_townTownData[lp_townIndex].lv_lootBannerUnit, libGame_gv_loot_BannerTextTagHeightOffset_C)
// L8442
TextTagAttachToUnit(TextTagLastCreated(), libGame_gv_townTownData[lp_townIndex].lv_lootBannerUnit, libGame_gv_loot_BannerTextTagHeightOffset_C)
// L8500
TextTagAttachToUnit(TextTagLastCreated(), lp_sconceUnit, libGame_gv_loot_BannerTextTagHeightOffset_C)
// L8504
TextTagAttachToUnit(TextTagLastCreated(), lp_sconceUnit, libGame_gv_loot_BannerTextTagHeightOffset_C)

# mods/heroesdata.stormmod

HeroesLib.galaxy

// L3252
TextTagAttachToUnit(TextTagLastCreated(), lp_target, 0.0)

# mods/heroesdata.stormmod

MapMechanicsLib.galaxy

// L7114
TextTagAttachToUnit(TextTagLastCreated(), libMapM_gv_mMGardensDragonStatue, libMapM_gv_mMGardensDragonDragonStatueHelperTextTagHeightOffset_C)
// L7129
TextTagAttachToUnit(TextTagLastCreated(), libMapM_gv_mMGardensDragonStatue, libMapM_gv_mMGardensDragonDragonStatueHelperTextTagHeightOffset_C)
// L7133
TextTagAttachToUnit(TextTagLastCreated(), libMapM_gv_mMGardensDragonStatue, libMapM_gv_mMGardensDragonDragonStatueHelperTextTagHeightOffset_C)

# mods/heroesmapmods/battlegroundmapmods/blackheartsbay.stormmod

LibBBAY.galaxy

// L1874
TextTagAttachToUnit(TextTagLastCreated(), libBBAY_gv_mMBBCannonballsTreasureChestChests[lv_iter], 5.0)
// L1887
TextTagAttachToUnit(TextTagLastCreated(), libBBAY_gv_mMBBCannonballsTreasureChestChests[lv_iter], 4.0)

# mods/heroesmapmods/battlegroundmapmods/hauntedmines.stormmod

LibMHtM.galaxy

// L118
TextTagAttachToUnit(TextTagLastCreated(), lv_itGate, 3.0)

# mods/heroesmapmods/battlegroundmapmods/overwatchdata.stormmod

LibOVER.galaxy

// L79
TextTagAttachToUnit(lv_textTag, lv_pickupUnit, 3.0)
// L101
TextTagAttachToUnit(lv_textTag, lv_pickupUnit, 3.0)
// L379
TextTagAttachToUnit(lv_allyTextTag, lv_bossUnit, 5.0)
// L380
TextTagAttachToUnit(lv_enemyTextTag, lv_bossUnit, 5.0)
// L381
TextTagAttachToUnit(lv_selfTextTag, lv_bossUnit, 5.0)
// L827
TextTagAttachToUnit(TextTagLastCreated(), lv_itemUnit, 3.0)

# mods/heroesmapmods/battlegroundmapmods/warheadjunction.stormmod

LibMSC2.galaxy

// L481
TextTagAttachToUnit(TextTagLastCreated(), lv_spawnedWarhead, 4.0)
// L2156
TextTagAttachToUnit(TextTagLastCreated(), lv_warheadUnit, 4.0)

# mods/missionpacks/novacampaign.sc2mod

LibNCMI.galaxy

// L4410
TextTagAttachToUnit(TextTagLastCreated(), lp_target, 1.0)

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L11485
TextTagAttachToUnit(TextTagLastCreated(), lp_teachUnit, 2.5)
// L11493
TextTagAttachToUnit(TextTagLastCreated(), lp_teachUnit, 2.5)
// L12160
TextTagAttachToUnit(TextTagLastCreated(), lp_target, 0.0)
// L16482
TextTagAttachToUnit(TextTagLastCreated(), lv_u, 2.5)

# mods/starcoop/starcoop.sc2mod

LibCOMU.galaxy

// L4609
TextTagAttachToUnit(lv_codetexttag, lp_boomBot, 3.0)
// L4614
TextTagAttachToUnit(lv_inputtexttag, lp_boomBot, 3.0)

# mods/testmods/tilesettesting.stormmod

LibTILE.galaxy

// L77
TextTagAttachToUnit(TextTagLastCreated(), lv_itUnit, 1.0)
// L85
TextTagAttachToUnit(TextTagLastCreated(), lv_itUnit, 1.0)
// L93
TextTagAttachToUnit(TextTagLastCreated(), lv_itUnit, 1.0)
// L101
TextTagAttachToUnit(TextTagLastCreated(), lv_itUnit, 1.0)
// L111
TextTagAttachToUnit(TextTagLastCreated(), lv_itUnit, 1.0)
// L116
TextTagAttachToUnit(TextTagLastCreated(), lv_itUnit, 1.0)

# mods/voidprologue.sc2mod

LibA3DDD02B.galaxy

// L3181
TextTagAttachToUnit(TextTagLastCreated(), lp_target, 0.0)

# mods/warcoop/warcoopdata.sc2mod

WarCoopData.galaxy

// L1584
TextTagAttachToUnit(TextTagLastCreated(), lp_target, 1.0)