| 10-23-2008, 10:51 PM | #1 |
Hi, today I was trying to get a unit's aura level using something like: 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 |
only by coding it by your self... look at ABuff system... for example |
| 10-24-2008, 12:15 AM | #3 |
You cannot find the level of a buff. Why? Because Blizzard suck. |
| 10-24-2008, 12:35 AM | #4 |
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 | |
Quote:
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 |
Or the smart way: Have a different buff for each level of the ability. |
| 10-24-2008, 07:30 AM | #7 | |
Quote:
|
| 10-24-2008, 07:50 AM | #8 | |
Quote:
|
| 10-24-2008, 08:09 AM | #9 |
Not to hijack a thread, but what's the natural aura update frequency? |
| 10-24-2008, 09:57 AM | #10 |
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 |
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 | |
Quote:
|
| 10-24-2008, 02:50 PM | #13 |
Maybe you can find the source of the aura then get its level of the skill. GroupEnumUnitsInRange of the unit... then... afaasdf |
