View Single Post
Old 06/28/08, 6:43 AM   #329 (permalink)
 Daboran
King Hippo
 
Daboran's Avatar
 
Tauren Druid
 
Twisting Nether (EU)
Originally Posted by bimmian View Post
Trying to make a simple range check for my hunter. If I am in range, it shows a "+", if I am out of range, it shows a "-". So far I have this:

[if Range <= 35 then
    '+'
else
    '-'
end]
It is acting weird though.

From 0-8 yards it works properly, showing a +.
From 9-28 yards it shows a -.
From 29-35 it shows a +.
From 35+ it shows a -.

What is it about the 9-28 yard range would cause it to show a -?
I'm not sure, but I recall there not actually being a lua expression for certain ranges thus they are deduced from whether spells with those ranges can be cast or not.

The workaround was to do something like "if range > 9 yards and range < 29 yards then....."
 
User is offline.
Reply With Quote