Page 45 of 45 FirstFirst ... 35 43 44 45
Results 441 to 445 of 445

Thread: API Requests

  1. #441
    in the attack animation

  2. #442
    Basic Member
    Join Date
    Oct 2016
    Posts
    246
    GetAnimActivity()

    ACTIVITY_ATTACK
    ACTIVITY_ATTACK2
    ACTIVITY_ATTACK_EVENT


    not sure how to use them sorry, but there is attack anim related stuff in the API.

  3. #443
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,976
    Like Yavimaya said, you use GetAnimActivity() to see the current animation clip playing, and if it's an attack animation you can use GetAnimCycle() (which ranges from 0.00 to 1.00) to see if it's greater than the attack point:

    Code:
    function HasFinishedAttackAnim (Bot)
        if (Bot:IsAlive() == false) then
           return;
        end;
    
        if (Bot:GetAnimActivity() == ACTIVITY_ATTACK) then -- and you add here conditions for other clips as well :)
            if (Bot:GetAnimCycle() >= Bot:GetAttackPoint()) then
                print(Bot:GetUnitName() .. " finished the attack, but not the animation"); -- the rest of the animation from anim cycle is to put the weapon down after an attack past the attack point
            end
       end
    end
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  4. #444
    Basic Member
    Join Date
    Nov 2015
    Posts
    1

    Available heroes in Random Draft

    I would like a function that looks something like this:

    GetAvailableHeroes()

    This should return a table with all the available heroes to pick from in Random Draft.

  5. #445
    Basic Member
    Join Date
    Oct 2016
    Posts
    246
    i would like a function that re-enables valve support for bot scripting.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •