Constant attack speed

Imp Midna

Active Member
Reaction score
52
Is there any way to give a hero a constant attack speed (that is not influenced by the agi-value, auras, cripple or any buff or hex)?
 

Solu9

You can change this now in User CP.
Reaction score
216
You mean besides setting the attack cooldown in the unit's stats?

I don't know if you can use this but Elune's Grace can change the attack speed and as far as I can see it does not show a buff.
 

Imp Midna

Active Member
Reaction score
52
afaik, attack cooldown in the object editor is only the base attack speed, and agi values and items like gloves of haste or spells like criple modify it (increase, decrease). I want it to be constant though, even if he has gloves of haste or is crippled.
Eluns Grace would just increase the attack speed, wouldnt it?
 

Solu9

You can change this now in User CP.
Reaction score
216
Ah, I misunderstood you.
Hmm you have to detect when your unit receives an item or get hit by a spell and trigger the attack speed accordingly. Will take a lot of effort I guess.

Edit: I take it is not an option to make the unit immune to spells right?
 

Solu9

You can change this now in User CP.
Reaction score
216
Idea: Will still require a lot of time though.

If that particular unit picks up an item which changes the attack speed, remove it and give it a dummy item.

Same goes for spells casted on the unit. If the spell slows the attack speed have a dummy unit cast a dummy spell which does the same besides slowing.

I don't know about the agility problem....
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
I am not sure what you are asking, if you are asking if there is a way to make it to where they cant go fast a certain speed then you just need to adjust the animation back swing and the animation damage point. those 2 added together is the minimal attack speed and no matter what aura's or the cd is the attacks will never exceed those.

So say you have a ABS of .75 and a ADP of .75 as well, then that hero will only be able to attack ever 1.5 secs even if the cd is set to .5 or 0.
 

Imp Midna

Active Member
Reaction score
52
Hm. I set both ABS and ADP to 0.75, cooldown to 0 and made a testtrigger to determin the seconds per attack. What it showed me was that i attacked every 0.625 seconds, and after getting some agi 0.541 seconds. Anything i did wrong?
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
The attacks are made in 2 parts, the ABS which is how long your unit takes to swing his weapon and then the ADP is the damage that shows up on the target. A unit cant attack until both of these are finished and nether are affected by anything but them selfs and each other, the ADP wont run till the ABS finishes. If you are not getting the right results only thing I can think of is your trigger is lacking in some way. Post the trigger you used to measure and I will see if I can find out why it gave the results it did.
 

Imp Midna

Active Member
Reaction score
52
Trigger:
  • Unbezeichneter Auslöser 001
    • Events
      • Unit - A unit is Attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equals Firemage
    • Actions
      • Game - Display to (All players) the text: (String((Elapsed time for testTimer)))
      • Countdown Timer - Start testTimer as a Einmalig timer that will expire in 100.00 seconds
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
all that will tell you is when the attack is register but not the actual attack speed, the triggers will register the attack before the attack is actually finished.
Try some thing like this, it will give you an average for the attacks speed
Trigger:
  • Temp 1
    • Events
    • Unit - A unit Is attacked
    • Conditions
    • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • T_B Equal to True
    • Then - Actions
    • Set T_I = (T_I + 1)
    • Else - Actions
    • Set T_B = True
    • Countdown Timer - Start T_T as a One-shot timer that will expire in 10.00 seconds

Trigger:
  • Temp 2
    • Events
    • Time - T_T expires
    • Conditions
    • Actions
    • Set T_B = False
    • Game - Display to (All players) the text: (String((T_I / 10)))
    • Set T_I = 0

I am sorry I should have used a real and not a integer on those, the T_I [Temp_ Integer] will need to be changed to a T_R [Temp_Real]
But yeah with my test of it, it seems to be limiting the attack to the ABS only instead of both, but still it just means set the ABS to what you want the speed to be limited to.
 

SouLEDGE

Damn you advanced calculus
Reaction score
75
Why not just set the attack speed gained from agi to 0% in gameplay constants?
 

Solu9

You can change this now in User CP.
Reaction score
216
Thought of the animations myself. But how will you prevent the unit getting slower attack speed from fx. Thunderclap?

Why not just set the attack speed gained from agi to 0% in gameplay constants?

I think we assumed Imp Midna wants to use agi for faster attack speed :)
 

SouLEDGE

