HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Getting unit's aura level not working?

10-23-2008, 10:51 PM#1
StockBreak
Hi,
today I was trying to get a unit's aura level using something like:

Collapse JASS:
native GetUnitAbilityLevel takes unit myUnit, integer myAuraBuffCode returns integer

But it doesn't work!
It always returns 1 if the unit is under the effect of the aura, 0 otherwise.
How can I get the exact level of an aura (not on the caster, but on a nearby unit)?

Thanks!
10-23-2008, 11:37 PM#2
Toadcop
only by coding it by your self...
look at ABuff system... for example
10-24-2008, 12:15 AM#3
Captain Griffen
You cannot find the level of a buff. Why? Because Blizzard suck.
10-24-2008, 12:35 AM#4
Strilanc
You could enumerate all the units within the aura's range of the target unit, and find the maximum level any of them had for the aura ability.

It wouldn't be exact, since auras stay a little bit after you're out of range, but it's something.
10-24-2008, 01:48 AM#5
TKF
Quote:
Originally Posted by Captain Griffen
You cannot find the level of a buff. Why? Because Blizzard suck.
Griffin is correct. There's no way to get the level of the buff, only the level of the skill itself.


Check with the hero level of that ability instead, then you indirectly checks the level of the buff.
10-24-2008, 07:27 AM#6
Pyrogasm
Or the smart way: Have a different buff for each level of the ability.
10-24-2008, 07:30 AM#7
Tide-Arc Ephemera
Quote:
Originally Posted by Pyrogasm
Or the smart way: Have a different buff for each level of the ability.
Beat me to it, but there's always the "omfg this buff is clashing!" problem. Though, I'm sure you can find a way to work around it.
10-24-2008, 07:50 AM#8
Pyrogasm
Quote:
Originally Posted by Tide-Arc Ephemera
...but there's always the "omfg this buff is clashing!" problem.
Then run a periodic check to see when a unit has more than one of the different buffs; if so, remove the lower-level buff.
10-24-2008, 08:09 AM#9
Tide-Arc Ephemera
Not to hijack a thread, but what's the natural aura update frequency?
10-24-2008, 09:57 AM#10
chobibo
By manual counting lol, I think it's about a second (1s~1.5s). I used Devotion Aura, tried moving the Paladin next to a footman, then moved it away and started counting lol.
10-24-2008, 10:28 AM#11
Tide-Arc Ephemera
Yeah, that's how I tested it but I've forgotten since. I also noticed it was usually 1 to 2 seconds... pretty slow but good enough for melee play though not as useful as could be.

EDIT!
There is a ridiculous method you could do in which you added all units afflicted by Aura X to groups AuraG[1] through AuraG[5] (or whatever your max level is), then start subtracting units in descending order then start applying Tornado Auras and dummy abilities accordingly. I'd imagine this to be consuming and inefficient, but I guess it's a method of attacking aura clashing.
10-24-2008, 12:47 PM#12
StockBreak
Quote:
Originally Posted by Tide-Arc Ephemera
Beat me to it, but there's always the "omfg this buff is clashing!" problem. Though, I'm sure you can find a way to work around it.
Yesterday night I figured out the same multi-buff solution suggested by Pyrogasm, why shouldn't it work?
10-24-2008, 02:50 PM#13
fX_
Maybe you can find the source of the aura then get its level of the skill.

GroupEnumUnitsInRange of the unit... then... afaasdf