Heroes of Newerth Wiki
Advertisement

This function draws a debug line in the game world.

HoN.DrawDebugLine(vecStart, vecEnd[, bArrow = false, sColor = "yellow"])

Arguments[ | ]

vecStart
Vector3 - The Vector3 start location for the debug line.
vecEnd
Vector3 - The Vector3 end location for the debug line.
bArrow
Boolean - Whether the line should be drawn as an arrow. Defaults to false.
sColor
String - The color of the debug line. Defaults to yellow.

Example[ | ]

local vecMyPosition = core.unitSelf:GetPosition()
local vecSomeOtherPlace = vecMyPosition + Vector3.Create(600, 0)

HoN.DrawDebugLine(vecMyPosition, vecSomeOtherPlace, false, 'red')

Details[ | ]

  • Can only be seen if the CVARs cg_botDebug and sv_botDebug are set to true.
  • All lines will disappear at the next behavior assessment (by default this is once every 250ms).
  • The engine will only draw the first 42 lines every behavior assessment.
  • The default core.lua provides 3 functions to make usage easier:
  • core.DrawDebugLine(vStart, vEnd, color)
  • core.DrawDebugArrow(vStart, vEnd, color)
  • core.DrawXPosition(position, color, nSize)
Advertisement