• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to Detect Buff Level?

Status
Not open for further replies.
Level 3
Joined
Jan 31, 2023
Messages
12
Hello again. I want to detect buff level but how I can do it?

For an example I have a spell and it has 4 levels and same buff ''slowed''. When I cast it if ability level is 1 then buff level is 1 too, ability level is 2 bufft then level is 2 etc...

But the problem is when I use ''Unit has spesific buff'' trigger it sees level1-2-3-4 buff is same thing. I don't want to create different buff for every level of ability so my question is simple: How I can detect level of buff?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,546
You can't get the Buff level unfortunately. If you can figure out a way to find the Buff source then you could check their Ability level but at that point you might as well trigger the Aura system from scratch.

The easiest method is to have multiple Buff levels, I show how to make it work here:
 
Last edited:
Level 3
Joined
Jan 31, 2023
Messages
12
Oh so there is nothing I can do except creating different buffs for each level of ability, well thanks then Uncle
 
Level 3
Joined
Jan 31, 2023
Messages
12
well, even internally it seems buffs have a single level. The only thing that I noticed was that if your spell has multiple levels, the buff reflects that in the description when you mouse-over on that buff, but I found no way to get that information out of the buff.
Yea sadly this thing only works the way I said... I have to give different buff for every level of ability...
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,546
Here's a triggered Aura if you're interested in that:
 
Level 20
Joined
Aug 29, 2012
Messages
826
For that kind of issue I usually create a dummy ability based on claws of attack, give it the appropriate number of levels, and add it/remove it when the spell is cast on a target, this way you can easily retrieve "level of ability for unit" as an integer
 
Status
Not open for further replies.
Top