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

Thread: GetRuneTimeSinceSeen()

  1. #1
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,832

    GetRuneTimeSinceSeen()

    Hey Chris, can you please check GetRuneTimeSinceSeen() ?
    I was testing some new code with it, trying to simplify my old one and my bot never picks up the rune. After i printed it, GetRuneTimeSinceSeen() spilled out more than 110 even though the rune just spawned. That seems wrong and sounds more like what GameTime() would be. I expected GetRuneTimeSinceSeen() to increase on each fog-of-war cover-up then reset to 0 as soon as it came into view, only to increment again once the fog-of-war sets upon the rune (if not picked up). I assume the time would also increase if the rune is picked up as well, but not sure about this scenario. Would you mind clearing thing up?

    Thanks
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  2. #2
    Basic Member
    Join Date
    Dec 2016
    Posts
    175
    hi

    try GameTime() - GetRuneTImeSinceSeen()

    i had same problem for GetLastAttackTime(). it starts from hero picking phase

  3. #3
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,832
    Why? The runes start at DotaTime(). It doesn't make sense.
    Last edited by The Nomad; 04-22-2017 at 02:03 AM.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  4. #4
    Basic Member
    Join Date
    Dec 2016
    Posts
    175
    GetLastAttackTime() starts parallel with GameTime(). for example if you want to know the relative last attack time you need to subtract GetLastAttackTime from GameTime() not DotaTime().
    I think GetRuneTimeSinceSeen works same as GetLastAttackTime. it doesn't make sense for me too .

  5. #5
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,832
    OK, there is another weird behavior for GetTimeOfDay()

    First off, it starts with a 0.25 offset. Secondly nighttime starts at 0.75 not at 0.00. I really hope I don't have to use GameTime() on this too... Did anyone use this function yet?
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  6. #6
    Basic Member
    Join Date
    Dec 2016
    Posts
    175
    no i didnt
    but u can use DotaTime() % 60 to access minute of the game
    and DotaTime() - minute*60 to access second of the game time

    hope this help u

    most of api function do not work in a way we expect unfortunately

  7. #7
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,832
    I know how to get the minutes and seconds. I was trying to experiment with the API
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  8. #8
    Valve Developer
    Join Date
    Sep 2011
    Posts
    1,704
    Yep, GetRuneTImeSinceSeen() is incorrect, I'll fix. (It should basically be returning GetGameTime() minus its current return value).

    GetTimeOfDay() is correct I believe -- 0.0 is midnight, 0.5 is noon, and the game starts at "dawn".

  9. #9
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,832
    Are you sure? I seem to be getting a 0.25 offset (truth be told, I haven't tested the latest patch). I still have a LOT of stuff to install on this new laptop
    I'll try it next weekend.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  10. #10
    Basic Member
    Join Date
    Jan 2014
    Posts
    49
    Off-topic but @The Nomad have you released a bot script? I see you posting here often but don't think I've seen your name on any of the workshop scripts so am just curious what you're working on.

Posting Permissions

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