Wikia

WoWWiki

Watchlist Recent changes

API UnitInRange

Main Menue



Returns 1 if the unit is in range (40yds) and "Line of Sight" of most helpful spells, nil otherwise.

isTrue = UnitInRange("unit")

Arguments Edit

unit 
String - unitId to check.

Returns Edit

isTrue 
1 or nil

Example Edit

if UnitInRange("target") then
    print(UnitName("target") .. " is 40 yds away.")
elseif not UnitInRange("target") then
    print(UnitName("target") .. " is not in range!")
end

ResultEdit

FarfarawayDPS is 40 yds away.
FarfarawayDPS is not in range!

DetailsEdit

Will return nil for hostile units.

See alsoEdit

Pages on WoWWiki

95,750pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
58,025photos on this wiki
See more >

Recent Wiki Activity

See more >

Recent Questions

Around Wikia's network

Random Wiki