• 🏆 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!

[Spell] Need heelp creating an ability that gives a stacking bonus!

Status
Not open for further replies.
Level 6
Joined
Jul 21, 2019
Messages
168
Hello, i'm trying to make a passive ability that gives a stackable bonus every time the unit with the ability kills a unit, however i don't know where to start, i'm guessing something like this?:

-unit dies
-killing unit has (dummy ability) equal to true
-set some_variable to (some_variable) + 1
-set unit_variable = unit with the dummy ability

then in other trigger:

-periodic event every 0.03 game time
-some_variable equal to 1 (or 2,3,4, etc.. i want it to stack it 8 times)
-add (level I 1 stack bonus ability) to unit_variable

Then other trigger to remove the bonus:

-periodic event every 0.03 game time
-some_variable not equal to 1
-remove (level I 1 stack bonus ability) from unit_variable

but to make it stack 8 times im thinking about making 16 separate triggers:

-periodic event every 0.03 game time
-some_variable equal to 2
-remove (level I 1 stack bonus ability) from unit_variable
-add (level I 2 stack bonus ability) to unit_variable

then

-periodic event every 0.03 game time
-some_variable not equal to 2
-remove (level I 2 stack bonus ability) from unit_variable

and finally some triggers to check the level of the dummy ability in order to provide different bonus the higher the level of the dumm ability:

-periodic event every 0.03 game time
-level of (dummy ability) for unit_variable equal to 1
-turn on add level I 1 stack bonus
-turn on remove level I 1 stack bonus
-etc..

-periodic event every 0.03 game time
-level of (dummy ability) for unit_variable equal to 2
-turn off add level I 1 stack bonus
-turn off remove level I 1 stack bonus
-etc..
-turn on add level II 1 stack bonus
-turn on remove level II 1 stack bonus
-etc..

..and so on

In the end it would be 16*3= 48 triggers + 3 triggers to check level of dummy ability = 51 triggers + the trigger that checks when an unit dies to add +1 to the variable = 52 triggers

EDIT 1: forgot to mention that i plan to add IE 5 damage for every stack, so i would most likely use item attack bonus +5 for 1 stack, item attack bonus +10 for 2 stack, and so on

..plus 8*3= 24 custom item attack bonus abilities for all eight stacks of my ability across the 3 levels of the dumy ability

xd

Would it work? can it cause leaks or lag? can it crash the game? is there a better way to do this? what type of variable does the hypothetical "some_variable" need to be?

Thanks in advance!


EDIT 2: if my explanation sucks (possible since i'm not native english speaker) i want to recreate Tryndamere's Bloodlust ability, but the old version that gave damage stacks for every kill, (Tryndamere is a hero from the moba league of legends)
 
Last edited:
Level 23
Joined
Oct 12, 2008
Messages
1,783
IMO you are massively overthinking this.
- Have 1 claws of attack ability with as many levels as you need for stacks/skill ranks
- Set the level to the amount of bonus damage you need
- I dont know why you need a periodic check
 
Level 6
Joined
Jul 21, 2019
Messages
168
- Have 1 claws of attack ability with as many levels as you need for stacks/skill ranks

I didn't know i could give multiple levels to an item ablity lolololol, yeah way better this way

yeah i agree it's kinda retarded, it's just what i got from the top of my head, i used something similar before but wanted to make sure this time

Now with the variable that counts the units killed, what kind of variable does it need to be? integrer?

anyway thank you for your reply, i appreciate it
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,542
A unit dies

Killing unit equal to Tryndamere

Set level of ability "Damage Bonus" equal to level of "Damage Bonus" + 1

Keep in mind that there's some weird interactions last I checked when using an Item ability like Claws of Attack that increases Attack Damage. Sometimes you have to "refresh" the ability for it to work. You decrease it's level by 1 then increase it by 1 to refresh it.
 
Status
Not open for further replies.
Top