Damn you advanced calculus
Reaction score
75
Well I hope he/she can see that this is no easy task to accomplish
but I'd like to know what it's for, whats the idea behind the unit
having constant attack speed?
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
You never want to use a 0 in the editor cause of all the default values not sure if attack cd has a deafult or not, if you set the cd to something like .01 it shouldn't be effected by slow effect to that much of a degree
 

Imp Midna

Active Member
Reaction score
52
all that will tell you is when the attack is register but not the actual attack speed, the triggers will register the attack before the attack is actually finished.
Try some thing like this, it will give you an average for the attacks speed
Trigger:
  • Temp 1
    • Events
    • Unit - A unit Is attacked
    • Conditions
    • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • T_B Equal to True
    • Then - Actions
    • Set T_I = (T_I + 1)
    • Else - Actions
    • Set T_B = True
    • Countdown Timer - Start T_T as a One-shot timer that will expire in 10.00 seconds

Trigger:
  • Temp 2
    • Events
    • Time - T_T expires
    • Conditions
    • Actions
    • Set T_B = False
    • Game - Display to (All players) the text: (String((T_I / 10)))
    • Set T_I = 0

I am sorry I should have used a real and not a integer on those, the T_I [Temp_ Integer] will need to be changed to a T_R [Temp_Real]
But yeah with my test of it, it seems to be limiting the attack to the ABS only instead of both, but still it just means set the ABS to what you want the speed to be limited to.

I think i know enough maths to know that it doesnt matter if you use x/y or y/x if you want to see if the quotient is constant, but ill do it.
Edit: just what i thought.
≈ 0.625 (s/a) using my trigger
≈ 1.6 (a/s) using your trigger
obviousness: 0.625^(-1) ≈ 1.6
increased agi by +24
≈ 0.456 (s/a) using my trigger
≈ 2.1 (a/s) using your trigger
obviousness: 0.456^(-1) ≈ 2.19 (the 0.09 is totally acceptible noticing the 32-bit floating point values beeing used, the mistake that the 2cnd Trigger is bringin with and the 3-digit precision of the r2s function)

Why not just set the attack speed gained from agi to 0% in gameplay constants?

because of
I think we assumed Imp Midna wants to use agi for faster attack speed :)

Well I hope he/she can see that this is no easy task to accomplish
thats why im here. i would be able to do it on my own if it was easy ;)

but I'd like to know what it's for, whats the idea behind the unit
having constant attack speed?
The class is a pure caster class in general. First i gave him an incriebly useless normal attack, forcing him to deal most of his damage using a spamable spell (which has a constant attack speed as it is a spell). Now i wanted to make this spell become his actuall attack (button delay, lag, other gameplay aspects made me think it wouldnt be a bad idea) without destroying its whole sense (which is: having a constant attack speed like any other spells he is dealing his damage with, beeing independend of agi values, cripple, thunderclap etc.)
 

Solu9

You can change this now in User CP.
Reaction score
216
Could you trigger his attack perhaps.
Say when the unit attack you start a periodic timer. When the timer hits 0 he will cast the spell.

Edit: Or perhaps better. Make a dummy cast the spell.
 

Imp Midna

Active Member
Reaction score
52
wow, what a solution.
I tried to go with the add-ability-when-getting-agi solution to at least get rid of this part when i got the extremly weird and stupid idea i actually solved this problem with now.
What i did is this kind of a mix of what ideas you guys have posted to this point:

I gave, as a unit spell, a tornado slow aura to my unit increasing the attack speed by a pervertly high amount (1000000000.00 - as an unreal). Thats because warcraft seemingly cuts the as modification at 80%. Then, i set my attack stats in the object editor to (attackspeed * 5). Due to the 80% cap, i effectively get my attackspeed.
When i now am influenced by a spell that, lets say, reduces as by 50% (= 0.50 as unreal), i still have 999999999.50 as bonus left, which is still capped at 80%. It speeds up the attack animation x5, but since the mage has an imported modell anyways, thats not too mutch of a deal, as i could simply write a lil programm that increases the length of an animation (attack 1 and attack 2). and it works :D

Thank you to all you guys for putting in all the ideas. Without em either my head or my table would suffer of significant physical damage now. thanks :) :) :) :) :)
*getting euphoric and starts throwing around with likes
(Ps: :) :) :) :) :) :) :) :) )
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top