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

Thread: API Requests

  1. #441
    in the attack animation

  2. #442
    Basic Member
    Join Date
    Oct 2016
    Posts
    247
    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
    2,019
    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
    247
    i would like a function that re-enables valve support for bot scripting.

  6. #446
    Basic Member
    Join Date
    Jun 2013
    Posts
    274
    In the hopes that one day bots will be given development resources again, I request a unit scoped function that returns true or false if the Hero/Courier/unit is within a shop trigger region or not.

    Triggering a shop has nothing to do with Hero distance from the shopkeeper, but if they're standing in a designated drawn region. So often times using DistanceFrom functions won't yield ideal results. I figure it would be a simple enough implementation since the code is in place for when human players enter the regions.

    Ideally there would be an input options to differentiate between main, side and secret shops or separate functions for each.

    Code:
    Input Options: SHOP_MAIN, SHOP_SIDE, SHOP_SECRET
    
    if npcBot:IsAtShop(SHOP_SECRET)
    then
        npcBot:ActionImmediate_PurchaseItem("item_reaver");
    end
    
    ------------------------------------------------------------------------------------------------
    
    if npcBot:IsAtSecretShop()
    then
        npcBot:ActionImmediate_PurchaseItem("item_reaver");
    end

  7. #447
    Basic Member
    Join Date
    Oct 2016
    Posts
    247
    please make "hMinionUnit:Action_AttackUnit(target, true);" work with clinkz army.

    also, "attackunit" working with runes would be nice too.

    phoenix's "power" rating is way too high - 70k when other are at 1k.
    engima and elder titan both still break the debug console and ruin laning - tri lane / stop the laning phase.
    dark willow can feed by running down mid lane if she doesnt get mid lane.

    bots cant buy from secret shop when courier is waiting at secret shop.
    Last edited by Yavimaya; 04-10-2019 at 04:51 PM.

Posting Permissions

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