简单说一下dota2 AI的调试步骤。日后有更新或者别的技巧会继续跟进补充。V社官方文档为 https://developer.valvesoftware.com/wiki/Dota_Bot_Scripting ,中文版文档(不全)为https://developer.valvesoftware.com/wiki/Dota_Bot_Scripting:zh-cn。
文档还是应该看一遍的。
在脚本中插入print语句,在运行的时候会有蓝色的输出(如图,不过V社这个console查看起来异常费力)
--\Steam\steamapps\common\dota 2 beta\game\dota\scripts\vscripts\bots\ability_item_usage_generic.lua
----------------------------------------------------------------------------------------------------
function AbilityUsageThink()
print( "Generic.AbilityUsageThink" );
end
----------------------------------------------------------------------------------------------------
function ItemUsageThink()
print( "Generic.ItemUsageThink" );
end
----------------------------------------------------------------------------------------------------