Wikia

WoWWiki

Watchlist Recent changes

API SpellTargetUnit

Main Menue



This page is about the API SpellTargetUnit.

This specifies the target that the spell should use without needing you to click the target or make it your main target.

SpellTargetUnit(unitId)

ArgumentsEdit

unitId 
Unit ID : unit you wish to cast the spell on.

ExampleEdit

local ue = UnitExists("target"); -- We'll need to know if we have a target at the moment. 
ClearTarget(); -- Get rid of it, either way
CastSpellByName("Power Word: Fortitude"); -- This gets us into cursor casting mode.
SpellTargetUnit("raid1"); -- This casts PW:F on raid1 (if you are in a raid).
if (ue) then
 TargetLastTarget(); -- Return target if it existed before we clared it.
end

Pages on WoWWiki

94,154pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
55,612photos on this wiki
See more >

Recent Wiki Activity

See more >

Recent Questions

Around Wikia's network

Random Wiki