Results 1 to 5 of 5

Thread: February 24 Bot Update

  1. #1
    Valve Developer
    Join Date
    Sep 2011

    February 24 Bot Update

    • Added GetModifierList() to the unit bot script API.
    • Added IsFlyingCourier( hCourier ) to the global bot script API.
    • Added DebugPause() to the global bot script API.
    • Added GetTowerAttackTarget( nTeam, nTower ) to the global bot script API.
    • Fixed the returned names in GetBotNames() bleeding through to subsequent games
    • Added 'caster' element to GetIncomingTrackingProjectiles().
    • Added 'player' table entry to GetAvoidanceZones return table.
    • Fixed GetTarget() crashing when called on invalid units.
    • Units that were not a bot (such as lane creeps) that become a bot (such as when dominated) now will get a MinionThink() called for them.

    Also updated the recommended boilerplate code for chaining to generics on the wiki:

  2. #2
    Basic Member
    Join Date
    Jun 2013
    Excellent. Can chop down a multi-layered if/elseif statement to 3 lines with IsFlyingCourier( hCourier ).
    I do like it when simplifying, built-in functions pop up.

  3. #3
    Basic Member
    Join Date
    Dec 2016
    I think GetModifierList() will be veru useful when calculation extra damage and stun time. Thanks! What did GetModifierList() return? did it return the name of the modifier or the the result also include the name of that ability? and for 'caster' element of GetIncomingTrackingProjectiles(), is the caster PlayerID or the name of hero?

    Some question not related to this update: will GetRawOffensivePower() count 'stun' like bane 'Nightmare' 'Fiend's Grip ' or Shadow Shaman 'Shackles' into stun time and assume they can do right click damage in this time period? Did GetUnitPotentialValue() work for PlayerID now?
    Last edited by lunarbreez; 02-27-2017 at 08:33 AM.

  4. #4
    Basic Member
    Join Date
    Mar 2012
    TYVM Chris
    If it's not too much trouble, can you tell me how to draw text on the right side? DebugDrawText() uses X and Y, but how can I tell the resolution of the screen (say if I am sending it to a friend that has a different resolution). What approach should I take to get something like x = GetScreenSize().x - 100 ? For now I'll debug on the left and maybe hardcode some "right" positions.

    Not sure how many people would also want these for debugging:
    - WorldToScreen projection
    - boxes and spheres around units (or similar to how tower targeting is visible during ALT key pressing)

    Obviously the 2 above would only be relevant if a lot of people need it. The GetScreenSize() thing, is slightly more important, but obviously, only for debugging. Not sure if it can be used to optimize GetNearby*() and other radius check functions as to limit within screen view.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  5. #5
    Basic Member
    Join Date
    Dec 2016
    I have this problem too
    Thanks for updates Chris

Posting Permissions

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