API SetRaidTarget

Set which raid target will be shown over a mob or raid member. SetRaidTarget(unit, index)

Arguments

 * unit : string : UnitId
 * index : number - Raid target index to assign to the specified unit:

Details

 * The icons are only visible to your group. In a 5-man party, all party members may assign raid icons. In a raid, only the raid leader and the assistants may do so.
 * Units can only be assigned one icon at a time; and each icon can only be assigned to one unit at a time.
 * This function removes the icon if you're trying to assign the icon that is already assigned to the unit. The function, provided by FrameXML, also provides this toggling behaviour.

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