• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Changing/Increasing attack speed (of a unit)

Status
Not open for further replies.
Level 3
Joined
Jul 23, 2008
Messages
29
Is it possible to change an attack speed of a unit via triggers? I was thinking about making a unit, that gains 5% (example) speed, everytime it kills another unit - permanently.

Perhaps something involving upgrades/abilities?

Help apreciated :)
 
Level 3
Joined
Jul 23, 2008
Messages
29
Ah, so this will stack with itself? I wasn't sure about that :)

Will try out in a sec.

EDIT: Tried it out, the ability doesn't stack.. I guess i have to find one that does then.

(If anyone knows of such an ability, please do say :))
 
Last edited:
Level 3
Joined
Jul 23, 2008
Messages
29
Perhaps my trigger was false..

I did something like:
E: A unit dies.
C: Killing unit equal to Dragonhawk Rider
A: Add Haste to Killing unit
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Well perhaps you're right, but IIRC, having multiple gloves of haste (the items) on a hero did make the hero faster... Anyway, alternatively you can make the "haste" ability have 100 levels, each level slightly increasing speed. Then, upon killing, you increase the level of (haste) on your hero. Maximum level is 100 though, which means the unit can't kill more than 100 units. Then again, that will already result in 200% speed increase, which sounds good enough.
 
Level 3
Joined
Jul 23, 2008
Messages
29
You're right. I'm going to put a limit on the ability anyway (20 - 30 levels perhaps)..

I guess i can change the level of the ability using variables then?
 
Level 6
Joined
Jul 25, 2005
Messages
221
I don't think it's leaking, however, it is highly ineffective. :cute:

JASS:
function Trigger takes nothing returns nothing
    call IncUnitAbilityLevelSwapped( 'MySpellInt', GetKillingUnitBJ() )
endfunction

Is what you get when using GUI, instead you can use,

JASS:
function BetterTrigger takes nothing returns nothing
    call IncUnitAbilityLevel( GetKillingUnit(), 'MySpellInt' )
endfunction
 
Level 17
Joined
May 6, 2008
Messages
1,598
I mean the the whole trigger, if it putted into a trigger, leaks.
 
Last edited:
Status
Not open for further replies.
Top