No. I might consider implementing range checking, but it's a low priority.
Ability usable trigger question
- 9 posts
-
Mirrormn Author
- Join date
- Feb 11, 2008
- Location
- United States
- Reputation
- 5
- Posts
- 244
- Projects
- 2
- Last login
- May 19, 2013
-
Urfin13 Regular Shmoe
- Join date
- Oct 19, 2008
- Location
- Russian Federation
- Reputation
- 0
- Posts
- 7
- Last login
- Dec 06, 2010
Too bad. Range checking that you can use as a trigger would make some really nice automagic possible.
What if I could make another addon (IceHUD is the only one I know that has a configurable range checker) talk range numbers to chat, and check them with WA? Would that be possible?
-
Mirrormn Author
- Join date
- Feb 11, 2008
- Location
- United States
- Reputation
- 5
- Posts
- 244
- Projects
- 2
- Last login
- May 19, 2013
Well, if you're willing to do that much work, you can do range checking using a Custom Trigger in WeakAuras. As far as I know, there are no events that fire when ranges change, so you'd have to have your trigger update every frame, which would be CPU inefficient (which is why I don't want to implement range checking in the first place).
Anyway:
- Trigger Type: Custom
- Event Type: Status
- Check On: Every Frame
- Custom Trigger:
function() if(IsSpellInRange("Frost Strike", "target") == 1) then return true else return false end end
- Custom Untrigger:
function() if(IsSpellInRange("Frost Strike", "target") == 1) then return false else return true end end
Would check range.
Last edited Dec 01, 2010 by Mirrormn -
BromFairain Regular Shmoe
- Join date
- May 03, 2011
- Location
- Germany
- Reputation
- 0
- Posts
- 3
- Last login
- May 22, 2013
Hi!
I was quite happy when I just now found this post but I found out that it did not work for my. Might that have to with changes between this post and now?
If I use the above provided code the aura is displayed all the time, regardless of range. This might have to do with the check on situation, there is only OnUpdate which set to use. I would like to use this range check to build some auras to give me options based on when they become available when I close in on my selected target. Right now I look when the assigned keys in the button bars turn from red to white and that is a not so good idea.
Any help is appreciated, if need be I can export the aura in it's present state.
-
mickzit Regular Shmoe
- Join date
- Jan 14, 2013
- Location
- Germany
- Reputation
- 0
- Posts
- 1
- Last login
- Mar 24, 2013
Hi!
here the updated code in example for Clash:
Trigger Type: Custom
Event Type: Status
Check On: Every Frame
Custom Trigger:function()
if(IsSpellInRange("Clash", "playertarget") == 1) then
return true
else
return false
end
endCustom Untrigger:
function()
if(IsSpellInRange("Clash", "playertarget") == 1) then
return false
else
return true
end
endLast edited Jan 14, 2013 by mickzit -
geronimosan Regular Shmoe
- Join date
- Jun 13, 2009
- Location
- United States
- Reputation
- 0
- Posts
- 1
- Last login
- Feb 03, 2013
Loving WeakAuras, but I too really wish it had a range check, both for player to target, as well as pet to target.
In the meantime, thank you for the code above. I was hoping you might help me out in modifying it a bit for my custom purpose. I want to range check my pet to target for Kill Command.
Any chance you might be able to modify the above code to fit that (right now it only checks range for me (player) to target). Thanks!
-
Crytuff Regular Shmoe
- Join date
- Jun 01, 2011
- Location
- United States
- Reputation
- 13
- Posts
- 205
- Last login
- May 22, 2013
I don't think range checking for pet abilities can be done. The only range checks available in the API that I could find are for the player. However, there is a function that checks if a pet ability is usable. I don't play a hunter but I'm under the impression that kill command isn't even clickable unless the pet is in range, so you might be able to get the result you want that way. Of course if someone else can find a better one, I'd love to see it.
For range checking to be effective it has to be checked on a very short interval. When you combine this with the fact that you typically have well over a dozen abilities that have to be tested every fraction of a second, it places a heavy burden on the CPU for an already CPU intensive game. I can see why the author wouldn't want to implement this because some idiot would range check every ability in their spellbook and complain that weakauras is killing their frame rates. You can work around this by only checking ranges for a few key things, such as "my melee range strikes" and "my 40yd spells" and call it good without too much of a strain.
- 9 posts
Urfin13 Regular ShmoeI'm using it for an aura to indicate OB/FS availability on my DK, and it works, except it doesn't check for melee range, thus displaying when OB/FS is ready to use, but the target is OOR. Any way I could check for melee range, or range in general in WA?