Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Detect current Attack Speed

Discussion in 'World Editor Help Zone' started by CaptainHero, Oct 29, 2014.

  1. CaptainHero

    CaptainHero

    Joined:
    Sep 30, 2012
    Messages:
    197
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Is there a way to detect a units current attack speed?

    for some info about attack speed in general:
    http://www.playdota.com/mechanics/attackspeed

    like is there a hidden jass function that just gives you the units current attack speed?
     
  2. Ezekiel12

    Ezekiel12

    Joined:
    Mar 13, 2012
    Messages:
    1,061
    Resources:
    0
    Resources:
    0
    There is no easy way.
    The best way depends on your map. You could check for all abilities and buffs on a unit that give attackspeed and then calculate it with their values, for example saved in a hashtable.
     
  3. Lender

    Lender

    Joined:
    Oct 16, 2010
    Messages:
    667
    Resources:
    6
    Models:
    4
    Spells:
    2
    Resources:
    6
    I don't think its possible... you have to save every units : Base attack time (BAT)

    by manually assigning them to variables is the only way to work with them
    and for further attack speed calculations you have to register EVERY IAS(increase attack speed) effect the unit has:/

    like if he equips a gloves of haste (it gives 30 IAS) register the amount

    that would be hell of a lot work I think and really complicated as a map could use hundrends of different types of units:D
     
  4. Ezekiel12

    Ezekiel12

    Joined:
    Mar 13, 2012
    Messages:
    1,061
    Resources:
    0
    Resources:
    0
    You're making things up, thats not how it works.
     
  5. Lender

    Lender

    Joined:
    Oct 16, 2010
    Messages:
    667
    Resources:
    6
    Models:
    4
    Spells:
    2
    Resources:
    6
    sry already edited:D my bad..