# Anchor Dialog To Unit

Grammar — Move dialog to (offsetX, offsetY) relative to attachment of unit anchored anchor
FlagsNative | Action

Moves a dialog to the specified anchor, relative to the specified attachment point of the specified unit, with the specified offsets.

# Arguments

  • int [ dialog ] — Dialog
  • unit — Unit
  • string [ preset::AttachPoints ] — Attachment
  • int [ preset::Anchor ] — Anchor
  • int — OffsetX
  • int — OffsetY

Returns — void

native void DialogSetPositionRelativeToUnitWithAnchor(
	int dialog,
	unit inUnit,
	string inAttachment,
	int anchor,
	int offsetX,
	int offsetY,
);

Category: Dialog / Dialog Size And Position

# Examples

# campaigns/void.sc2campaign

MapScript.galaxy

// L1141
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1191
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1241
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1291
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1343
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1394
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1444
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1589
DialogSetPositionRelativeToUnitWithAnchor(gv_blinkTagAnchor, gv_blinkHelper, "Ref_Origin", c_anchorCenter, 0, 0)
// L2332
DialogSetPositionRelativeToUnitWithAnchor(gv_tTextTagAnchor, gv_tInvisHelper, "Ref_Origin", c_anchorCenter, 0, 0)
// L3020
DialogSetPositionRelativeToUnitWithAnchor(gv_tTextTagAnchor, gv_tInvisHelper, "Ref_Origin", c_anchorCenter, 0, 120)
// L3365
DialogSetPositionRelativeToUnitWithAnchor(gv_tTextTagAnchor, gv_tMakeAssimilatorAssimilator, "Ref_Origin", c_anchorCenter, 0, 120)
// L2091
DialogSetPositionRelativeToUnitWithAnchor(lv_textTagDialogAnchor, lv_attackBeacon, "Ref_Origin", c_anchorCenter, 0, 80)
// L1141
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1191
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1241
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1291
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1343
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1394
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1444
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L2091
DialogSetPositionRelativeToUnitWithAnchor(lv_textTagDialogAnchor, lv_attackBeacon, "Ref_Origin", c_anchorCenter, 0, 80)
// L1589
DialogSetPositionRelativeToUnitWithAnchor(gv_blinkTagAnchor, gv_blinkHelper, "Ref_Origin", c_anchorCenter, 0, 0)
// L2332
DialogSetPositionRelativeToUnitWithAnchor(gv_tTextTagAnchor, gv_tInvisHelper, "Ref_Origin", c_anchorCenter, 0, 0)
// L3020
DialogSetPositionRelativeToUnitWithAnchor(gv_tTextTagAnchor, gv_tInvisHelper, "Ref_Origin", c_anchorCenter, 0, 120)
// L3365
DialogSetPositionRelativeToUnitWithAnchor(gv_tTextTagAnchor, gv_tMakeAssimilatorAssimilator, "Ref_Origin", c_anchorCenter, 0, 120)

# mods/heroesdata.stormmod

MapMechanicsLib.galaxy

// L711
DialogSetPositionRelativeToUnitWithAnchor(DialogLastCreated(), libMapM_gv_jungleCreepCamps[lp_camp].lv_campOwnershipFlagUnit, "Ref_Overhead", c_anchorCenter, 0, 0)
// L1306
DialogSetPositionRelativeToUnitWithAnchor(DialogLastCreated(), libMapM_gv_jungleCreepCamps[lp_Camp].lv_campOwnershipFlagUnit, "Ref_Overhead", c_anchorCenter, 0, 0)

# mods/heroesdata.stormmod

UILib.galaxy

// L1113
DialogSetPositionRelativeToUnitWithAnchor(DialogLastCreated(), lp_heroUnit, "Ref_Overhead", c_anchorBottom, 0, 0)
// L1141
DialogSetPositionRelativeToUnitWithAnchor(DialogLastCreated(), libGDHL_gv_chogallPairs[libGame_gf_TeamNumberOfPlayer(lv_choPlayer)].lv_choUnit, "Ref_Overhead", c_anchorBottom, 0, 0)