Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 11 to 20 of 32

Thread: February 13 Bot Update

  1. #11
    Added GetAmountAlongLane( nLane, vLocation ) function to the global bot script API which returns a table { "amount", "distance" } which are the 0.0-1.0 amount along the lane, and the perpendicular distance from the lane.
    THANK YOU! A quick question: how computationally expensive is this? i.e. did you implement it in O(1), O(log(1/eps)) or O(1/eps)?
    Last edited by Platinum_dota2; 02-14-2017 at 07:51 AM.

  2. #12
    Basic Member
    Join Date
    Dec 2016
    Posts
    731
    Also, a reminder, just like the unit-scoped GetModifierName(), the unit-scoped GetQueuedActionType() is 0 indexed. So if you are checking it do something like this:
    Code:
        if bot:NumQueuedActions() > 0 then
            for i = 0, bot:NumQueuedActions()-1, 1 do
                utils.myPrint("["..i.."] Queued Action Type: ", bot:GetQueuedActionType(i))
            end
            return
        end

  3. #13
    Basic Member
    Join Date
    Dec 2016
    Posts
    731
    Quote Originally Posted by Platinum_dota2 View Post
    THANK YOU! A quick question: how computationally expensive is this? i.e. did you implement it in O(1), O(log(1/eps)) or O(1/eps)?
    We won't know till it is fixed to actually work

  4. #14
    Basic Member
    Join Date
    May 2014
    Posts
    270
    I tried to implement AA ult in my script. But every time the projectile arrive at the stop location I can't stop that. After I printed the location of the projectile every frame it has 3 coordinate. I assumed it was (x, y, z). How can I get the X, Y coordinate only to match my cast location since it only have 2 coordinate X, and Y. I tried to make him cast on Vector(0, 0) but when the projectile arrived in there he won't stop it. So instead of make it check that the locations are equal I measure the distance between it and make it stop the projectile when the distance less than some threshold. Can I get the X, and Y coordinat of the projectile location by doing this local X = proj.location[1]; local Y = proj.location[2]; local projLoc = Vector(X, Y)?

  5. #15
    Basic Member
    Join Date
    Dec 2016
    Posts
    731
    Quote Originally Posted by arz_on4dt View Post
    Can I get the X, and Y coordinat of the projectile location by doing this local X = proj.location[1]; local Y = proj.location[2]; local projLoc = Vector(X, Y)?
    All locations are vectors. All vectors can be accessed by X = vec[1], Y = vec[2], Z = vec[3]. So yes, you can do that.

  6. #16
    Basic Member
    Join Date
    May 2014
    Posts
    270
    Quote Originally Posted by nostrademous View Post
    All locations are vectors. All vectors can be accessed by X = vec[1], Y = vec[2], Z = vec[3]. So yes, you can do that.
    OK. Thank you. Why didn't I just try it myself, Stupid Me . BTW is there any API to determine that the projectile path is clear or not from unit? I know pudge bot can determine whether the hook path is clear or not from units.

  7. #17
    Basic Member
    Join Date
    Dec 2016
    Posts
    731
    Quote Originally Posted by arz_on4dt View Post
    OK. Thank you. Why didn't I just try it myself, Stupid Me . BTW is there any API to determine that the projectile path is clear or not from unit? I know pudge bot can determine whether the hook path is clear or not from units.
    Check https://github.com/Nostrademous/Dota...er/utility.lua
    Lines: 497, 532, 567, 602

  8. #18
    Basic Member
    Join Date
    May 2014
    Posts
    270
    Quote Originally Posted by nostrademous View Post
    Wow, Thank you so much. Can I have your permission to use it? Is lineOfSightThickness mean projectile radius?

  9. #19
    Basic Member
    Join Date
    Dec 2016
    Posts
    731
    Quote Originally Posted by arz_on4dt View Post
    Wow, Thank you so much. Can I have your permission to use it? Is lineOfSightThickness mean projectile radius?
    Yeah... I would call it more "projectile hit box" but yes. Like my code says, most of that is derived from Platinum_dota2 code. I don't have an issue. All my code is public.

    EDIT: Note: I haven't really tested the code though... so it might not work. If it doesn't and you fix it I would appreciate a pull request of at least a post with fixes.

  10. #20
    Basic Member
    Join Date
    May 2014
    Posts
    270
    Quote Originally Posted by nostrademous View Post
    Yeah... I would call it more "projectile hit box" but yes. Like my code says, most of that is derived from Platinum_dota2 code. I don't have an issue. All my code is public.

    EDIT: Note: I haven't really tested the code though... so it might not work. If it doesn't and you fix it I would appreciate a pull request of at least a post with fixes.
    Aye Sir!

Posting Permissions

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