HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Buff Levels?

11-23-2006, 09:07 AM#1
Pyrogasm
Is there a way to check for the level of a buff on a unit and then do different actions depending on the level? Example:

Players 1, 2, and 3 are all enemies and have Archmage heroes that have a "Suppression Aura" ability (3 levels). When a unit under the effect of this aura casts a spell it will either take damage or be healed depending on if it is hostile or friendly to the hero with the aura. Player 1's Archmage casts a spell when it is under the influence of player 2's and 3's Archmage's Suppression Auras. The level of player 1's aura is level 2, player 2's level 3, and player 3's level 2. How would I check to see that player 1's Archmage is effected by a level 2 friendly, level 2 hostile, and level 3 hostile aura in order to set it's life accordingly? The auras are all done with dummy abilities inside disabled spellbooks.

Make sense?
11-23-2006, 11:55 AM#2
AceHart
I don't think buffs have levels. There either is one or there isn't.

Try with a different buff for every level maybe?
11-23-2006, 12:32 PM#3
Rising_Dusk
Quote:
Try with a different buff for every level maybe?
You would have to.
Getting the level of a buff returns 1 (It's there) or 0 (It's not there).
There's no special trick or anything, that is how it is.
11-23-2006, 01:46 PM#4
oNdizZ
another option would be to temporarly store the buff level to the unit with gc.
11-23-2006, 08:26 PM#5
Pyrogasm
Damn. Now I've got to make 6 more dummy auras and spellbooks. Buffs do have levels, though (I think), becuase when you mouse over a buff for an ability that has multiple levels in-game it says "Buff Level 1, Tooltip". See attached thumbnail.
Attached Images
File type: jpgBuff.jpg (44.4 KB)
11-23-2006, 08:30 PM#6
AceHart
Well, yes, but there's no way to actually get that level in a trigger.
It's just yes or no... no level.

However, it's not needed to make several versions of your abilities.
Put different buffs on every level.
11-24-2006, 06:25 AM#7
Pyrogasm
That seems to be the only way to do it. Thanks to all of you for helping out!
11-24-2006, 12:05 PM#8
moyack
There is a way to get the buff level:

Collapse JASS:
call GetUnitAbilityLevel(u, BuffID)

Where u is the unit who has the buff, and BuffID is the buff rawcode.
11-24-2006, 12:59 PM#9
Rising_Dusk
Even if the buff is level 20, it will only return 0 if no buff is there or 1 if it is.
Just trust me. :P
11-24-2006, 01:05 PM#10
moyack
really?? Hmmm.... ok