wowpedia
Main Menu


Assigns a raid target icon to a unit.

SetRaidTarget(unit, index)

Arguments

unit
string : UnitId
index
number - Raid target index to assign to the specified unit:
Value Icon
1 IconSmall RaidStar Yellow 4-point Star
2 IconSmall RaidCircle Orange Circle
3 IconSmall RaidDiamond Purple Diamond
4 IconSmall RaidTriangle Green Triangle
5 IconSmall RaidMoon White Crescent Moon
6 IconSmall RaidSquare Blue Square
7 IconSmall RaidCross Red "X" Cross
8 IconSmall RaidSkull White Skull

Details

Related API GetRaidTargetIndex
Related Events RAID_TARGET_UPDATE
Related FrameXML SetRaidTargetIcon

Example

To set a skull over your current target:

/run SetRaidTarget("target", 8)

Without toggling behavior:

/run if GetRaidTargetIndex("target") ~= 8 then SetRaidTarget("target", 8) end

Patch changes

Shadowlands Patch 9.2.0 (2022-02-22): Removed invisible IDs 9 to 18.
WoW Icon update Patch 1.11.0 (2006-06-19): Added.

See also