• 🏆 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] spell based on charges

Status
Not open for further replies.
Level 4
Joined
Mar 15, 2011
Messages
39
a skill set like a hero, so that by killing a unit, this win 1% attack speed per creep (lasting 10 seconds) and this may increase depending on the level (up to 25% at level 1). Some help?
 
Level 8
Joined
Nov 9, 2011
Messages
326
ok
this can be done in several ways but i think this one might work.

So the unit that is gaining the attack speed should have one passive spell that does nothing just serves for learning the spell and displaying values.

Then u need the actual spell that gives attack speed.
It should have 25 levels (25 max stacks) + one level for 0 attack speed added.

So Example.

Level 1 - 0% attack speed
Level 2 - 1% attack speed
Level 3 - 2% attack speed
and on and on

Why 0 ? well u need an level where u dont gain anything if u havent killed anything in 10 seconds.


Next the triggers
U will need to set variables the cast trigger and loop (Mui Indexing)

And each time a unit is killed u index the killer (ur hero) and set the level of the passive ability +1 (1% attack speed added with this) set the duration variables and then loop it.
After 10 seconds pass u deindex the unit and reduce the level of the passive ability by 1.
Of course u will set limits for ur levels but i wont recommend that ur passive has over 100 levels.
 
Level 8
Joined
Nov 9, 2011
Messages
326
That's actually one of the hardest mechanics to create in wc3 because you can't do that with triggers by default.
You need to use BonusMod or do something like an ability with 25 levels which I consider to be a lame solution, but it works.

Why is it hard?
U kill a unit u index the killing unit and add one more level to the attack speed spell. Put a duration and then after its passed u lower the level.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
If you use 25 levels which is as said very lame. I think it can cause lag if an ability has a lot of levels but do not quote me on that.
Though we're speaking about 100+ levels here I think.

also, what if he needs to balance the spell. Have fun editing 25 fields each time. Unlike if you coded it properly you would just change one variable.
 
Level 8
Joined
Nov 9, 2011
Messages
326
If you use 25 levels which is as said very lame. I think it can cause lag if an ability has a lot of levels but do not quote me on that.
Though we're speaking about 100+ levels here I think.

also, what if he needs to balance the spell. Have fun editing 25 fields each time. Unlike if you coded it properly you would just change one variable.

True but like i said its doable
also it doesnt have to be 1% per level
It could be like 3% and then balance it to like 9% max on lvl 1 , 18% on lvl 2 and so on
Reducing the level of the passive spell.
 
Status
Not open for further replies.
Top