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

[Spell] Passive that stacks attackspeed per attack up to a cap

Status
Not open for further replies.
Level 13
Joined
Jan 4, 2014
Messages
558
Hello, I want to make a spell that does the following,

Every time a specific unit attacks, increase it's attack speed by 10% up to 100%. If no attacks are done within 5 seconds, all stacks are lost.

The increase attack speed part is fairly simple.
(Unit is attacked) >> (int > 10) >> (attacking unit = specific unit) >> (add 10% attack speed)

My issue is having some kind of timer that resets to 5 seconds every time (specific unit attacks) and having a trigger that checks if the timer goes down to 0.

I thought about giving a buff to the unit every time it attacks and having a trigger check every 0.5 seconds if the unit still has the buff, if it doesn't, remove all stacks, but this seems like an annoying way of doing it, since it requires a constant trigger that runs every 0.5 seconds.
 
Guessing you don't want MUI skill

Just add to your first trigger
Set Time = 5.00
Set Hero = Attacking unit
If DetoLoop <gen> is on equals false then
Turn on DetoLoop
Endif

DetoLoop
Every 0.5

Set Time = Time-0.5
If Time equals or less than 0.00 then
Remove AttackSpeed from Hero
Turn off this trigger
Endif
 
Status
Not open for further replies.
Back
Top