Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: How does FindAoELocation(...) work?

  1. #1
    Basic Member
    Join Date
    Jun 2017
    Posts
    4

    How does FindAoELocation(...) work?

    Here is my invoker code. The cast range is 700 and the radiu is 275, but why it always returns a targetloc that 1300 far away from the npcBot?
    How does the FindAoELocation(...) work? What are the meanings of those parameter?

    local info = npcBot:FindAoELocation( true, true, npcBot:GetLocation(), abilityD:GetCastRange(), radiu, delay, 0 )
    local count = info.count
    local targetloc = info.targetloc

  2. #2
    Basic Member
    Join Date
    Dec 2016
    Posts
    611
    Many things possible:

    1) It depends on "delay" (it will calculate the position of enemy heroes by that amount into the future - probably using GetExtrapolatedLocation()). Perhaps it assumes you are willing to "move" to a closer location over that "delay" time.

    2) It find "no" enemy heroes in range and thus has a default return value that's improper and hence a bug which happens to be 1300 away. To check for this make sure count is > 0 in your code before printing targetloc.

    3) Other bugs

  3. #3
    Basic Member
    Join Date
    Dec 2016
    Posts
    120
    the first two parameters represent the availability of creeps or heroes around targetloc. third one contains start location to search. the forth one shows maximum distance of targetloc from third parameter. radius contains the radius of circle that creeps or heroes should be in it. delay and hpmax set conditions for the next few seconds with maximum( or minimum check API docs ) hp for units.

    this function returns table contains targetloc and count that shows best position matches with specified arguments. i check this for shrapnel( first ability of sniper ) and it work with numerous mistakes. this happen because we called it in every frame and in each frame it calculates differ from the previous

    u can check final point in each frame using DebugCircle function.

  4. #4
    Basic Member
    Join Date
    Dec 2016
    Posts
    120
    Quote Originally Posted by nostrademous View Post
    Many things possible:

    1) It depends on "delay" (it will calculate the position of enemy heroes by that amount into the future - probably using GetExtrapolatedLocation()). Perhaps it assumes you are willing to "move" to a closer location over that "delay" time.

    2) It find "no" enemy heroes in range and thus has a default return value that's improper and hence a bug which happens to be 1300 away. To check for this make sure count is > 0 in your code before printing targetloc.

    3) Other bugs
    these are useful too before performing any action related to FindAOE outputs
    u need

  5. #5
    Basic Member
    Join Date
    Jun 2017
    Posts
    4
    Quote Originally Posted by nostrademous View Post
    Many things possible:

    1) It depends on "delay" (it will calculate the position of enemy heroes by that amount into the future - probably using GetExtrapolatedLocation()). Perhaps it assumes you are willing to "move" to a closer location over that "delay" time.

    2) It find "no" enemy heroes in range and thus has a default return value that's improper and hence a bug which happens to be 1300 away. To check for this make sure count is > 0 in your code before printing targetloc.

    3) Other bugs
    It seems to be the third case. The delay is 0, and I am sure that there are enemies so it calculates their position and returns a vector around 1300 far away.

  6. #6
    Basic Member
    Join Date
    Jun 2017
    Posts
    4
    Quote Originally Posted by SIKIM View Post
    the first two parameters represent the availability of creeps or heroes around targetloc. third one contains start location to search. the forth one shows maximum distance of targetloc from third parameter. radius contains the radius of circle that creeps or heroes should be in it. delay and hpmax set conditions for the next few seconds with maximum( or minimum check API docs ) hp for units.

    this function returns table contains targetloc and count that shows best position matches with specified arguments. i check this for shrapnel( first ability of sniper ) and it work with numerous mistakes. this happen because we called it in every frame and in each frame it calculates differ from the previous

    u can check final point in each frame using DebugCircle function.
    u mean that I can only use this function once a frame, otherwise it will make mistakes. right?

  7. #7
    Basic Member
    Join Date
    Dec 2016
    Posts
    120
    Quote Originally Posted by pilaoda View Post
    u mean that I can only use this function once a frame, otherwise it will make mistakes. right?
    not Actually a mistake, because in each frame, creeps and heroes' properties change and this will affect indirectly to result of functions line findAOE. u can use DebugCircle function on targetloc point and reduce game speed by host_framerate or timelimit to get familiar with the results.

  8. #8
    Basic Member
    Join Date
    Dec 2016
    Posts
    611
    We could also use another API function which maps rectangular shapes over a similar area as FindAoELocation() does. This would be important for many spells as the radius is not a rich enough to specify the area of effect of such spells. A rectangle should suffice to cover most of these.

    Example: Invoker - Tornado, Chaos Meteor, Ice Wall, Deafening Blast; Jakiro - Ice Path, Macro Pyre; Dark Seer - Wall of Replica; Keeper of the Light - Illuminate; even Kunkka's Tidebringer, you get the idea...

  9. #9
    Valve Developer
    Join Date
    Sep 2011
    Posts
    1,665
    There's at least one bug in how FindAoELocation uses its radius that will be fixed in the next bot update. It was including a lot of units that were well outside of its range.

  10. #10
    Basic Member
    Join Date
    Oct 2016
    Posts
    170
    Quote Originally Posted by ChrisC View Post
    There's at least one bug in how FindAoELocation uses its radius that will be fixed in the next bot update. It was including a lot of units that were well outside of its range.
    awesome! i have noticed that it hasnt been as accurate as it once was, i dont know if it is perception or if something changed a month or so back. i have elliviated it a little with getmovementstability, but still noticed radius' that were off to the side instead of bang on the group they clearly wanted to hit (although most of the time they did hit everyone, but only just).

Tags for this Thread

Posting Permissions

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