• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Attack speed bug issue

Level 9
Joined
May 24, 2016
Messages
332
Hello! I need help with understanding what could go wrong with giving AS to Alchemist HERO.

I created an abil based on standard item attack speed bonus and gave it to Alchemist via UnitAddAbility

Once Alchemist transform (uses Chemical Rage) attack speed would be removed.

So I started a timer with a little delay upon using Chemical Rage ability to give him the attack speed ability once again.

And you know what? It's giving him LESS attack speed or not giving it all, comparing to other version, where you just equip Alchemist with an item having that attack speed bonus ability.

What might be the problem? I mean, I can't clearcly remeber the issue now (even though I have given many tests), so it might actually work properly once. But in many cases you would actually see that Alchemist has less attack speed in/after chemical rage transformation.
 
Level 22
Joined
Feb 27, 2019
Messages
717
The morphed Alchemist has a lower attack cooldown so the effect of % attack speed would be less.
2*0.15 = 0.30
1*0.15 = 0.15

When adding abilities to a unit with triggers they are removed when the unit morphs. Abilities that should stay when morphed must be made permanent for the unit. This only has to be done one time for the ability.
  • Custom script: call UnitMakeAbilityPermanent(whichUnit, true/false, whichAbility)
 
Level 9
Joined
May 24, 2016
Messages
332
The morphed Alchemist has a lower attack cooldown so the effect of % attack speed would be less.
2*0.15 = 0.30
1*0.15 = 0.15

When adding abilities to a unit with triggers they are removed when the unit morphs. Abilities that should stay when morphed must be made permanent for the unit. This only has to be done one time for the ability.
  • Custom script: call UnitMakeAbilityPermanent(whichUnit, true/false, whichAbility)
I think I get your point, but I still dont get why Item with attack speed ability will bring much better effect to morphed Alchemist than direct ability giving to morphed Alc?
 
Top