# Attach Text Tag To Unit Attach Point
Grammar — Attach tag|Text Tag to unit at attachment point with offset (offsetX, offsetY).
Flags —Native
|Action
Attaches a text tag to one of the unit’s attachment points, this can also include an offset.
# Arguments
int
<preset::TextTag> — Tagunit
— Unitstring
<preset::AttachPoints> — Attachmentint
— OffsetXint
— OffsetY
Returns — void
native void TextTagAttachToUnitPoint(
int inTag,
unit inUnit,
string attachmentPoint,
int offsetX,
int offsetY,
);
# Related
Category: Text Tag / Basic
- Create Text Tag —
int
<preset::TextTag> — TextTagCreate - Last Created Text Tag —
int
<preset::TextTag> — TextTagLastCreated - Show/Hide Text Tag —
void
— TextTagShow - Text Tag Is Visible —
bool
— TextTagVisible - Pause/Unpause Text Tag —
void
— TextTagPause - Attach Text Tag To Unit —
void
— TextTagAttachToUnit - Attach Text Tag To Unit Attach Point —
void
— TextTagAttachToUnitPoint - Destroy Text Tag —
void
— TextTagDestroy - Set Position Of Text Tag —
void
— TextTagSetPosition - Set Velocity Of Text Tag —
void
— TextTagSetVelocity - Set Gravity Of Text Tag —
void
— TextTagSetGravity - Set Text Of Text Tag —
void
— TextTagSetText - Set Time Of Text Tag —
void
— TextTagSetTime
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:2882
TextTagSetAlignment(TextTagLastCreated(), c_alignCenter, c_alignTop);
TextTagSetTextAlignment(TextTagLastCreated(), c_alignLeft, c_alignTop);
TextTagAttachToUnitPoint(TextTagLastCreated(), gv_jukeboxes[lp_jukeboxID].lv_box, "Ref_StatusBar", 127, -290);
}
else if (auto2FB17D52_val == gv_cantinaJukeboxID) {
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:2888
TextTagSetAlignment(TextTagLastCreated(), c_alignCenter, c_alignTop);
TextTagSetTextAlignment(TextTagLastCreated(), c_alignLeft, c_alignTop);
TextTagAttachToUnitPoint(TextTagLastCreated(), gv_jukeboxes[lp_jukeboxID].lv_box, "Ref_StatusBar", 25, -8);
}
else {
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:9560
TextTagSetBackgroundImage(TextTagLastCreated(), "Assets\\Textures\\blank.dds", true);
TextTagSetBackgroundBorderSize(TextTagLastCreated(), 0.0, 0.0);
TextTagAttachToUnitPoint(TextTagLastCreated(), lp_unit, lp_attachmentPoint, lp_offsetX, lp_offsetY);
TextTagShowBackground(TextTagLastCreated(), true);
TextTagSetEdgeImage(TextTagLastCreated(), lp_edge, lp_edgeImage, lp_edgeOffsetX, lp_edgeOffsetY);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:30082
TextTagSetBackgroundBorderSize(TextTagLastCreated(), 0.0, 0.0);
TextTagSetAlignment(TextTagLastCreated(), c_alignLeft, c_alignBottom);
TextTagAttachToUnitPoint(TextTagLastCreated(), gf_BriefingScreen(ge_RoomID_RoomBridge, ge_BriefingScreen_Center), "Ref_StatusBar", 0, -60);
TextTagShowBackground(TextTagLastCreated(), false);
TextTagSetTime(TextTagLastCreated(), c_textTagTimeDuration, 10.0);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:2882
TextTagSetAlignment(TextTagLastCreated(), c_alignCenter, c_alignTop);
TextTagSetTextAlignment(TextTagLastCreated(), c_alignLeft, c_alignTop);
TextTagAttachToUnitPoint(TextTagLastCreated(), gv_jukeboxes[lp_jukeboxID].lv_box, "Ref_StatusBar", 127, -290);
}
else if (auto2FB17D52_val == gv_cantinaJukeboxID) {
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:2888
TextTagSetAlignment(TextTagLastCreated(), c_alignCenter, c_alignTop);
TextTagSetTextAlignment(TextTagLastCreated(), c_alignLeft, c_alignTop);
TextTagAttachToUnitPoint(TextTagLastCreated(), gv_jukeboxes[lp_jukeboxID].lv_box, "Ref_StatusBar", 25, -8);
}
else {
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:9560
TextTagSetBackgroundImage(TextTagLastCreated(), "Assets\\Textures\\blank.dds", true);
TextTagSetBackgroundBorderSize(TextTagLastCreated(), 0.0, 0.0);
TextTagAttachToUnitPoint(TextTagLastCreated(), lp_unit, lp_attachmentPoint, lp_offsetX, lp_offsetY);
TextTagShowBackground(TextTagLastCreated(), true);
TextTagSetEdgeImage(TextTagLastCreated(), lp_edge, lp_edgeImage, lp_edgeOffsetX, lp_edgeOffsetY);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:30082
TextTagSetBackgroundBorderSize(TextTagLastCreated(), 0.0, 0.0);
TextTagSetAlignment(TextTagLastCreated(), c_alignLeft, c_alignBottom);
TextTagAttachToUnitPoint(TextTagLastCreated(), gf_BriefingScreen(ge_RoomID_RoomBridge, ge_BriefingScreen_Center), "Ref_StatusBar", 0, -60);
TextTagShowBackground(TextTagLastCreated(), false);
TextTagSetTime(TextTagLastCreated(), c_textTagTimeDuration, 10.0);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/sc2epilogue03.sc2map/MapScript.galaxy:1682
libVCMI_gf_AttachReticleEffectAndTextTagOnUnit(libVCMI_ge_CampaginReticleType_ProtossEnemy, libVCMI_ge_CampaginReticleSize_Large, StringExternal("Param/Value/D0F114C5"), lp_targetUnit, "Ref_Center");
TextTagAttachToUnitPoint(TextTagLastCreated(), lp_targetUnit, "Ref_Center", 0, 0);
UISetButtonHighlighted(PlayerGroupAll(), AbilityCommand("KerriganEpilogue03QuantumRay", 0), true);
gv_quantumRayUsed = false;
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/sc2epilogue03.sc2map — MapScript.galaxy:1682
libVCMI_gf_AttachReticleEffectAndTextTagOnUnit(libVCMI_ge_CampaginReticleType_ProtossEnemy, libVCMI_ge_CampaginReticleSize_Large, StringExternal("Param/Value/D0F114C5"), lp_targetUnit, "Ref_Center");
TextTagAttachToUnitPoint(TextTagLastCreated(), lp_targetUnit, "Ref_Center", 0, 0);
UISetButtonHighlighted(PlayerGroupAll(), AbilityCommand("KerriganEpilogue03QuantumRay", 0), true);
gv_quantumRayUsed = false;