# Unit Is Highlighted
Grammar — unit is state by Player player
Flags —Native
|Event
This event fires when a unit is highlighted or unhighlighted by a player. Use “Triggering Unit” to refer to the unit being highlighted/unhighlighted. Use “Triggering Player” to get the player.
# Arguments
unitref
<unit> — Unitint
— Playerbool
<preset::HighlightState> — Highlighted/Unhighlighted
Returns — void
native void TriggerAddEventUnitHighlight(
trigger t,
unitref u,
int player,
bool state,
);
# Event parameters
- Triggering Game User — EventGameUser
- Triggering Player — EventPlayer
- Triggering Unit — EventUnit
# Related
Category: [Selection / Clicks and Highlights](/galaxy/reference#selection-clicks and-highlights)
- Unit Is Clicked —
void
— TriggerAddEventUnitClick - Unit Is Highlighted —
void
— TriggerAddEventUnitHighlight
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:21940
void gt_HotspotHighlighted_Init () {
gt_HotspotHighlighted = TriggerCreate("gt_HotspotHighlighted_Func");
TriggerAddEventUnitHighlight(gt_HotspotHighlighted, null, c_playerAny, true);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:21959
void gt_HotspotUnhighlighted_Init () {
gt_HotspotUnhighlighted = TriggerCreate("gt_HotspotUnhighlighted_Func");
TriggerAddEventUnitHighlight(gt_HotspotUnhighlighted, null, c_playerAny, false);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:22661
void gt_BridgeMissionArchivesHighlighted_Init () {
gt_BridgeMissionArchivesHighlighted = TriggerCreate("gt_BridgeMissionArchivesHighlighted_Func");
TriggerAddEventUnitHighlight(gt_BridgeMissionArchivesHighlighted, null, c_playerAny, true);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:22688
void gt_BridgeMissionArchivesUnhighlighted_Init () {
gt_BridgeMissionArchivesUnhighlighted = TriggerCreate("gt_BridgeMissionArchivesUnhighlighted_Func");
TriggerAddEventUnitHighlight(gt_BridgeMissionArchivesUnhighlighted, null, c_playerAny, false);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:23150
void gt_CantinaTrophiesHighlighted_Init () {
gt_CantinaTrophiesHighlighted = TriggerCreate("gt_CantinaTrophiesHighlighted_Func");
TriggerAddEventUnitHighlight(gt_CantinaTrophiesHighlighted, null, c_playerAny, true);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:23180
void gt_CantinaTrophiesUnhighlighted_Init () {
gt_CantinaTrophiesUnhighlighted = TriggerCreate("gt_CantinaTrophiesUnhighlighted_Func");
TriggerAddEventUnitHighlight(gt_CantinaTrophiesUnhighlighted, null, c_playerAny, false);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:23753
void gt_LabArtifactHighlighted_Init () {
gt_LabArtifactHighlighted = TriggerCreate("gt_LabArtifactHighlighted_Func");
TriggerAddEventUnitHighlight(gt_LabArtifactHighlighted, null, c_playerAny, true);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:23783
void gt_LabArtifactUnhighlighted_Init () {
gt_LabArtifactUnhighlighted = TriggerCreate("gt_LabArtifactUnhighlighted_Func");
TriggerAddEventUnitHighlight(gt_LabArtifactUnhighlighted, null, c_playerAny, false);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:24627
void gt_MarSaraBriefcaseHighlighted_Init () {
gt_MarSaraBriefcaseHighlighted = TriggerCreate("gt_MarSaraBriefcaseHighlighted_Func");
TriggerAddEventUnitHighlight(gt_MarSaraBriefcaseHighlighted, null, c_playerAny, true);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:24654
void gt_MarSaraBriefcaseHologramHighlighted_Init () {
gt_MarSaraBriefcaseHologramHighlighted = TriggerCreate("gt_MarSaraBriefcaseHologramHighlighted_Func");
TriggerAddEventUnitHighlight(gt_MarSaraBriefcaseHologramHighlighted, null, c_playerAny, true);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:21940
void gt_HotspotHighlighted_Init () {
gt_HotspotHighlighted = TriggerCreate("gt_HotspotHighlighted_Func");
TriggerAddEventUnitHighlight(gt_HotspotHighlighted, null, c_playerAny, true);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:21959
void gt_HotspotUnhighlighted_Init () {
gt_HotspotUnhighlighted = TriggerCreate("gt_HotspotUnhighlighted_Func");
TriggerAddEventUnitHighlight(gt_HotspotUnhighlighted, null, c_playerAny, false);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:22661
void gt_BridgeMissionArchivesHighlighted_Init () {
gt_BridgeMissionArchivesHighlighted = TriggerCreate("gt_BridgeMissionArchivesHighlighted_Func");
TriggerAddEventUnitHighlight(gt_BridgeMissionArchivesHighlighted, null, c_playerAny, true);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:22688
void gt_BridgeMissionArchivesUnhighlighted_Init () {
gt_BridgeMissionArchivesUnhighlighted = TriggerCreate("gt_BridgeMissionArchivesUnhighlighted_Func");
TriggerAddEventUnitHighlight(gt_BridgeMissionArchivesUnhighlighted, null, c_playerAny, false);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:23150
void gt_CantinaTrophiesHighlighted_Init () {
gt_CantinaTrophiesHighlighted = TriggerCreate("gt_CantinaTrophiesHighlighted_Func");
TriggerAddEventUnitHighlight(gt_CantinaTrophiesHighlighted, null, c_playerAny, true);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:23180
void gt_CantinaTrophiesUnhighlighted_Init () {
gt_CantinaTrophiesUnhighlighted = TriggerCreate("gt_CantinaTrophiesUnhighlighted_Func");
TriggerAddEventUnitHighlight(gt_CantinaTrophiesUnhighlighted, null, c_playerAny, false);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:23753
void gt_LabArtifactHighlighted_Init () {
gt_LabArtifactHighlighted = TriggerCreate("gt_LabArtifactHighlighted_Func");
TriggerAddEventUnitHighlight(gt_LabArtifactHighlighted, null, c_playerAny, true);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:23783
void gt_LabArtifactUnhighlighted_Init () {
gt_LabArtifactUnhighlighted = TriggerCreate("gt_LabArtifactUnhighlighted_Func");
TriggerAddEventUnitHighlight(gt_LabArtifactUnhighlighted, null, c_playerAny, false);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:24627
void gt_MarSaraBriefcaseHighlighted_Init () {
gt_MarSaraBriefcaseHighlighted = TriggerCreate("gt_MarSaraBriefcaseHighlighted_Func");
TriggerAddEventUnitHighlight(gt_MarSaraBriefcaseHighlighted, null, c_playerAny, true);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:24654
void gt_MarSaraBriefcaseHologramHighlighted_Init () {
gt_MarSaraBriefcaseHologramHighlighted = TriggerCreate("gt_MarSaraBriefcaseHologramHighlighted_Func");
TriggerAddEventUnitHighlight(gt_MarSaraBriefcaseHologramHighlighted, null, c_playerAny, true);
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:20010
libSwaC_gt_ZS_ArmyCustomEggHighlight = TriggerCreate("libSwaC_gt_ZS_ArmyCustomEggHighlight_Func");
TriggerEnable(libSwaC_gt_ZS_ArmyCustomEggHighlight, false);
TriggerAddEventUnitHighlight(libSwaC_gt_ZS_ArmyCustomEggHighlight, null, c_playerAny, true);
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:20054
libSwaC_gt_ZS_ArmyCustomEggUnhighlight = TriggerCreate("libSwaC_gt_ZS_ArmyCustomEggUnhighlight_Func");
TriggerEnable(libSwaC_gt_ZS_ArmyCustomEggUnhighlight, false);
TriggerAddEventUnitHighlight(libSwaC_gt_ZS_ArmyCustomEggUnhighlight, null, c_playerAny, false);
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:20243
libSwaC_gt_ZS_ArmyCustomEggMouseOver = TriggerCreate("libSwaC_gt_ZS_ArmyCustomEggMouseOver_Func");
TriggerEnable(libSwaC_gt_ZS_ArmyCustomEggMouseOver, false);
TriggerAddEventUnitHighlight(libSwaC_gt_ZS_ArmyCustomEggMouseOver, null, c_playerAny, true);
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:20710
libSwaC_gt_ZS_ArmyCustomEvolutionUnitHighlight = TriggerCreate("libSwaC_gt_ZS_ArmyCustomEvolutionUnitHighlight_Func");
TriggerEnable(libSwaC_gt_ZS_ArmyCustomEvolutionUnitHighlight, false);
TriggerAddEventUnitHighlight(libSwaC_gt_ZS_ArmyCustomEvolutionUnitHighlight, null, c_playerAny, true);
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:20768
libSwaC_gt_ZS_ArmyCustomEvolutionUnitUnhighlight = TriggerCreate("libSwaC_gt_ZS_ArmyCustomEvolutionUnitUnhighlight_Func");
TriggerEnable(libSwaC_gt_ZS_ArmyCustomEvolutionUnitUnhighlight, false);
TriggerAddEventUnitHighlight(libSwaC_gt_ZS_ArmyCustomEvolutionUnitUnhighlight, null, c_playerAny, false);
}
campaigns/swarmstoryutil.sc2mod — base.sc2data/Lib281DEC45.galaxy:12124
void lib281DEC45_gt_ZSS_InteractiveHighlightStart_Init () {
lib281DEC45_gt_ZSS_InteractiveHighlightStart = TriggerCreate("lib281DEC45_gt_ZSS_InteractiveHighlightStart_Func");
TriggerAddEventUnitHighlight(lib281DEC45_gt_ZSS_InteractiveHighlightStart, null, c_playerAny, true);
}
campaigns/swarmstoryutil.sc2mod — base.sc2data/Lib281DEC45.galaxy:12169
void lib281DEC45_gt_ZSS_InteractiveHighlightStop_Init () {
lib281DEC45_gt_ZSS_InteractiveHighlightStop = TriggerCreate("lib281DEC45_gt_ZSS_InteractiveHighlightStop_Func");
TriggerAddEventUnitHighlight(lib281DEC45_gt_ZSS_InteractiveHighlightStop, null, c_playerAny, false);
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:6654
void libVCST_gt_PS_InteractiveHighlightStart_Init () {
libVCST_gt_PS_InteractiveHighlightStart = TriggerCreate("libVCST_gt_PS_InteractiveHighlightStart_Func");
TriggerAddEventUnitHighlight(libVCST_gt_PS_InteractiveHighlightStart, null, c_playerAny, true);
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:6703
void libVCST_gt_PS_InteractiveHighlightStop_Init () {
libVCST_gt_PS_InteractiveHighlightStop = TriggerCreate("libVCST_gt_PS_InteractiveHighlightStop_Func");
TriggerAddEventUnitHighlight(libVCST_gt_PS_InteractiveHighlightStop, null, c_playerAny, false);
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCST.galaxy:5476
void libNCST_gt_NS_InteractiveHighlightStart_Init () {
libNCST_gt_NS_InteractiveHighlightStart = TriggerCreate("libNCST_gt_NS_InteractiveHighlightStart_Func");
TriggerAddEventUnitHighlight(libNCST_gt_NS_InteractiveHighlightStart, null, c_playerAny, true);
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCST.galaxy:5524
void libNCST_gt_NS_InteractiveHighlightStop_Init () {
libNCST_gt_NS_InteractiveHighlightStop = TriggerCreate("libNCST_gt_NS_InteractiveHighlightStop_Func");
TriggerAddEventUnitHighlight(libNCST_gt_NS_InteractiveHighlightStop, null, c_playerAny, false);
}