• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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 :)
 
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:
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
 
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.
 
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?
 
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
 
I mean the the whole trigger, if it putted into a trigger, leaks.
 
Last edited:
Status
Not open for further replies.
Back
Top