# Attack Speed

#### Ezekiel12

Level 12
No. There is no simple way known.

#### deathismyfriend

Level 29
there is a simple way unless items are included.

Get the units agility and times it by the attack speed that you used in gameplay constants.
make sure to then include the attack speed of the unit in the OE.

#### deathismyfriend

Level 29
to do that you would need to either have all units only have attack speed based on there agility.
Alternatively you can store each units base attack speed into a hashtable keyed to that units unit type. Then load the unit type and times the agility by the attack speed bonus in the gameplay constants. Then check for any items that give increased attack speeds.

#### MN Lahmar

Level 21
That's not possible, u can only see if the attack speed is very slow,slow,average , fast or very fast :/

#### deathismyfriend

Level 29
That's not possible, u can only see if the attack speed is very slow,slow,average , fast or very fast :/

yes it is possible that is why i said some options.

#### Kusanagi Kuro

Hosted Project: SC
Level 10
I suggest u should do like deathismyfriend said. Here is the formula:
1/(Base attack time of the unit type) x [(Bonus Attack Speed+100)/100]
Bonus attack speed is calculated by the Agility and item's bonus. Therefore, u must store the amount of AS bonus for every item into a variable to easily add or subtract them.

#### deathismyfriend

Level 29
that is more complicated than it needs to be.
use (gameplay constant attack speed bonus * agi points) + item speed bonus.
if its an item speed bonus that deals with percent use this.
set r = (gameplay constant attack speed bonus * agi points)
r + (r * ( 1.00 - percent bonus))

#### Kusanagi Kuro

Hosted Project: SC
Level 10
I mean if he wants to know about the attack speed bonus, I think it would be better to show the player how many attack the unit can make in 1s. . That's what my formula for. Also, yeah, I agree that the second part of my formula isnt as effective as urs .

#### deathismyfriend

Level 29
that would require you to check how many attacks are placed in a second.

#### Spartipilo

Level 20
The Attack Speeds names (Very Slow, Slow, Normal, Fast, Very Fast) have limits declared in some Wc3 file (MiscData.txt i think). I'm not sure if you can add extra fields there. At least it lets you know the "gap" between the values the AS is.

Level 4

#### Vinz

Level 74
with this you can but its not perfectly acurate but good enough and works with items
run the game with this on and there will be attack speeds instead of slow / very slow / etc
And that would mean that everyone would need it to be able to see the attack speed, right?

What I actually want to achieve is an '-AS' command.

#### DoctorReza

Level 4
there is formulas for attack speed and armor and these stuff i remember i read about it in playdota.com (i dont have access to playdota.com so i cant give you the link i remember it was in a page named mechanic.)

#### deathismyfriend

Level 29
there is formulas for attack speed and armor and these stuff i remember i read about it in playdota.com (i dont have access to playdota.com so i cant give you the link i remember it was in a page named mechanic.)

to do that they would need a system that controls and registers attack speed of the units.

#### Vinz

Level 74
there is formulas for attack speed and armor and these stuff i remember i read about it in playdota.com (i dont have access to playdota.com so i cant give you the link i remember it was in a page named mechanic.)
It's most probably the Gameplay Constants formula that you're talking about.

#### Dr Super Good

Spell Reviewer
Level 63
If you can lock the unit down for a while you can use a dummy to detect attack speed. However the player should be unable to influence the unit (change owner?) and the dummy bust be targetable and attackable.

Remember that faster attack speed is capped at +400% and -80%. This results in 5 times as many hits to 1/5th as many hits per unit time. There may also be rounding based on internal frame rate.

Replies
3
Views
4K
Replies
7
Views
912
Replies
4
Views
1K
Replies
4
Views
650
Replies
4
Views
7K