Zh/Dota 2 Workshop Tools/Scripting/API: Difference between revisions
|  (Created page with "{{Note | This page is automatically generated.  Any changes may be overwritten}}    ==='''Accessing the DOTA 2 Scripting API from Lua===  While Lua is [http://en.wikipedia.org/wi...") | m (Using L template for links) | ||
| (94 intermediate revisions by 12 users not shown) | |||
| Line 1: | Line 1: | ||
| {{lang|title=API|Dota 2 Workshop Tools/Scripting/API}} | |||
| {{Note | This page is automatically generated.  Any changes may be overwritten}} | {{Note | This page is automatically generated.  Any changes may be overwritten}} | ||
| ==='''从Lua 获取 DOTA 2 scripts 接口 === | |||
| Lua 是一种动态类型语言[http://en.wikipedia.org/wiki/Dynamically_typed dynamically typed],意味着在编写代码时你不需要显式地声明变量的类型。Lua 会在运行时自动推断变量的类型。然而,DOTA 2的引擎主要是用 C++ 编写的,C++ 是一种静态类型语言[http://en.wikipedia.org/wiki/Type_system#Static_type-checking statically typed],要求程序员在编译时明确变量的类型。 | |||
| 当你使用 Lua 脚本与 DOTA 2 的 C++ API 交互时,由于这两种语言在类型处理上的差异,你需要特别注意你传递给 API 的数据类型。如果你尝试向 API 函数传递错误的数据类型,你将在 Vconsole(游戏内的控制台)中收到一个错误消息,告诉你传递了什么以及它期望的是什么类型。 | |||
| 例如,如果某个 API 函数期望接收一个整数作为参数,但你错误地传递了一个字符串,那么游戏引擎将无法正确处理这个参数,并且会在 Vconsole 中给出一个错误提示,告诉你期望一个整数但却收到了一个字符串。 | |||
| 因此,当你使用 Lua 调用 DOTA 2 的 C++ API 时,确保你了解每个函数期望的参数类型,并相应地传递正确的数据类型是非常重要的。这有助于避免运行时错误,并确保你的代码能够按预期工作。 | |||
| __TOC__ | __TOC__ | ||
| === Global === | === Global === | ||
| '' | |||
| ''全局函数,可以被任何类使用。'' | |||
| {| class="standard-table" style="width: 100%;" | {| class="standard-table" style="width: 100%;" | ||
| !  | |||
| !  | ! 函数名  | ||
| !  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/Global.AddFOWViewer|AddFOWViewer}} | ||
| | <code> | | <code>void AddFOWViewer(int int_1, Vector Vector_2, float float_3, float float_4, bool bool_5) </code> | ||
| |  | | 为指定队伍增加临时视野 ( nTeamID, vLocation, flRadius, flDuration, bObstructedVision) | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/Global.AngleDiff|AngleDiff}} | ||
| | <code>void AppendToLogFile(string a, string b) </code> | | <code>float AngleDiff(float ang1, float ang2)</code> | ||
| |  | | 返回两个偏航角度之差 | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.AppendToLogFile|AppendToLogFile}} | |||
| | <code>void AppendToLogFile(string a, string b)</code> | |||
| | 在服务器日志文件上增加一个string | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.ApplyDamage|ApplyDamage}} | |||
| | <code>float ApplyDamage(handle DamageTable)</code> | |||
| | 对单位造成伤害,Table输入:victim, attacker, damage, damage_type, damage_flags, ability | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.AxisAngleToQuaternion|AxisAngleToQuaternion}} | |||
| | <code>Quaternion AxisAngleToQuaternion(Vector a, float b)(vector,float) </code> | |||
| | 构造一个四元数,表现出围绕给定的vector 轴线的旋转角 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.CalcClosestPointOnEntityOBB|CalcClosestPointOnEntityOBB}} | |||
| | <code>Vector CalcClosestPointOnEntityOBB(handle handle_1, Vector Vector_2)</code> | |||
| | 计算实体的OBB上最接近的两个点。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.CalcDistanceBetweenEntityOBB|CalcDistanceBetweenEntityOBB}} | |||
| | <code>float CalcDistanceBetweenEntityOBB(handle handle_1, handle handle_2)</code> | |||
| | 计算两个实体的OBB间距离。如果返回值为负,代表输入值有错误。 返回值为0则代表OBB互相重叠。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.CancelEntityIOEvents|CancelEntityIOEvents}} | |||
| | <code>void CancelEntityIOEvents(ehandle a)</code> | |||
| | 为特定的实体创建所有输入/输出事件 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.ClearTeamCustomHealthbarColor|ClearTeamCustomHealthbarColor}} | |||
| | <code>void ClearTeamCustomHealthbarColor(int int_1)( teamNumber ) </code> | |||
| | 清除自定义血条颜色。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.CreateEffect|CreateEffect}} | |||
| | <code>bool CreateEffect(handle a)</code> | |||
| | 传递table - 输入:实体,效果 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.CreateHeroForPlayer|CreateHeroForPlayer}} | |||
| | <code>handle CreateHeroForPlayer(string unitName, handle player)</code> | |||
| | 用DOTA英雄的dota_npc_units.txt中的名字创建它并把它设为给定玩家的控制英雄 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.CreateHTTPRequest|CreateHTTPRequest}} | |||
| | <code>handle CreateHTTPRequest(string string_1, string string_2) </code> | |||
| | 生成一个HTTP请求。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.CreateItem|CreateItem}} | |||
| | <code>handle CreateItem(string item_name, handle owner, handle owner)</code> | |||
| | 用类名称item_name创建一个owner可以使用的物品 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.CreateItemOnPositionForLaunch|CreateItemOnPositionForLaunch}} | |||
| | <code>handle CreateItemOnPositionForLaunch(Vector Vector_1, handle handle_2)</code> | |||
| | 在给定地点生成一个实际物品。 目标地点可以是空中(但这不会清空这个位置) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.CreateItemOnPositionSync|CreateItemOnPositionSync}} | |||
| | <code>handle CreateItemOnPositionSync(Vector a, handle b)</code> | |||
| | 在给定位置创建一个可见的物品 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.CreateModifierThinker|CreateModifierThinker}} | |||
| | <code>handle CreateModifierThinker(handle handle_1, handle handle_2, string string_3, handle handle_4, Vector Vector_5, int int_6, bool bool_7)</code> | |||
| | 生成一个不和任何NPC相关联的Modifier。 ( hCaster, hAbility, modifierName, paramTable, vOrigin, nTeamNumber, bPhantomBlocker ) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.CreateTempTree|CreateTempTree}} | |||
| | <code>void CreateTempTree(Vector Vector_1, float float_2)</code> | |||
| | 生成一颗临时存在的树。 (vLocation, flDuration). | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.CreateTrigger|CreateTrigger}} | |||
| | <code>handle CreateTrigger(Vector a, Vector b, Vector c)</code> | |||
| | CreateTrigger( vecMin, vecMax ) : 创建并返回一个AABB触发器 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.CreateTriggerRadiusApproximate|CreateTriggerRadiusApproximate}} | |||
| | <code>handle CreateTriggerRadiusApproximate(Vector a, float b)</code> | |||
| | CreateTriggerRadiusApproximate( vecOrigin, flRadius ) : 创建并返回一个比给定radius大的AABB触发器 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.CreateUnitByName|CreateUnitByName }} | |||
| | <code>handle CreateUnitByName(string a, Vector b, bool c, handle d, handle e, int f)</code> | |||
| | 用DOTA单位的dota_npc_units.txt中的名字创建它( szUnitName, vLocation, bFindClearSpace, hNPCOwner, hUnitOwner, iTeamNumber ) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.CreateUnitByNameAsync|CreateUnitByNameAsync}} | |||
| | <code>int CreateUnitByNameAsync(string a, Vector b, bool c, handle d, handle e, int f, handle g)</code> | |||
| | 用DOTA单位的dota_npc_units.txt中的名字创建它( szUnitName, vLocation, bFindClearSpace, hNPCOwner, hUnitOwner, iTeamNumber, hCallback ) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.CreateUnitFromTable|CreateUnitFromTable}} | |||
| | <code>hscript CreateUnitFromTable(table unitProperties)</code> | |||
| | Creates a new data-driven entity with the given table | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.cvar_getf|cvar_getf}} | |||
| | <code>float cvar_getf(string a)</code> | |||
| | 获取给定cvar的值,返回float. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.cvar_setf|cvar_setf }} | |||
| | <code>bool cvar_setf(string a, float b)</code> | |||
| | 设置给定cvar的值, 传递float. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.DebugBreak|DebugBreak}} | |||
| | <code>void DebugBreak()</code> | |||
| | 在debugger(调试模式)中停止运行 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.DebugDrawBox|DebugDrawBox}} | |||
| | <code>void DebugDrawBox(Vector origin, Vector min, Vector max, int r, int g, int b, int a, float duration)</code> | |||
| | 显示一个debug overlay窗口(origin, mins, maxs, r, g, b, a, duration ) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.DebugDrawBoxDirection|DebugDrawBoxDirection}} | |||
| | <code>void  DebugDrawBoxDirection(Vector a, Vector b, Vector c, Vector d, Vector e, float f, float g)</code> | |||
| | 显示一个debug forward窗口(cent, min, max, forward, vRgb, a, duration) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.DebugDrawCircle|DebugDrawCircle}} | |||
| | <code>void DebugDrawCircle(Vector a, Vector b, float c, float d, bool e, float f)</code> | |||
| | 显示一个debug圆(center, vRgb, a, rad, ztest, duration) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.DebugDrawClear|DebugDrawClear}} | |||
| | <code>void DebugDrawClear()</code> | |||
| | 尝试清理所有debug overlay信息 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.DebugDrawLine|DebugDrawLine}} | |||
| | <code>void DebugDrawLine(Vector a, Vector b, int c, int d, int e, bool f, float g)</code> | |||
| | 显示一个debug overlay线段origin, target, r, g, b, ztest, duration) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.DebugDrawLine_vCol|DebugDrawLine_vCol}} | |||
| | <code>void DebugDrawLine_vCol(Vector a, Vector b, Vector c, bool d, float e)</code> | |||
| | 使用vec颜色显示一个debug线段(start, end, vRgb, a, ztest, duration) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.DebugDrawScreenTextLine|DebugDrawScreenTextLine}} | |||
| | <code>void DebugDrawScreenTextLine(float a, float b, int c, string d, int e, int f, int g, int h, float i)</code> | |||
| | 显示给定行间距(lineoffset)的文字(x, y, lineOffset, text, r, g, b, a, duration) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.DebugDrawSphere|DebugDrawSphere}} | |||
| | <code>void DebugDrawSphere(Vector a, Vector b, float c, float d, bool e, float f)</code> | |||
| | 显示一个debug球(center, vRgb, a, rad, ztest, duration) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.DebugDrawText|DebugDrawText}} | |||
| | <code>void DebugDrawText(Vector a, string b, bool c, float d)</code> | |||
| | 显示3d文字(origin, text, bViewCheck, duration) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.DebugScreenTextPretty|DebugScreenTextPretty}} | |||
| | <code>void DebugScreenTextPretty(float a, float b, int c, string d, int e, int f, int g, int h, float i, string j, int k, bool l)</code> | |||
| | 显示漂亮的debug文字(x, y, lineOffset, text, r, g, b, a, duration, font, size, bBold) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.DoCleaveAttack|DoCleaveAttack}} | |||
| | <code>int DoCleaveAttack(handle handle_1, handle handle_2, handle handle_3, float float_4, float float_5, string string_6)</code> | |||
| | (hAttacker, hTarget, hAbility, fDamage, fRadius, effectName) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.DoEntFire|DoEntFire}} | |||
| | <code>void DoEntFire(string a, string b, string c, float d, handle e, handle f)EntFire: </code> | |||
| | 构造一个实体的输入/输出事件( szTarget, szAction, szValue, flDelay, hActivator, hCaller ) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.DoEntFireByInstanceHandle|DoEntFireByInstanceHandle}} | |||
| | <code>void DoEntFireByInstanceHandle(handle a, string b, string c, float d, handle e, handle f)</code> | |||
| | EntFireByHandle:构造一个实体的输入/输出事件 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.DoIncludeScript|DoIncludeScript}} | |||
| | <code>bool DoIncludeScript(string a, handle b)</code> | |||
| | 运行一个内部脚本 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.DoScriptAssert|DoScriptAssert}} | |||
| | <code>void DoScriptAssert(bool a, string b)</code> | |||
| | ScriptAssert:断言传入数据是数值,输出信息并显示断言对话框(参考编程中的Assert功能,主要用于调试,译者注) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.DoUniqueString|DoUniqueString}} | |||
| | <code>string DoUniqueString(string a)</code> | |||
| | UniqueString:使用任意的根字符串构造一个保证在VM脚本运行周期内唯一的字符串。当给表增加数据但不确定已用关键字时有用 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.EmitAnnouncerSound|EmitAnnouncerSound}} | |||
| | <code>void EmitAnnouncerSound(string string_1)</code> | |||
| | 对所有玩家播放播音员的声音。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.EmitAnnouncerSoundForPlayer|EmitAnnouncerSoundForPlayer}} | |||
| | <code>void EmitAnnouncerSoundForPlayer(string string_1, int int_2)</code> | |||
| | 对一位玩家播放播音员的音效。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.EmitAnnouncerSoundForTeam|EmitAnnouncerSoundForTeam}} | |||
| | <code>void EmitAnnouncerSoundForTeam(string string_1, int int_2)</code> | |||
| | 对一方队伍成员播放播音员的音效。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.EmitAnnouncerSoundForTeamOnLocation|EmitAnnouncerSoundForTeamOnLocation}} | |||
| | <code>void EmitAnnouncerSoundForTeamOnLocation(string string_1, int int_2, Vector Vector_3)</code> | |||
| | 对在某个特定地点队伍成员播放播音员的音效 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.EmitGlobalSound|EmitGlobalSound}} | |||
| | <code>void EmitGlobalSound(string a)</code> | |||
| | 为所有玩家播放给定名称的音效 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.EmitSoundOn|EmitSoundOn}} | |||
| | <code>void EmitSoundOn(string a, handle b)</code> | |||
| | 在一个实体上播放给定名称的音效 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.EmitSoundOnClient|EmitSoundOnClient}} | |||
| | <code>void EmitSoundOnClient(string a, handle b)</code> | |||
| | 为指定玩家播放给定名称的音效 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.EmitSoundOnLocationForAllies|EmitSoundOnLocationForAllies}} | |||
| | <code>void EmitSoundOnLocationForAllies(Vector Vector_1, string string_2, handle handle_3)</code> | |||
| | 从处在某个地点的某个单位处播放音效,仅对这个单位的友军有效。(vLocation, soundName, hCaster) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.EmitSoundOnLocationWithCaster|EmitSoundOnLocationWithCaster}} | |||
| | <code>void EmitSoundOnLocationWithCaster(Vector Vector_1, string string_2, handle handle_3)</code> | |||
| | 从处在某个地点的某个单位处播放音效。 (vLocation, soundName, hCaster). | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.EntIndexToHScript|EntIndexToHScript}} | |||
| | <code>handle EntIndexToHScript(int a)</code> | |||
| | 把一个实体的整数索引转化为表达该实体脚本实例的HScript | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.ExecuteOrderFromTable|ExecuteOrderFromTable}} | |||
| | <code>void ExecuteOrderFromTable(handle a)</code> | |||
| | 从一个Script表发布命令 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.ExponentialDecay|ExponentialDecay}} | |||
| | <code>float ExponentialDecay(float a, float b, float c)平</code> | |||
| | 滑的曲线,接近0时减少较慢 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.FileToString|FileToString}} | |||
| | <code>string FileToString(string a)</code> | |||
| | 从文件读取字符串给脚本,目录遍历似乎无效,字符'.','/'和'\\'被忽略,文件从C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\dota_ugc\game\dota\ems读取,函数的用途与StringToFile相反 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.FindClearSpaceForUnit|FindClearSpaceForUnit}} | |||
| | <code>void FindClearSpaceForUnit(handle a, Vector b, bool c)</code> | |||
| | 在未被占用的地方创建单位 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.FindUnitsInRadius|FindUnitsInRadius}} | |||
| | <code>table FindUnitsInRadius(int teamNumber, Vector position, handle cacheUnit, float radius, int teamFilter, int typeFilter, int flagFilter, int order, bool canGrowCache)</code> | |||
| | 在给定范围内用给定flags搜索单位( iTeamNumber, vPosition, hCacheUnit, flRadius, iTeamFilter, iTypeFilter, iFlagFilter, iOrder, bCanGrowCache ) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.FindUnitsInLine|FindUnitsInLine}} | |||
| | <code>table FindUnitsInLine(int teamNumber, Vector vStartPos, Vector vEndPos, handle cacheUnit, float width, int teamFilter, int typeFilter, int flagFilter) </code> | |||
| | 在给定的一条线上用给定flags搜索单位 ( iTeamNumber, vStartPos, vEndPos, hCacheUnit, flWidth, iTeamFilter, iTypeFilter, iFlagFilter) | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/Global.FireEntityIOInputNameOnly|FireEntityIOInputNameOnly}} | ||
| | <code>float  | | <code>void FireEntityIOInputNameOnly(ehandle a, string b)</code> | ||
| |  | | 触发实体的动作输入w/no数据 | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.FireEntityIOInputString|FireEntityIOInputString}} | |||
| | <code>void FireEntityIOInputString(ehandle a, string b, string c)</code> | |||
| | 用给定字符串(由你分配内存)触发实体的动作输入 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.FireEntityIOInputVec|FireEntityIOInputVec}} | |||
| | <code>void FireEntityIOInputVec(ehandle a, string b, Vector c)</code> | |||
| | 用给定的Vector( hEntity, szActionName, vector )触发实体的动作输入 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.FireGameEvent|FireGameEvent}} | |||
| | <code>void FireGameEvent(string eventName, handle parameterTable)</code> | |||
| | 触发一个预定义事件,可以在custom_events.txt或dota的资源/.res中找到 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.FireGameEventLocal|FireGameEventLocal}} | |||
| | <code>void FireGameEventLocal(string a, handle b)</code> | |||
| | 触发一个游戏事件但不广播给客户端 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.FrameTime|FrameTime}} | |||
| | <code>float FrameTime()</code> | |||
| | 获取上一帧在服务器上花费的时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetEntityIndexForTreeId|GetEntityIndexForTreeId}} | |||
| | <code><unknown> GetEntityIndexForTreeId(unsigned unsigned_1)</code> | |||
| | 对于指定为DOTA_UNIT_ORDER_CAST_TARGET_TREE下的entindex_target类型的树,这个方法用来获取其实体索引。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetFrameCount|GetFrameCount}} | |||
| | <code>int GetFrameCount()</code> | |||
| | 返回引擎当然的帧数 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetFrostyBoostAmount|GetFrostyBoostAmount}} | |||
| | <code>float GetFrostyBoostAmount(int a, int b)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetFrostyPointsForRound|GetFrostyPointsForRound}} | |||
| | <code>int GetFrostyPointsForRound(int a, int b, int c)</code> | |||
| | No Description Set | |||
| |-   | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetGoldFrostyBoostAmount|GetGoldFrostyBoostAmount}} | |||
| | <code>float GetGoldFrostyBoostAmount(int a, int b)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetGoldFrostyPointsForRound|GetGoldFrostyPointsForRound}} | |||
| | <code>int GetGoldFrostyPointsForRound(int a, int b, int c)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetGroundHeight|GetGroundHeight}} | |||
| | <code>float GetGroundHeight(Vector Vector_1, handle handle_2)</code> | |||
| |  | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetGroundPosition|GetGroundPosition}} | |||
| | <code>Vector GetGroundPosition(Vector a, handle b)</code> | |||
| | 返回移动到地面的供给位置。第二个参数是一个NPC,用于测量碰撞体积 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetItemCost|GetItemCost}} | |||
| | <code>int GetItemCost(string string_1)</code> | |||
| | 通过名称获取一个物品的价格。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetListenServerHost|GetListenServerHost}} | |||
| | <code>handle GetListenServerHost()</code> | |||
| | 在广播服务器获取本地玩家 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetMapName|GetMapName}} | |||
| | <code>string GetMapName()</code> | |||
| | 获取地图的名字 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetMaxOutputDelay|GetMaxOutputDelay}} | |||
| | <code>float GetMaxOutputDelay(ehandle a, string b)</code> | |||
| | 获取输出事件的最大延迟 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetPhysAngularVelocity|GetPhysAngularVelocity}} | |||
| | <code>Vector GetPhysAngularVelocity(handle a)</code> | |||
| | 获取VPHYS或普通物体的角速度 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetPhysVelocity|GetPhysVelocity}} | |||
| | <code>Vector GetPhysVelocity(handle a)</code> | |||
| | 获取VPHYS或普通物体的速度 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetSystemDate|GetSystemDate}} | |||
| | <code>string GetSystemDate()</code> | |||
| | 获取真实世界的日期 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetSystemTime|GetSystemTime}} | |||
| | <code>string GetSystemTime()</code> | |||
| | 获取真实世界的时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetTeamHeroKills|GetTeamHeroKills}} | |||
| | <code>int GetTeamHeroKills(int int_1)</code> | |||
| | ( int teamID ) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetTeamName|GetTeamName}} | |||
| | <code>string GetTeamName(int teamNumber)</code> | |||
| | Returns the team name | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetTreeIdForEntityIndex|GetTreeIdForEntityIndex}} | |||
| | <code>int GetTreeIdForEntityIndex(int int_1)</code> | |||
| | 获取已给定实体索引的树的ID | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetWorldMaxX|GetWorldMaxX}} | |||
| | <code>float GetWorldMaxX()</code> | |||
| | 获取地图X坐标最大值 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetWorldMaxY|GetWorldMaxY}} | |||
| | <code>float GetWorldMaxY()</code> | |||
| | 获取地图Y坐标最大值 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetWorldMinX|GetWorldMinX}} | |||
| | <code>float GetWorldMinX()</code> | |||
| | 获取地图X坐标最小值 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.GetWorldMinY|GetWorldMinY}} | |||
| | <code>float GetWorldMinY()</code> | |||
| | 获取地图Y坐标最小值 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.InitLogFile|InitLogFile}} | |||
| | <code>void InitLogFile(string a, string b)</code> | |||
| | 如果给定文件不存在,用给定内容创建它;如果存在则不做任何动作 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.IsClient|IsClient}} | |||
| | <code>bool IsClient()</code> | |||
| | Returns true if this is lua running from the client.dll. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.IsDedicatedServer|IsDedicatedServer}} | |||
| | <code>bool IsDedicatedServer()</code> | |||
| | 如果服务器开放返回true | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.IsMarkedForDeletion|IsMarkedForDeletion}} | |||
| | <code>bool IsMarkedForDeletion(handle a)</code> | |||
| | 如果实体有效并被标记为删除返回true | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.IsServer|IsServer}} | |||
| | <code>bool IsServer() </code> | |||
| | 当Lua代码是从Server.dll中被运行的时候,返回True。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.IsValidEntity|IsValidEntity}} | |||
| | <code>bool IsValidEntity(handle a)</code> | |||
| | 检查给定hScript是否为有效实体 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.IsInToolsMode|IsInToolsMode}} | |||
| | <code>bool IsInToolsMode() </code> | |||
| | 当此Lua脚本在Dota2创意工坊工具模式下运行时返回true。 | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/Global.LimitPathingSearchDepth|LimitPathingSearchDepth}} | ||
| | <code>Quaternion  | | <code>void LimitPathingSearchDepth(float float_1)</code> | ||
| | (''vector'','' | | 设置寻路系统的搜索范围(应该是对于深度) | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.LinkLuaModifier|LinkLuaModifier}} | |||
| | <code>void LinkLuaModifier(string modifier_name, string file_path, int motion_controller_type)</code> | |||
| | 将一个Lua定义的Modifier和与其相关的类联系起来。如果这个Modifier的定义在Vscript根目录下,那么第二个argument (file_path) 可能会被忽略。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.ListenToGameEvent|ListenToGameEvent }} | |||
| | <code>int ListenToGameEvent(string EventName, handle functionNameToCall, handle context)</code> | |||
| | 从脚本给游戏事件注册一个listner,Tip:另外,为listenstandard engine events,你也可以创建自己的事件,把它们放置在/scripts/custom_events.txt. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.LoadKeyValues|LoadKeyValues}} | |||
| | <code>table LoadKeyValues(string a)</code> | |||
| | 用给定的关键字文件创建table | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.LoadKeyValuesFromString|LoadKeyValuesFromString}} | |||
| | <code>table LoadKeyValuesFromString(string a)</code> | |||
| | 用给定的关键字string创建table | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.MakeStringToken|MakeStringToken}} | |||
| | <code>int MakeStringToken(string a)</code> | |||
| | 检查给定的hScript是否是有效实体(?) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.MinimapEvent|MinimapEvent}} | |||
| | <code>void MinimapEvent(int int_1, handle handle_2, int int_3, int int_4, int int_5, int int_6)</code> | |||
| | 设置一个小地图事件。 (nTeamID, hEntity, nXCoord, nYCoord, nEventType, nEventDuration). | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.Msg|Msg}} | |||
| | <code>void Msg(string a)</code> | |||
| | 输出信息 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.PauseGame|PauseGame}} | |||
| | <code>void PauseGame(bool a)</code> | |||
| | 暂停/开始游戏 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.PlayerInstanceFromIndex|PlayerInstanceFromIndex}} | |||
| | <code>handle PlayerInstanceFromIndex(int a)</code> | |||
| | 通过索引获取玩家的脚本实例 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.PrecacheEntityFromTable|PrecacheEntityFromTable}} | |||
| | <code>void PrecacheEntityFromTable(string a, handle b, handle c)</code> | |||
| | 用关键字从table中预缓存一个实体 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.PrecacheEntityListFromTable|PrecacheEntityListFromTable}} | |||
| | <code>void PrecacheEntityListFromTable(handle a, handle b)</code> | |||
| | 预缓存一个实体关键字列表 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.PrecacheItemByNameAsync|PrecacheItemByNameAsync}} | |||
| | <code>void PrecacheItemByNameAsync(string a, handle b)</code> | |||
| | 用DOTA物品的dota_npc_items.txt名称异步预缓存它,结束时提供回调 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.PrecacheItemByNameSync|PrecacheItemByNameSync}} | |||
| | <code>void PrecacheItemByNameSync(string a, handle b)</code> | |||
| | 用DOTA物品的dota_npc_items.txt名称预缓存它 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.PrecacheModel|PrecacheModel}} | |||
| | <code>void PrecacheModel(string a, handle b)( modelName, context ) - </code> | |||
| | 手动预缓存一个单一模型 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.PrecacheResource|PrecacheResource}} | |||
| | <code>void PrecacheResource(string precacheMode, string resource, handle context)</code> | |||
| | 手动预缓存一个单一资源 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.PrecacheUnitByNameAsync|PrecacheUnitByNameAsync}} | |||
| | <code>void PrecacheUnitByNameAsync(string a, handle b)</code> | |||
| | 用DOTA单位的dota_npc_units.txt名称异步预缓存它,结束时提供回调 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.PrecacheUnitByNameSync|PrecacheUnitByNameSync}} | |||
| | <code>void PrecacheUnitByNameSync(string a, handle b)</code> | |||
| | 用DOTA单位的dota_npc_units.txt名称预缓存它 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.PrintLinkedConsoleMessage|PrintLinkedConsoleMessage}} | |||
| | <code>void PrintLinkedConsoleMessage(string a, string b)</code> | |||
| | Print a console message with a linked console command | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.RandomFloat|RandomFloat}} | |||
| | <code>float RandomFloat(float a, float b)</code> | |||
| | 获取范围内随机float | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.RandomInt|RandomInt}} | |||
| | <code>int RandomInt(int a, int b)</code> | |||
| | 获取范围内随机int | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.RandomVector|RandomVector}} | |||
| | <code>Vector RandomVector(float maxLength)</code> | |||
| | 获取随机二维矢量 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.RegisterSpawnGroupFilterProxy|RegisterSpawnGroupFilterProxy}} | |||
| | <code>void RegisterSpawnGroupFilterProxy(string a)</code> | |||
| | 为一个脚本基础的生成单位过滤器创建一个C代理 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.ReloadMOTD|ReloadMOTD}} | |||
| | <code>void ReloadMOTD()</code> | |||
| | 重载MotD文件 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.RemoveSpawnGroupFilterProxy|RemoveSpawnGroupFilterProxy}} | |||
| | <code>void RemoveSpawnGroupFilterProxy(string a)</code> | |||
| | 为一个脚本基础的生成单位过滤器删除一个C代理 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.ResolveNPCPositions|ResolveNPCPositions}} | |||
| | <code>void ResolveNPCPositions(Vector Vector_1, float float_2)</code> | |||
| | Check and fix units that have been assigned a position inside collision radius of other NPCs. 检查并固定一个被分配到其他NPC的碰撞半径内的某位置的单位。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.RollPercentage|RollPercentage}} | |||
| | <code>bool RollPercentage(int a)</code> | |||
| | 随机生成1-100内的数,小于等于给定数则返回true | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.RotateOrientation|RotateOrientation}} | |||
| | <code>QAngle RotateOrientation(QAngle a, QAngle b)</code> | |||
| | 旋转一个QAngle,用另一个QAngle | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.RotateQuaternionByAxisAngle|RotateQuaternionByAxisAngle}} | |||
| | <code>Quaternion RotateQuaternionByAxisAngle(Quaternion a, Vector b, float c)</code> | |||
| | 围绕给定vector轴线旋转一个四元数 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.RotationDelta|RotationDelta}} | |||
| | <code>QAngle RotationDelta(QAngle a, QAngle b)</code> | |||
| | 两个QAngle间的delta值 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.rr_AddDecisionRule|rr_AddDecisionRule}} | |||
| | <code>bool rr_AddDecisionRule(handle a)</code> | |||
| | 给决定数据库增加一个规则 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.rr_CommitAIResponse|rr_CommitAIResponse}} | |||
| | <code>bool rr_CommitAIResponse(handle a, handle b)</code> | |||
| | 把QueryBestResponse的结果交付给定的实体播放,用参数调用(entity, airesponse) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.rr_GetResponseTargets|rr_GetResponseTargets}} | |||
| | <code>handle rr_GetResponseTargets()</code> | |||
| | 获取所有提供的表达者目标的table,格式为{ name : handle, name: handle }. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.rr_QueryBestResponse|rr_QueryBestResponse}} | |||
| | <code>bool rr_QueryBestResponse(handle a, handle b, handle c)</code> | |||
| | 参数: ( hEnt, hQuery, hResult ) // 静态 : 对实体的回复系统测试 'query'并返回最佳回复(无回复返回nil) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.Say|Say}} | |||
| | <code>void Say(handle entity, string message, bool teamOnly)</code> | |||
| | 让实体说string,是否仅限队友可见 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.ScreenShake|ScreenShake}} | |||
| | <code>void ScreenShake(Vector a, float b, float c, float d, float e, int f, bool g)</code> | |||
| | 用下列参数开始镜头摇晃:vecCenter, flAmplitude, flFrequency, flDuration, flRadius, eCommand( SHAKE_START = 0, SHAKE_STOP = 1 ), bAirShake | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.SendFrostivusTimeElapsedToGC|SendFrostivusTimeElapsedToGC}} | |||
| | <code>void SendFrostivusTimeElapsedToGC()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.SendFrostyPointsMessageToGC|SendFrostyPointsMessageToGC}} | |||
| | <code>void SendFrostyPointsMessageToGC(handle a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.SendOverheadEventMessage|SendOverheadEventMessage}} | |||
| | <code>void SendOverheadEventMessage(handle handle_1, int int_2, handle handle_3, int int_4, handle handle_5)</code> | |||
| | ( DOTAPlayer sendToPlayer, int iMessageType, Entity targetEntity, int iValue, DOTAPlayer sourcePlayer ) - sendToPlayer和sourcePlayer 允许为nil。 - iMessageType是OVERHEAD_ALERT_分类中的一个。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.SendToConsole|SendToConsole}} | |||
| | <code>void SendToConsole(string a)</code> | |||
| | 给控制台发送string作为客户端命令 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.SendToServerConsole|SendToServerConsole}} | |||
| | <code>void SendToServerConsole(string a)</code> | |||
| | 给控制台发送string作为服务器命令 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.SetOpvarFloatAll|SetOpvarFloatAll}} | |||
| | <code>void SetOpvarFloatAll(string a, string b, string c, float d)</code> | |||
| | 为所有玩家设置opvar值 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.SetOpvarFloatPlayer|SetOpvarFloatPlayer}} | |||
| | <code>void SetOpvarFloatPlayer(string a, string b, string c, float d, handle e)</code> | |||
| | 为单一玩家设置opvar值( szStackName, szOperatorName, szOpvarName, flOpvarValue, hEnt ) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.SetQuestName|SetQuestName}} | |||
| | <code>void SetQuestName(string a)</code> | |||
| | 设置当前任务名 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.SetQuestPhase|SetQuestPhase}} | |||
| | <code>void SetQuestPhase(int a)</code> | |||
| | 设置当前任务阶段 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.SetRenderingEnabled|SetRenderingEnabled}} | |||
| | <code>void SetRenderingEnabled(ehandle a, bool b)</code> | |||
| | 为ehandle设置rendering(渲染)开/关 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.SetTeamCustomHealthbarColor|SetTeamCustomHealthbarColor}} | |||
| | <code>void SetTeamCustomHealthbarColor(int int_1, int int_2, int int_3, int int_4)</code> | |||
| | ( teamNumber, r, g, b ) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.ShowCustomHeaderMessage|ShowCustomHeaderMessage}} | |||
| | <code>void ShowCustomHeaderMessage(string message, int player, int value, float time)</code> | |||
| | Displays a header message from player | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.ShowGenericPopup|ShowGenericPopup}} | |||
| | <code>void ShowGenericPopup(string title, string content, string unknown, string unknown, int containerType)</code> | |||
| | 对所有玩家显示通用的弹出窗口 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.ShowGenericPopupToPlayer|ShowGenericPopupToPlayer}} | |||
| | <code>void ShowGenericPopupToPlayer(handle a, string b, string c, string d, string e, int f)</code> | |||
| | 对给定玩家显示通用的弹出窗口 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.ShowMessage|ShowMessage}} | |||
| | <code>oid ShowMessage(string a)</code> | |||
| | 在所有客户端显示hud信息 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.SpawnEntityFromTableSynchronous|SpawnEntityFromTableSynchronous}} | |||
| | <code>handle SpawnEntityFromTableSynchronous(string a, handle b)</code> | |||
| | 从table同步生成一个实体 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.SpawnEntityGroupFromTable|SpawnEntityGroupFromTable}} | |||
| | <code>bool SpawnEntityGroupFromTable(handle groupSpawnTables, bool bAsync, handle hCallback)</code> | |||
| | 从一系列生成表中分级生成一个实体组 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.SpawnEntityListFromTableAsynchronous|SpawnEntityListFromTableAsynchronous}} | |||
| | <code>int SpawnEntityListFromTableAsynchronous(handle a, handle b)</code> | |||
| | 从一个生成表列表异步生成一个实体组,生成完成后会触发一次回调 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.SpawnEntityListFromTableSynchronous|SpawnEntityListFromTableSynchronous}} | |||
| | <code>handle SpawnEntityListFromTableSynchronous(handle a)</code> | |||
| | 从一个生成表列表同步生成一个实体组. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.SplineQuaternions|SplineQuaternions}} | |||
| | <code>Quaternion SplineQuaternions(Quaternion a, Quaternion b, float c)</code> | |||
| | (quaternion,quaternion,float)非常基础的v0到v1差值,t属于[0,1]为参数 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.SplineVectors|SplineVectors}} | |||
| | <code>Vector SplineVectors(Vector a, Vector b, float c)</code> | |||
| | (vector,vector,float)非常基础的v0到v1差值,t属于[0,1]为参数 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.StartSoundEvent|StartSoundEvent}} | |||
| | <code>void StartSoundEvent(string a, handle b)</code> | |||
| | 开始音效事件 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.StartSoundEventFromPosition|StartSoundEventFromPosition}} | |||
| | <code>void StartSoundEventFromPosition(string string_1, Vector Vector_2)</code> | |||
| | 在某个位置开始音效事件。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.StartSoundEventFromPositionReliable|StartSoundEventFromPositionReliable}} | |||
| | <code>void StartSoundEventFromPositionReliable(string string_1, Vector Vector_2) </code> | |||
| | 通过可靠的传递,在某个位置开始音效事件。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.StartSoundEventFromPositionUnreliable|StartSoundEventFromPositionUnreliable}} | |||
| | <code>void StartSoundEventFromPositionUnreliable(string string_1, Vector Vector_2)</code> | |||
| | 通过随意的传递,在某个位置开始音效事件。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.StartSoundEventReliable|StartSoundEventReliable}} | |||
| | <code>void StartSoundEventReliable(string string_1, handle handle_2)</code> | |||
| | 通过可靠的传递,开始音效事件。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.StartSoundEventUnreliable|StartSoundEventUnreliable}} | |||
| | <code>void StartSoundEventUnreliable(string string_1, handle handle_2)</code> | |||
| | 通过随意的传递,开始音效事件。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.StopEffect|StopEffect}} | |||
| | <code>void StopEffect(handle a, string b)</code> | |||
| | (hEntity, szEffectName) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.StopListeningToAllGameEvents|StopListeningToAllGameEvents}} | |||
| | <code>void StopListeningToAllGameEvents(handle a)</code> | |||
| | 停止listen在给定内容内的所有游戏事件 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.StopListeningToGameEvent|StopListeningToGameEvent}} | |||
| | <code>bool StopListeningToGameEvent(int a)</code> | |||
| | 停止listen特定的游戏事件 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.StopSoundEvent|StopSoundEvent}} | |||
| | <code>void StopSoundEvent(string a, handle b)</code> | |||
| | 停止音效事件 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.StopSoundOn|StopSoundOn}} | |||
| | <code>void StopSoundOn(string soundName, handle playingEntity)</code> | |||
| | 停止实体上的命名音效 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.StringToFile|StringToFile}} | |||
| | <code>bool StringToFile(string a, string b) </code> | |||
| | 目录遍历似乎无效,字符'.','/'和'\\'被忽略,文件名不能为空,也不能包含忽略字符,否则函数无效并返回false,一次只能保存一个字符串,每次调用文件都被覆盖,文件以一个NUL字符结尾,文件被保存在C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\dota_ugc\game\dota\ems,函数用途与FileToString相反 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.Time|Time}} | |||
| | <code>float Time()</code> | |||
| | 获取当前服务器时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.TraceCollideable|TraceCollideable}} | |||
| | <code>bool TraceCollideable(handle a)</code> | |||
| | 传递table - 输入: start, end, ent, (可选 mins, maxs) -- 输出: pos, fraction, hit, startsolid, normal | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.TraceHull|TraceHull}} | |||
| | <code>bool TraceHull(handle a)</code> | |||
| | 传递table - 输入: start, end, min, max, mask, ignore -- 输出: pos, fraction, hit, enthit, startsolid | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.TraceLine|TraceLine}} | |||
| | <code>bool TraceLine(handle a)</code> | |||
| | 传递table - 输入: startpos, endpos, mask, ignore -- 输出: pos, fraction, hit, enthit, startsolid | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.UnitFilter|UnitFilter}} | |||
| | <code>int UnitFilter(handle handle_1, int int_2, int int_3, int int_4, int int_5)</code> | |||
| | 当一个单位通过一系列过滤器时进行检查。 (hNPC, nTargetTeam, nTargetType, nTargetFlags, nTeam | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.UnloadSpawnGroup|UnloadSpawnGroup}} | |||
| | <code>void UnloadSpawnGroup(string a)</code> | |||
| | 通过名称去除生成组 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.UnloadSpawnGroupByHandle|UnloadSpawnGroupByHandle}} | |||
| | <code>void UnloadSpawnGroupByHandle(int a)</code> | |||
| | 通过handle去除生成组 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.UpdateEventPoints|UpdateEventPoints}} | |||
| | <code>void UpdateEventPoints(handle a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.UTIL_MessageText|UTIL_MessageText}} | |||
| | <code>void UTIL_MessageText(int playerId, string message, int r, int g, int b, int a)</code> | |||
| | 对特定的玩家显示信息。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.UTIL_MessageText_WithContext|UTIL_MessageText_WithContext}} | |||
| | <code>void UTIL_MessageText_WithContext(int playerId, string message, int r, int g, int b, int a, table context)</code> | |||
| | Sends a message to a specific player in the message box with a context table | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.UTIL_MessageTextAll|UTIL_MessageTextAll}} | |||
| | <code>void UTIL_MessageTextAll(string message, int r, int g, int b, int a)</code> | |||
| | 在文本框内对所有玩家显示信息。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.UTIL_MessageTextAll_WithContext|UTIL_MessageTextAll_WithContext}} | |||
| | <code>void UTIL_MessageTextAll_WithContext(string message, int r, int g, int b, int a, table context)</code> | |||
| | Sends a message to everyone in the message box with a context table | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.UTIL_Remove|UTIL_Remove}} | |||
| | <code>void UTIL_Remove(handle a)</code> | |||
| | 删除给定实体 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.UTIL_RemoveImmediate|UTIL_RemoveImmediate}} | |||
| | <code>void UTIL_RemoveImmediate(handle a)</code> | |||
| | 立即删除给定实体 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.UTIL_ResetMessageText|UTIL_ResetMessageText}} | |||
| | <code>void UTIL_ResetMessageText(int playerId)</code> | |||
| | 对某个玩家重新设置信息文本。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.UTIL_ResetMessageTextAll|UTIL_ResetMessageTextAll}} | |||
| | <code>void UTIL_ResetMessageTextAll()</code> | |||
| | 对所有玩家重新设置信息文本。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/Global.VectorToAngles|VectorToAngles}} | |||
| | <code>QAngle VectorToAngles(Vector a)</code> | |||
| | 为Vector获取Qangle(没有滚动) | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/Global.Warning|Warning}} | ||
| |  | |||
| | <code>void Warning(string a) </code> | |||
| | 输出警告 | |||
| |} | |||
| === CBaseEntity === | |||
| ''The base class for stuff'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.ApplyAbsVelocityImpulse|ApplyAbsVelocityImpulse}} | ||
| |  | |||
| | <code>void ApplyAbsVelocityImpulse(Vector a) </code> | |||
| | 添加一个速度冲击 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.ApplyLocalAngularVelocityImpulse|ApplyLocalAngularVelocityImpulse}} | ||
| |  | |||
| | <code>void ApplyLocalAngularVelocityImpulse(Vector a) </code> | |||
| | 添加一个角速度的冲击 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.EmitSound|EmitSound}} | ||
| |  | |||
| | <code>void EmitSound(string soundName) </code> | |||
| |   | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.EmitSoundParams|EmitSoundParams}} | ||
| |  | |||
| | <code>void EmitSoundParams(string soundName, int pitch, float volume, float soundTime) </code> | |||
| | 播放/修改这个实体的声音.当音调,音量或播放时间大于零时改变声音 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.EyeAngles|EyeAngles}} | ||
| |  | |||
| | <code>QAngle EyeAngles() </code> | |||
| | 获得这个实体的视角qangles | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.EyePosition|EyePosition}} | ||
| |  | |||
| | <code>Vector EyePosition() </code> | |||
| | 获得指向视角位置的矢量,位置为绝对坐标 | |||
| |- | |- | ||
| |  | |||
| | <code>handle  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.FirstMoveChild|FirstMoveChild}} | ||
| |  | |||
| | <code>handle FirstMoveChild() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GatherCriteria|GatherCriteria}} | ||
| |  | |||
| | <code>void GatherCriteria(handle a) </code> | |||
| | 返回一个表包含用在这个实体的判定的标准.这个表等同于传入脚本方法的调用. | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetAbsOrigin|GetAbsOrigin}} | ||
| |  | |||
| | <code>Vector GetAbsOrigin() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetAngles|GetAngles}} | ||
| |  | |||
| | <code>QAngle GetAngles() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetAnglesAsVector|GetAnglesAsVector}} | ||
| |  | |||
| | <code>Vector GetAnglesAsVector() </code> | |||
| | 获得实体的颠簸,偏航,摇晃的矢量 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetAngularVelocity|GetAngularVelocity}} | ||
| |  | |||
| | <code>Vector GetAngularVelocity() </code> | |||
| | 获得当前角速度,返回颠簸,偏航,摇晃的矢量 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetBaseVelocity|GetBaseVelocity}} | ||
| |  | |||
| | <code>Vector GetBaseVelocity() </code> | |||
| | 获得基础速度 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetBoundingMaxs|GetBoundingMaxs}} | ||
| |  | |||
| | <code>Vector GetBoundingMaxs() </code> | |||
| | 获得一个包含最大范围,以物体为中心的矢量 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetBoundingMins|GetBoundingMins}} | ||
| |  | |||
| | <code>Vector GetBoundingMins() </code> | |||
| | 获得一个包含最小范围,以物体为中心的矢量 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetBounds|GetBounds}} | ||
| |  | |||
| | <code>table GetBounds() </code> | |||
| | 获得一个以物体为中心,包含“Mins”和“Maxs”矢量的表 | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetCenter|GetCenter}} | |||
| |  | |||
| | | | <code>Vector GetCenter() </code> | ||
| | <code> | | 获得指向物体中心的矢量,以绝对坐标的形式 | ||
| |  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetChildren|GetChildren}} | ||
| |  | |||
| | <code>handle GetChildren() </code> | |||
| | 获得继承这个实体的实体 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetContext|GetContext}} | ||
| |  | |||
| | <code>table GetContext(string a) </code> | |||
| | GetContext( name ):检查一个对象的状态然后返回对象是否可用.可能返回string,float,或nil(如果对象没有找到) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetForwardVector|GetForwardVector}} | ||
| |  | |||
| | <code>Vector GetForwardVector() </code> | |||
| | 获得这个实体的前进矢量 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetHealth|GetHealth}} | ||
| |  | |||
| | <code>int GetHealth() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetLocalAngularVelocity|GetLocalAngularVelocity}} | ||
| |  | |||
| | <code>QAngle GetLocalAngularVelocity() </code> | |||
| | 可能为当前角速度 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetLocalVelocity|GetLocalVelocity}} | ||
| |  | |||
| | <code>Vector GetLocalVelocity() </code> | |||
| | 获得实体相对速度 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetMaxHealth|GetMaxHealth}} | ||
| |  | |||
| | <code>int GetMaxHealth() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>string  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetModelName|GetModelName}} | ||
| |  | |||
| | <code>string GetModelName() </code> | |||
| | 获得模型的名字 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetMoveParent|GetMoveParent}} | ||
| |  | |||
| | <code>handle GetMoveParent() </code> | |||
| | 如果在有继承对象,恢复实体所继承的对象 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetOrigin|GetOrigin}} | ||
| |  | |||
| | <code>Vector GetOrigin() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetOwner|GetOwner}} | ||
| |  | |||
| | <code>handle GetOwner() </code> | |||
| | 获得实体的所有者 | |||
| |- | |- | ||
| |  | |||
| | <code>handle  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetOwnerEntity|GetOwnerEntity}} | ||
| |  | |||
| | <code>handle GetOwnerEntity() </code> | |||
| | 获得拥有者的实体,如果有的话 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetRightVector|GetRightVector}} | ||
| |  | |||
| | <code>Vector GetRightVector() </code> | |||
| | 获得实体的右方矢量 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetRootMoveParent|GetRootMoveParent}} | ||
| |  | |||
| | <code>handle GetRootMoveParent() </code> | |||
| | 如果在继承关系里,在继承关系中寻找所继承的根源对象 | |||
| |- | |- | ||
| |  | |||
| | <code>string  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetSoundDuration|GetSoundDuration}} | ||
| |  | |||
| | <code>float GetSoundDuration(string soundName, string actormodelname) </code> | |||
| | 返回声音的播放时间.传入声音名字和可选的应用模型名字. | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetTeam|GetTeam}} | ||
| |  | |||
| | <code>int GetTeam() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetUpVector|GetUpVector}} | |||
| |  | |||
| | <code>Vector GetUpVector() </code> | |||
| |  | |||
| | <code> | | 获得实体的上方矢量 | ||
| |  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.GetVelocity|GetVelocity}} | ||
| |  | |||
| | <code>Vector GetVelocity() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.IsAlive|IsAlive}} | ||
| |  | |||
| | <code>bool IsAlive() </code> | |||
| | No Description Set. | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.IsPlayer|IsPlayer}} | ||
| |  | |||
| | <code>bool IsPlayer() </code> | |||
| | 是否为玩家的实体 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.IsNull|IsNull}} | ||
| |  | | <code>bool IsNull() </code> | ||
| | 检查实体是否被C++删除了。 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.Kill|Kill}} | ||
| |  | |||
| | <code>void Kill() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.NextMovePeer|NextMovePeer}} | ||
| |  | |||
| | <code>handle NextMovePeer() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>float  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.OverrideFriction|OverrideFriction}} | ||
| |  | |||
| | <code>void OverrideFriction(float a, float b) </code> | |||
| | 暂时重设阻力的持续时间和值 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.PrecacheScriptSound|PrecacheScriptSound}} | ||
| |  | |||
| | <code>void PrecacheScriptSound(string a) </code> | |||
| | 预载声音文件 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetAbsOrigin|SetAbsOrigin}} | ||
| |  | |||
| | <code>void SetAbsOrigin(Vector origin) </code> | |||
| | 设置绝对来源 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetAngles|SetAngles}} | ||
| |  | |||
| | <code>void SetAngles(float pitch, float yaw, float roll) </code> | |||
| | 设置实体的颠簸,偏航,摇晃 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetAngularVelocity|SetAngularVelocity}} | ||
| |  | |||
| | <code>void SetAngularVelocity(float pitch, float yaw, float roll) </code> | |||
| | 设置当前角速度,使用实数颠簸,偏航,摇晃速度 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetContext|SetContext}} | ||
| |  | |||
| | <code>void SetContext(string a, string b, float c) </code> | |||
| | SetContext( 名字 , 值, 持续时间 ):存储任何在实体对话内容里的配对值.值是一个字符串.持续一段时间.(0代表永久) | |||
| |- | |- | ||
| |  | |||
| | <code>string  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetContextNum|SetContextNum}} | ||
| |  | |||
| | <code>void SetContextNum(string a, float b, float c) </code> | |||
| | SetContext( 名字 , 值, 持续时间 ):存储任何在实体对话内容里的配对值.值是一个数字(int或者float).持续一段时间.(0代表永久) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetContextThink|SetContextThink}} | ||
| |  | |||
| | <code>void SetContextThink(string a, handle b, float c) </code> | |||
| | 在这个实体上设置一个计时器( a:标示字符,b:执行函数 c:延迟执行的时间 ) | |||
| |- | |- | ||
| |  | |||
| | <code>Vector  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetForwardVector|SetForwardVector}} | ||
| |  | |||
| | <code>void SetForwardVector(Vector forwardVec) </code> | |||
| | 设置实体的方向为前进矢量 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetFriction|SetFriction}} | ||
| |  | |||
| | <code>void SetFriction(float a) </code> | |||
| | 设置玩家阻力,无视物体 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetGravity|SetGravity}} | ||
| |  | |||
| | <code>void SetGravity(float a) </code> | |||
| | 设置玩家引力,无视物体 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetHealth|SetHealth}} | ||
| |  | |||
| | <code>void SetHealth(int hp) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetMaxHealth|SetMaxHealth}} | ||
| |  | |||
| | <code>void SetMaxHealth(int maxHP) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetModel|SetModel}} | ||
| |  | |||
| | <code>void SetModel(string modelName) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetOrigin|SetOrigin}} | ||
| |  | |||
| | <code>void SetOrigin(Vector origin) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetOwner|SetOwner}} | ||
| |  | |||
| | <code>void SetOwner(handle owningEntity) </code> | |||
| | 设定实体的所有者 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetParent|SetParent}} | ||
| |  | |||
| | <code>void SetParent(handle a, string b) </code> | |||
| | 设定这个实体的所继承的父实体 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetRenderColor|SetRenderColor}} | ||
| |  | |||
| | <code>void SetRenderColor(int a, int b, int c) </code> | |||
| | SetRenderColor( r, g, b ):设定实体的渲染颜色 | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetSize|SetSize}} | ||
| | | | <code>void SetSize(Vector a, Vector b) </code> | ||
| | No Description Set | |||
| | <code> | |||
| |  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetTeam|SetTeam}} | ||
| |  | |||
| | <code>void SetTeam(int team) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.SetVelocity|SetVelocity}} | ||
| |  | |||
| | <code>void SetVelocity(Vector a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.StopSound|StopSound}} | ||
| |  | |||
| | <code>void StopSound(string soundName) </code> | |||
| | 停止播放这个实体的特定的声音 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseEntity.Trigger|Trigger}} | ||
| |  | |||
| | <code>void Trigger() </code> | |||
| | 触发这个实体的触发器 | |||
| |} | |||
| === CEntities === | |||
| ''No Description Set'' | |||
| ''Global accessor variable:'' <code>Entities</code> | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.CreateByClassname|CreateByClassname}} | ||
| |  | |||
| | <code>handle CreateByClassname(string className) </code> | |||
| | 用类名来创建一个实体 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.FindAllByClassname|FindAllByClassname}} | ||
| |  | |||
| | <code>table FindAllByClassname(string a) </code> | |||
| | 通过类名来寻找所有实体.返回被找到实体的数组或表. | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.FindAllByClassnameWithin|FindAllByClassnameWithin}} | ||
| |  | |||
| | <code>table FindAllByClassnameWithin(string a, Vector b, float c) </code> | |||
| | 在一个半径范围内通过类名寻找实体. | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.FindAllByModel|FindAllByModel}} | ||
| |  | |||
| | <code>table FindAllByModel(string modelName) </code> | |||
| | 通过模型名字来找到对象. | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.FindAllByName|FindAllByName}} | ||
| |  | |||
| | <code>table FindAllByName(string name) </code> | |||
| | 通过名字来寻找所有实体.返回被找到实体的数组或表. | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.FindAllByNameWithin|FindAllByNameWithin}} | ||
| |  | |||
| | <code>table FindAllByNameWithin(string name, Vector origin, float maxRadius) </code> | |||
| | 在半径范围内通过名字来寻找实体. | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.FindAllByTarget|FindAllByTarget}} | ||
| |  | |||
| | <code>table FindAllByTarget(string targetName) </code> | |||
| | 通过目标名字来寻找实体 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.FindAllInSphere|FindAllInSphere}} | ||
| |  | |||
| | <code>table FindAllInSphere(Vector origin, float maxRadius) </code> | |||
| | 在(球形)范围内寻找实体 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.FindByClassname|FindByClassname}} | ||
| |  | |||
| | <code>handle FindByClassname(handle startFrom, string className) </code> | |||
| | 通过类名寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.FindByClassnameNearest|FindByClassnameNearest}} | ||
| |  | |||
| | <code>handle FindByClassnameNearest(string className, Vector origin, float maxRadius) </code> | |||
| | 在最近一个点通过类名寻找实体 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.FindByClassnameWithin|FindByClassnameWithin}} | ||
| |  | |||
| | <code>handle FindByClassnameWithin(handle startFrom, string className, Vector origin, float maxRadius) </code> | |||
| | 在半径范围内通过类名寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.FindByModel|FindByModel}} | ||
| |  | |||
| | <code>handle FindByModel(handle startFrom, string modelName) </code> | |||
| | 通过模型名字寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.FindByModelWithin|FindByModelWithin}} | ||
| |  | |||
| | <code>handle FindByModelWithin(handle startFrom, string modelName, Vector origin, float maxRadius) </code> | |||
| | 在半径范围内通过模型名字寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.FindByName|FindByName}} | ||
| |  | |||
| | <code>handle FindByName(handle lastEnt, string searchString) </code> | |||
| | 通过名字寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.FindByNameNearest|FindByNameNearest}} | ||
| |  | |||
| | <code>handle FindByNameNearest(string name, Vector origin, float maxRadius) </code> | |||
| | 通过名字寻找最近原点的实体 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.FindByNameWithin|FindByNameWithin}} | ||
| |  | |||
| | <code>handle FindByNameWithin(handle startFrom, string name, Vector origin, float maxRadius) </code> | |||
| | 在半径范围内通过名字寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.FindByTarget|FindByTarget}} | ||
| |  | |||
| | <code>handle FindByTarget(handle startFrom, string targetName) </code> | |||
| | 通过目标名字寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.FindInSphere|FindInSphere}} | ||
| |  | |||
| | <code>handle FindInSphere(handle startFrom, Vector origin, float maxRadius) </code> | |||
| | 在半径范围内寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.First|First}} | ||
| |  | |||
| | <code>handle First() </code> | |||
| | 在实体数组或表中开始一个迭代程序 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntities.Next|Next}} | ||
| |  | |||
| | <code>handle Next(handle startFrom) </code> | |||
| | 从指定列表中的实体开始迭代 | |||
| |} | |||
| === CEntityInstance === | |||
| :::::extends [[#CBaseEntity| CBaseEntity]] | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.ConnectOutput|ConnectOutput}} | ||
| |  | |||
| | <code>void ConnectOutput(string a, string b) </code> | |||
| | 添加一个I/O链接,这可以当特定输出触发时,在这个实体调用方法 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.Destroy|Destroy}} | ||
| |  | |||
| | <code>void Destroy() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.DisconnectOutput|DisconnectOutput}} | |||
| | | | <code>void DisconnectOutput(string a, string b) </code> | ||
| |  | |||
| | <code> | | 从这个实体的I/O事件移除已连接的脚本方法 | ||
| |  | |||
| |- | |- | ||
| |  | |||
| | <code>handle  | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.DisconnectRedirectedOutput|DisconnectRedirectedOutput}} | ||
| |  | |||
| | <code>void DisconnectRedirectedOutput(string a, string b, handle c) </code> | |||
| | 从传入实体的I/O事件移除已连接的脚本方法 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.entindex|entindex}} | ||
| |  | |||
| | <code>int entindex() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.FireOutput|FireOutput}} | ||
| |  | |||
| | <code>void FireOutput(string outputName, handle activator, handle caller, table args, float delay) </code> | |||
| | 触发实体的输出 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.GetClassname|GetClassname}} | ||
| |  | |||
| | <code>string GetClassname() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.GetDebugName|GetDebugName}} | ||
| |  | |||
| | <code>string GetDebugName() </code> | |||
| | 如果没有定义的话获得实体名字的帮助 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.GetEntityHandle|GetEntityHandle}} | ||
| |  | |||
| | <code>ehandle GetEntityHandle() </code> | |||
| | 获得这个实体的EHANDLE | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.GetEntityIndex|GetEntityIndex}} | ||
| |  | |||
| | <code>int GetEntityIndex() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.GetIntAttr|GetIntAttr}} | ||
| |  | |||
| | <code>int GetIntAttr(string a) </code> | |||
| | 获得整型属性 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.GetName|GetName}} | ||
| |  | |||
| | <code>string GetName() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.GetOrCreatePrivateScriptScope|GetOrCreatePrivateScriptScope}} | ||
| |  | |||
| | <code>handle GetOrCreatePrivateScriptScope() </code> | |||
| | 恢复实体相关的每个实例私有的脚本数据,必要时会创建 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.GetOrCreatePublicScriptScope|GetOrCreatePublicScriptScope}} | ||
| |  | |||
| | <code>handle GetOrCreatePublicScriptScope() </code> | |||
| | 恢复实体相关的公用脚本数据,必要时会创建 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.GetPrivateScriptScope|GetPrivateScriptScope}} | ||
| |  | |||
| | <code>handle GetPrivateScriptScope() </code> | |||
| | 恢复实体相关的每个实例私有的脚本数据 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.GetPublicScriptScope|GetPublicScriptScope}} | ||
| |  | |||
| | <code>handle GetPublicScriptScope() </code> | |||
| | 恢复实体相关的公用脚本数据 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.RedirectOutput|RedirectOutput}} | ||
| |   | |||
| | <code>void RedirectOutput(string a, string b, handle c) </code> | |||
| | 添加一个I/O链接,这可以当特定输出触发时,在这个实体调用方法 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.RemoveSelf|RemoveSelf}} | ||
| |  | |||
| | <code>void RemoveSelf() </code> | |||
| | 删除这个实体 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CEntityInstance.SetIntAttr|SetIntAttr}} | ||
| |  | |||
| | | | <code>void SetIntAttr(string a, int b) </code> | ||
| | 设置整型属性 | |||
| |} | |||
| |- | |||
| === CDOTABaseAbility === | |||
| :::::extends [[#CBaseEntity| CBaseEntity]] | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.CastAbility|CastAbility}} | ||
| |  | |||
| | <code>void CastAbility() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.ContinueCasting|ContinueCasting}} | ||
| |  | |||
| | <code>bool ContinueCasting() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.CreateVisibilityNode|CreateVisibilityNode}} | ||
| |  | |||
| | <code>void CreateVisibilityNode(Vector a, float b, float c) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.DecrementModifierRefCount|DecrementModifierRefCount}} | ||
| | | | <code>void DecrementModifierRefCount() </code> | ||
| | <code>void  | | No Description Set | ||
| |  | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.EndChannel|EndChannel}} | ||
| |  | |||
| | <code>void EndChannel(bool a) </code> | |||
| | 参数: bool bInterrupted | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.EndCooldown|EndCooldown}} | ||
| |  | |||
| | <code>void EndCooldown() </code> | |||
| | 刷新这个技能 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetAbilityDamage|GetAbilityDamage}} | ||
| |  | |||
| | <code>int GetAbilityDamage() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetAbilityDamageType|GetAbilityDamageType}} | ||
| |  | |||
| | <code>int GetAbilityDamageType() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetAbilityIndex|GetAbilityIndex}} | ||
| |  | |||
| | <code>int GetAbilityIndex() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetAbilityName|GetAbilityName}} | ||
| |  | |||
| | <code>string GetAbilityName() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetAbilityKeyValues|GetAbilityKeyValues}} | ||
| |  | | <code>table GetAbilityKeyValues() </code> | ||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetAbilityTargetFlags|GetAbilityTargetFlags}} | ||
| | | | <code>int GetAbilityTargetFlags() </code> | ||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetAbilityTargetTeam|GetAbilityTargetTeam}} | ||
| |  | |||
| | <code>int GetAbilityTargetTeam() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetAbilityTargetType|GetAbilityTargetType}} | ||
| |  | |||
| | <code>int GetAbilityTargetType() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetAbilityType|GetAbilityType}} | ||
| |  | |||
| | <code>int GetAbilityType() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetAnimationIgnoresModelScale|GetAnimationIgnoresModelScale}} | ||
| |  | |||
| | <code>bool GetAnimationIgnoresModelScale() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetAssociatedPrimaryAbilities|GetAssociatedPrimaryAbilities}} | ||
| |  | |||
| | <code>string GetAssociatedPrimaryAbilities() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetAssociatedSecondaryAbilities|GetAssociatedSecondaryAbilities}} | |||
| | <code>string GetAssociatedSecondaryAbilities() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetAutoCastState|GetAutoCastState}} | ||
| |  | |||
| | <code>bool GetAutoCastState() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetBackswingTime|GetBackswingTime}} | ||
| |  | |||
| | <code>float GetBackswingTime() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetBehavior|GetBehavior}} | ||
| |  | |||
| | <code>int GetBehavior() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetCaster|GetCaster}} | ||
| |  | |||
| | <code>handle GetCaster() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetCastPoint|GetCastPoint}} | ||
| |  | |||
| | <code>float GetCastPoint() </code> | |||
| | Returns the cast point of this ability. | |||
| |- | |- | ||
| |  | |||
| | <code>Vector  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetCastRange|GetCastRange}} | ||
| |  | |||
| | <code>int GetCastRange(Vector vLocation, handle hTarget) </code> | |||
| | Returns the cast range of this ability. | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetChannelledManaCostPerSecond|GetChannelledManaCostPerSecond}} | ||
| |  | |||
| | <code>int GetChannelledManaCostPerSecond(int a) </code> | |||
| | Returns the channeled mana cost per second of this ability if it's a channeling ability. | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetChannelStartTime|GetChannelStartTime}} | ||
| |  | |||
| | <code>float GetChannelStartTime() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetChannelTime|GetChannelTime}} | ||
| |  | |||
| | <code>float GetChannelTime() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetCloneSource|GetCloneSource}} | ||
| |  | |||
| | <code>handle GetCloneSource() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetConceptRecipientType|GetConceptRecipientType}} | ||
| |  | |||
| | <code>int GetConceptRecipientType() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetCooldown|GetCooldown}} | ||
| |  | |||
| | <code>float GetCooldown(int a) </code> | |||
| | 获得技能在给出的等级设定上的冷却时间,而不是目前的剩余的冷却时间 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetCooldownTime|GetCooldownTime}} | ||
| |  | |||
| | <code>float GetCooldownTime() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetCooldownTimeRemaining|GetCooldownTimeRemaining}} | ||
| |  | |||
| | <code>float GetCooldownTimeRemaining() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>Vector  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetCursorPosition|GetCursorPosition}} | ||
| |  | |||
| | <code>Vector GetCursorPosition() </code> | |||
| | Returns the target point vector from the last cast of this point-targeting ability . | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetCursorTarget|GetCursorTarget}} | ||
| |  | |||
| | <code>handle GetCursorTarget() </code> | |||
| | Returns the target unit from the last cast of this unit-targeting ability. | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetCursorTargetingNothing|GetCursorTargetingNothing}} | ||
| |  | |||
| | <code>bool GetCursorTargetingNothing() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetDuration|GetDuration}} | ||
| |  | |||
| | <code>float GetDuration() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetGoldCost|GetGoldCost}} | ||
| |  | |||
| | <code>int GetGoldCost(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetGoldCostForUpgrade|GetGoldCostForUpgrade}} | ||
| |  | |||
| | <code>int GetGoldCostForUpgrade(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetHeroLevelRequiredToUpgrade|GetHeroLevelRequiredToUpgrade}} | ||
| |  | |||
| | <code>int GetHeroLevelRequiredToUpgrade() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetIntrinsicModifierName|GetIntrinsicModifierName}} | ||
| |  | |||
| | <code>string GetIntrinsicModifierName() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetLevel|GetLevel}} | ||
| |  | |||
| | <code>int GetLevel() </code> | |||
| | 获得技能目前的等级 | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetLevelSpecialValueFor|GetLevelSpecialValueFor}} | ||
| | | | <code>table GetLevelSpecialValueFor(string a, int b) </code> | ||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetManaCost|GetManaCost}} | ||
| |  | |||
| | <code>int GetManaCost(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetMaxLevel|GetMaxLevel}} | ||
| |  | |||
| | <code>int GetMaxLevel() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetModifierValue|GetModifierValue}} | ||
| |  | |||
| | <code>float GetModifierValue() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetModifierValueBonus|GetModifierValueBonus}} | ||
| |  | |||
| | <code>float GetModifierValueBonus() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetPlaybackRateOverride|GetPlaybackRateOverride}} | ||
| |  | |||
| | <code>float GetPlaybackRateOverride() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetSharedCooldownName|GetSharedCooldownName}} | ||
| |  | |||
| | <code>string GetSharedCooldownName() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetSpecialValueFor|GetSpecialValueFor}} | ||
| |  | |||
| | <code>table GetSpecialValueFor(string a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetStolenActivityModifier|GetStolenActivityModifier}} | ||
| |  | |||
| | <code>string GetStolenActivityModifier() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.GetToggleState|GetToggleState}} | ||
| |  | |||
| | <code>bool GetToggleState() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.HeroXPChange|HeroXPChange}} | ||
| |  | |||
| | <code>bool HeroXPChange(float a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IncrementModifierRefCount|IncrementModifierRefCount}} | ||
| |  | |||
| | <code>void IncrementModifierRefCount() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsActivated|IsActivated}} | ||
| |  | |||
| | <code>bool IsActivated() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsAttributeBonus|IsAttributeBonus}} | ||
| |  | |||
| | <code>bool IsAttributeBonus() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsChanneling|IsChanneling}} | ||
| |  | |||
| | <code>bool IsChanneling() </code> | |||
| | 返回目前技能是否在施法状态 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsCooldownReady|IsCooldownReady}} | ||
| |  | |||
| | <code>bool IsCooldownReady() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsCosmetic|IsCosmetic}} | ||
| |  | |||
| | <code>bool IsCosmetic(handle hEntity) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsFullyCastable|IsFullyCastable}} | ||
| |  | |||
| | <code>bool IsFullyCastable() </code> | |||
| | 返回技能能否被释放 | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsHidden|IsHidden}} | |||
| |  | |||
| | <code>bool IsHidden() </code> | |||
| |  | |||
| | <code> | | No Description Set | ||
| | Set  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsHiddenWhenStolen|IsHiddenWhenStolen}} | ||
| |  | |||
| | <code>bool IsHiddenWhenStolen() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsInAbilityPhase|IsInAbilityPhase}} | ||
| |  | |||
| | <code>bool IsInAbilityPhase() </code> | |||
| | 返回技能目前是否在被释放 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsItem|IsItem}} | ||
| |  | |||
| | <code>bool IsItem() </code> | |||
| | Returns whether this is an ability attached to an item. | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsOwnersGoldEnough|IsOwnersGoldEnough}} | ||
| | Set  | |||
| | <code>bool IsOwnersGoldEnough(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsOwnersGoldEnoughForUpgrade|IsOwnersGoldEnoughForUpgrade}} | ||
| | Set  | |||
| | <code>bool IsOwnersGoldEnoughForUpgrade() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsOwnersManaEnough|IsOwnersManaEnough}} | ||
| | Set  | |||
| | <code>bool IsOwnersManaEnough() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsPassive|IsPassive}} | ||
| |  | |||
| | <code>bool IsPassive() </code> | |||
| | Returns whether this is a passive ability. | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsSharedWithTeammates|IsSharedWithTeammates}} | ||
| |  | |||
| | <code>bool IsSharedWithTeammates() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsStealable|IsStealable}} | ||
| |  | |||
| | <code>bool IsStealable() </code> | |||
| | Returns whether this ability can be stealed (by Rubick's ultimate). | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsStolen|IsStolen}} | ||
| |  | |||
| | <code>bool IsStolen() </code> | |||
| | Returns whether this ability has been stolen. | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsToggle|IsToggle}} | ||
| | Set  | |||
| | <code>bool IsToggle() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.IsTrained|IsTrained}} | ||
| |  | |||
| | <code>bool IsTrained() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.MarkAbilityButtonDirty|MarkAbilityButtonDirty}} | ||
| |  | |||
| | <code>void MarkAbilityButtonDirty() </code> | |||
| | 标记这个技能图标表示需要刷新 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.NumModifiersUsingAbility|NumModifiersUsingAbility}} | ||
| |  | |||
| | <code>int NumModifiersUsingAbility() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.OnAbilityPhaseInterrupted|OnAbilityPhaseInterrupted}} | ||
| |  | |||
| | <code>void OnAbilityPhaseInterrupted() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.OnAbilityPhaseStart|OnAbilityPhaseStart}} | ||
| |  | |||
| | <code>bool OnAbilityPhaseStart() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.OnAbilityPinged|OnAbilityPinged}} | |||
| | <code>void OnAbilityPinged() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.OnChannelFinish|OnChannelFinish}} | ||
| |  | |||
| | <code>void OnChannelFinish(bool a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.OnChannelThink|OnChannelThink}} | ||
| |  | |||
| | <code>void OnChannelThink(float a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.OnHeroCalculateStatBonus|OnHeroCalculateStatBonus}} | ||
| |  | |||
| | <code>void OnHeroCalculateStatBonus() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.OnHeroLevelUp|OnHeroLevelUp}} | ||
| |  | |||
| | <code>void OnHeroLevelUp() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.OnInventoryContentsChanged|OnInventoryContentsChanged}} | ||
| |  | |||
| | <code>void OnInventoryContentsChanged() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.OnOwnerDied|OnOwnerDied}} | ||
| | | | <code>void OnOwnerDied() </code> | ||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.OnOwnerSpawned|OnOwnerSpawned}} | ||
| |  | |||
| | <code>void OnOwnerSpawned() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.OnSpellStart|OnSpellStart}} | ||
| |  | |||
| | <code>void OnSpellStart() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.OnToggle|OnToggle}} | ||
| |  | |||
| | <code>void OnToggle() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.OnUpgrade|OnUpgrade}} | ||
| |  | |||
| | <code>void OnUpgrade() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.PayGoldCost|PayGoldCost}} | ||
| |  | |||
| | <code>void PayGoldCost() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.PayGoldCostForUpgrade|PayGoldCostForUpgrade}} | ||
| |  | |||
| | <code>void PayGoldCostForUpgrade() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.PayManaCost|PayManaCost}} | ||
| |  | |||
| | <code>void PayManaCost() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.PlaysDefaultAnimWhenStolen|PlaysDefaultAnimWhenStolen}} | ||
| |  | |||
| | <code>bool PlaysDefaultAnimWhenStolen() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.ProcsMagicStick|ProcsMagicStick}} | ||
| |  | |||
| | <code>bool ProcsMagicStick() </code> | |||
| | Returns whether this ability procs magic stick. | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.RefCountsModifiers|RefCountsModifiers}} | ||
| |  | |||
| | <code>bool RefCountsModifiers() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.RefundManaCost|RefundManaCost}} | |||
| | <code>void RefundManaCost() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.ResetToggleOnRespawn|ResetToggleOnRespawn}} | ||
| |  | |||
| | <code>bool ResetToggleOnRespawn() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.SetAbilityIndex|SetAbilityIndex}} | ||
| |  | |||
| | <code>void SetAbilityIndex(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.SetActivated|SetActivated}} | ||
| |  | |||
| | <code>void SetActivated(bool a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.SetChanneling|SetChanneling}} | ||
| |  | |||
| | <code>void SetChanneling(bool a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.SetHidden|SetHidden}} | ||
| |  | |||
| | <code>void SetHidden(bool a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.SetInAbilityPhase|SetInAbilityPhase}} | ||
| |  | |||
| | <code>void SetInAbilityPhase(bool a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.SetLevel|SetLevel}} | ||
| |  | |||
| | <code>void SetLevel(int a) </code> | |||
| | 设置这个技能的等级 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.SetOverrideCastPoint|SetOverrideCastPoint}} | ||
| |  | |||
| | <code>void SetOverrideCastPoint(float a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.SetRefCountsModifiers|SetRefCountsModifiers}} | ||
| |  | |||
| | <code>void SetRefCountsModifiers(bool a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.SetStolen|SetStolen}} | ||
| |  | |||
| | <code>void SetStolen(bool a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.ShouldUseResources|ShouldUseResources}} | ||
| |  | |||
| | <code>bool ShouldUseResources() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.SpeakAbilityConcept|SpeakAbilityConcept}} | ||
| |  | |||
| | <code>void SpeakAbilityConcept(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.SpeakTrigger|SpeakTrigger}} | ||
| |  | |||
| | <code>bool SpeakTrigger() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.StartCooldown|StartCooldown}} | ||
| |  | |||
| | <code>void StartCooldown(float a) </code> | |||
| | 参数:fl冷却时间? | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.ToggleAbility|ToggleAbility}} | ||
| |  | |||
| | <code>void ToggleAbility() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.ToggleAutoCast|ToggleAutoCast}} | ||
| |  | |||
| | <code>void ToggleAutoCast() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.UpgradeAbility|UpgradeAbility}} | ||
| |  | |||
| | <code>void UpgradeAbility() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseAbility.UseResources|UseResources}} | |||
| | <code>void UseResources(bool a, bool b, bool c) </code> | |||
| | No Description Set | |||
| |} | |||
| === CDOTA_Ability_Animation_Attack === | |||
| :::::extends [[#CDOTABaseAbility| CDOTABaseAbility]] | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | {| class="standard-table" style="width: 100%;" | ||
| !  | |||
| !  | ! 函数名  | ||
| !  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Animation_Attack.SetPlaybackRate|SetPlaybackRate}} | ||
| |  | |||
| | | | <code>void SetPlaybackRate(float a) </code> | ||
| | 重写播放速率 | |||
| |} | |||
| |- | |||
| === CDOTA_Ability_Animation_TailSpin === | |||
| :::::extends [[#CDOTABaseAbility| CDOTABaseAbility]] | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Animation_TailSpin.SetPlaybackRate|SetPlaybackRate}} | ||
| |  | |||
| | <code>void SetPlaybackRate(float a) </code> | |||
| | Override playbackrate | |||
| |} | |||
| === CDOTA_Ability_Nian_Leap === | |||
| :::::extends [[#CDOTABaseAbility| CDOTABaseAbility]] | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Nian_Leap.SetPlaybackRate|SetPlaybackRate}} | ||
| |  | |||
| | <code>void SetPlaybackRate(float a) </code> | |||
| | Override playbackrate | |||
| |} | |||
| === CDOTA_Ability_Nian_Dive === | |||
| :::::extends [[#CDOTABaseAbility| CDOTABaseAbility]] | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Nian_Dive.SetPlaybackRate|SetPlaybackRate}} | ||
| |  | |||
| | | | <code>void SetPlaybackRate(float a) </code> | ||
| | Override playbackrate | |||
| |- | |} | ||
| === CDOTA_Ability_Nian_Roar === | |||
| :::::extends [[#CDOTABaseAbility| CDOTABaseAbility]] | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Nian_Roar.GetCastCount|GetCastCount}} | ||
| |  | |||
| | <code>int GetCastCount() </code> | |||
| | 年兽使用了咆哮的次数 | |||
| |} | |||
| === CDOTA_Item === | |||
| :::::extends [[#CDOTABaseAbility| CDOTABaseAbility]] | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.GetContainer|GetContainer}} | ||
| |  | | <code>handle GetContainer()</code> | ||
| | 获得物品所有者 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.GetCost|GetCost}} | |||
| | <code>int GetCost()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.GetCurrentCharges|GetCurrentCharges}} | |||
| | <code>int GetCurrentCharges()</code> | |||
| | 获得物品的目前充能 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.GetInitialCharges|GetInitialCharges}} | |||
| | <code>int GetInitialCharges()</code> | |||
| | 获得物品的初始充能 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.GetPurchaser|GetPurchaser}} | |||
| | <code>handle GetPurchaser()</code> | |||
| | 获得物品的购买者 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.GetPurchaseTime|GetPurchaseTime}} | |||
| | <code>float GetPurchaseTime()</code> | |||
| | 获得物品的购买时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.GetShareability|GetShareability}} | |||
| | <code>int GetShareability()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.IsAlertableItem|IsAlertableItem}} | |||
| | <code>bool IsAlertableItem() </code> | |||
| |   | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.IsPermanent|IsPermanent}} | ||
| | <code>int  | | <code>bool IsPermanent()</code> | ||
| |  | | 判断物品是否非消耗品 | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.IsCastOnPickup|IsCastOnPickup}} | |||
| | <code>bool IsCastOnPickup()</code> | |||
| | 判断物品是否可以被捡起。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.IsCombinable|IsCombinable}} | |||
| | <code>bool IsCombinable()</code> | |||
| | 判断物品是否可以合成。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.IsDisassemblable|IsDisassemblable}} | |||
| | <code>bool IsDisassemblable()</code> | |||
| | 判断物品是否可以被拆分。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.IsDroppable|IsDroppable}} | |||
| | <code>bool IsDroppable() </code> | |||
| | 判断物品是否可以被丢弃。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.IsItem|IsItem}} | |||
| | <code>bool IsItem()</code> | |||
| | 判断是否是物品。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.IsKillable|IsKillable}} | |||
| | <code>bool IsKillable()</code> | |||
| | 判断是否可以被击杀。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.IsMuted|IsMuted}} | |||
| | <code>bool IsMuted()</code> | |||
| | 判断是否可以被禁用(?) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.IsPermanent|IsPermanent}} | |||
| | <code>bool IsPermanent()</code> | |||
| | 判断物品是否是永久性的 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.IsPurchasable|IsPurchasable}} | |||
| | <code>bool IsPurchasable()</code> | |||
| | 判断物品是否可以被购买。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.IsRecipe|IsRecipe}} | |||
| | <code>bool IsRecipe()</code> | |||
| | 判断物品是否是卷轴。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.IsRecipeGenerated|IsRecipeGenerated}} | |||
| | <code>bool IsRecipeGenerated()</code> | |||
| | 判断物品是否是由卷轴合成的。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.IsSellable|IsSellable}} | |||
| | <code>bool IsSellable()</code> | |||
| | 判断物品是否可以被出售。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.IsStackable|IsStackable}} | |||
| | <code>bool IsStackable()</code> | |||
| | 判断物品是否可以叠加。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.LaunchLoot|LaunchLoot}} | |||
| | <code>void LaunchLoot(bool useOnContact, float height, float flDuration, Vector destination)</code> | |||
| | 当物品掉落在地面时,将物品发射出去,使其落在某个地点。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.LaunchLootInitialHeight|LaunchLootInitialHeight}} | |||
| | <code>void LaunchLootInitialHeight(bool bAutoUse, float flInitialHeight, float flLaunchHeight, float flDuration, Vector vEndPoint)</code> | |||
| | 设置发射物品时的初始高度。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.RequiresCharges|RequiresCharges}} | |||
| | <code>bool RequiresCharges() </code> | |||
| | 判断物品是否需要充能。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.SetCurrentCharges|SetCurrentCharges}} | |||
| | <code>void SetCurrentCharges(int a)</code> | |||
| | 设置物品的充能数 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.SetPurchaser|SetPurchaser}} | |||
| | <code>void SetPurchaser(handle a)</code> | |||
| | 设置物品的购买者 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.SetPurchaseTime|SetPurchaseTime}} | |||
| | <code>void SetPurchaseTime(float a)</code> | |||
| | 设置物品的购买时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.SetStacksWithOtherOwners|SetStacksWithOtherOwners}} | |||
| | <code>void SetStacksWithOtherOwners(bool a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.StacksWithOtherOwners|StacksWithOtherOwners}} | |||
| | <code>bool StacksWithOtherOwners()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item.Think|Think}} | |||
| | <code>void Think()</code> | |||
| | 判断此物品 | |||
| |} | |||
| === CDOTA_Item_Physical === | |||
| :::::extends [[#CBaseAnimating| CBaseAnimating]] | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Physical.GetContainedItem|GetContainedItem}} | ||
| |  | |||
| | <code>handle GetContainedItem() </code> | |||
| | 返回禁用的物品? | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Physical.GetCreationTime|GetCreationTime}} | ||
| |  | |||
| | <code>float GetCreationTime() </code> | |||
| | 返回物品第一次出现在地图上的时间 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Physical.SetContainedItem|SetContainedItem}} | ||
| |  | |||
| | | | <code>void SetContainedItem(handle a) </code> | ||
| | 设置禁用的物品? | |||
| |} | |||
| |- | |||
| === CDOTA_Item_DataDriven === | |||
| :::::extends [[#CDOTA_Item| CDOTA_Item]] | |||
| '''' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_DataDriven.ApplyDataDrivenModifier|ApplyDataDrivenModifier}} | ||
| |  | |||
| | <code>void ApplyDataDrivenModifier(handle source, handle target, string modifier_name, handle modifierArgs) </code> | |||
| | 应用一个数据驱动的Mordifier。 | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_DataDriven.ApplyDataDrivenThinker|ApplyDataDrivenThinker}} | ||
| | <code> | | <code>handle ApplyDataDrivenThinker(handle hCaster, Vector vLocation, string pszModifierName, handle hModifierTable) </code> | ||
| |  | | 应用一个数据驱动的计时器到指定地点。 | ||
| |} | |||
| === CDOTA_Unit_Nian === | |||
| :::::extends [[#CDOTA_BaseNPC_Creature| CDOTA_BaseNPC_Creature]] | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code>handle  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Unit_Nian.GetHorn|GetHorn}} | ||
| |  | |||
| | <code>handle GetHorn() </code> | |||
| | 获取年兽角 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Unit_Nian.GetTail|GetTail}} | ||
| |  | |||
| | <code>handle GetTail() </code> | |||
| | 获取年兽尾巴 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Unit_Nian.IsHornAlive|IsHornAlive}} | ||
| |  | |||
| | <code>bool IsHornAlive() </code> | |||
| | 年兽的角巴是否损坏? | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Unit_Nian.IsTailAlive|IsTailAlive}} | ||
| |  | |||
| | <code>bool IsTailAlive() </code> | |||
| | 年兽的尾巴是否损坏? | |||
| |} | |||
| === CBasePlayer === | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBasePlayer.GetHMDAvatar|GetHMDAvatar}} | ||
| |  | | <code>handle GetHMDAvatar()</code> | ||
| |- | | Returns the HMD Avatar entity for this player if it exists. | ||
| |  | |-  | ||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBasePlayer.IsNoclipping|IsNoclipping}} | ||
| |  | | <code>bool IsNoclipping()</code> | ||
| |- | | 玩家处于穿墙模式(noclip mode)下返回true | ||
| |  | |-  | ||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBasePlayer.IsSteamControllerButtonPressed|IsSteamControllerButtonPressed}} | ||
| |  | | <code>bool IsSteamControllerButtonPressed(int nControllerNumber, int nButton)</code> | ||
| | 当Steam控制按钮被按下时,返回True。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CBasePlayer.IsUsePressed|IsUsePressed}} | |||
| | <code>bool IsUsePressed()</code> | |||
| | 当使用按钮被按下时,返回True。 | |||
| |-   | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CBasePlayer.IsVRControllerButtonPressed|IsVRControllerButtonPressed}} | |||
| | <code>bool IsVRControllerButtonPressed(int nButton)</code> | |||
| | 当VR控制按钮被按下时,返回True。 | |||
| |-   | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CBasePlayer.Quit|Quit}} | |||
| | <code>void Quit()</code> | |||
| | 从脚本中退出游戏。 | |||
| |} | |||
| === CDOTAPlayer === | |||
| :::::extends [[#CBaseAnimating| CBaseAnimating]] | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAPlayer.GetAssignedHero|GetAssignedHero}} | ||
| |  | |||
| | <code>handle GetAssignedHero() </code> | |||
| | 获取该玩家的英雄 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAPlayer.GetControlledRPGUnit|GetControlledRPGUnit}} | ||
| |  | |||
| | <code>handle GetControlledRPGUnit() </code> | |||
| | 获取该玩家控制的RPG单位 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAPlayer.GetPlayerID|GetPlayerID}} | ||
| |  | |||
| | <code>int GetPlayerID() </code> | |||
| | 获取该玩家的官方玩家ID(PlayerID)玩家不在队伍中时返回-1 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAPlayer.MakeRandomHeroSelection|MakeRandomHeroSelection}} | ||
| |  | |||
| | <code>void MakeRandomHeroSelection() </code> | |||
| | 随机该玩家的英雄 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAPlayer.SetKillCamUnit|SetKillCamUnit}} | ||
| |  | |||
| | <code>void SetKillCamUnit(handle a) </code> | |||
| | 设置英雄的击杀镜头单位(kill cam unit) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAPlayer.SetMusicStatus|SetMusicStatus}} | ||
| |  | |||
| | <code>void SetMusicStatus(int nMusicStatus, float flIntensity) </code> | |||
| |  设置玩家的音乐状态,注意这只有在dota_music_battle_enable为off时才会有效 | |||
| |} | |||
| === CDOTA_PlayerResource === | |||
| :::::extends [[#CBaseEntity| CBaseEntity]] | |||
| ''No Description Set'' | |||
| ''Global accessor variable:'' <code>PlayerResource</code> | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.AddAegisPickup|AddAegisPickup}} | ||
| |  | |||
| | <code>void AddAegisPickup(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>float  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.AddClaimedFarm|AddClaimedFarm}} | ||
| |  | |||
| | <code>void AddClaimedFarm(int a, float b) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.AddGoldSpentOnSupport|AddGoldSpentOnSupport}} | ||
| |  | |||
| | <code>void AddGoldSpentOnSupport(int a, int b) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.AddRunePickup|AddRunePickup}} | ||
| |  | |||
| | <code>void AddRunePickup(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.AreUnitsSharedWithPlayerID|AreUnitsSharedWithPlayerID}} | ||
| |  | |||
| | <code>bool AreUnitsSharedWithPlayerID(int a, int b) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.ClearKillsMatrix|ClearKillsMatrix}} | ||
| |  | |||
| | <code>void ClearKillsMatrix(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.ClearLastHitMultikill|ClearLastHitMultikill}} | ||
| |  | |||
| | <code>void ClearLastHitMultikill(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.ClearLastHitStreak|ClearLastHitStreak}} | ||
| |  | |||
| | <code>void ClearLastHitStreak(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.ClearRawPlayerDamageMatrix|ClearRawPlayerDamageMatrix}} | ||
| |  | |||
| | <code>void ClearRawPlayerDamageMatrix(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.ClearStreak|ClearStreak}} | ||
| |  | |||
| | <code>void ClearStreak(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetAegisPickups|GetAegisPickups}} | ||
| |  | |||
| | <code>int GetAegisPickups(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetAssists|GetAssists}} | ||
| |  | |||
| | <code>int GetAssists(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetBroadcasterChannel|GetBroadcasterChannel}} | ||
| |  | |||
| | <code>unsigned GetBroadcasterChannel(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetBroadcasterChannelSlot|GetBroadcasterChannelSlot}} | ||
| |  | |||
| | <code>unsigned GetBroadcasterChannelSlot(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetClaimedDenies|GetClaimedDenies}} | ||
| |  | |||
| | <code>int GetClaimedDenies(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetClaimedFarm|GetClaimedFarm}} | ||
| |  | |||
| | <code>float GetClaimedFarm(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetClaimedMisses|GetClaimedMisses}} | ||
| |  | |||
| | <code>int GetClaimedMisses(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetConnectionState|GetConnectionState}} | ||
| |  | |||
| | <code>int GetConnectionState(int iPlayerID) </code> | |||
| | 返回一个指示玩家连接状态的数字。 0 - 无连接. 1 - 机器人连入. 2 - 玩家连入. 3 机器人/玩家断线. | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetCreepDamageTaken|GetCreepDamageTaken}} | ||
| |  | |||
| | <code>int GetCreepDamageTaken(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetCustomBuybackCooldown|GetCustomBuybackCooldown}} | ||
| |  | |||
| | <code>float GetCustomBuybackCooldown(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetCustomBuybackCost|GetCustomBuybackCost}} | ||
| | <code>int GetCustomBuybackCost(int a) </code> | |||
| |  | | No Description Set | ||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetCustomTeamAssignment|GetCustomTeamAssignment}} | ||
| |  | |||
| | <code>int GetCustomTeamAssignment(int playerIndex) </code> | |||
| | 返回玩家要加入的队伍编号 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetDamageDoneToHero|GetDamageDoneToHero}} | ||
| |  | |||
| | <code>int GetDamageDoneToHero(int a, int b) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetDeaths|GetDeaths}} | ||
| |  | |||
| | <code>int GetDeaths(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetDenies|GetDenies}} | ||
| |  | |||
| | <code>int GetDenies(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetEventPointsForPlayerID|GetEventPointsForPlayerID}} | ||
| |  | |||
| | <code>int GetEventPointsForPlayerID(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetEventPremiumPointsGranted|GetEventPremiumPointsGranted}} | ||
| | <code>int GetEventPremiumPointsGranted(int a) </code> | |||
| |  | | No Description Set | ||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetEventRankGranted|GetEventRankGranted}} | ||
| |  | |||
| | <code>int GetEventRankGranted(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetGold|GetGold}} | ||
| |  | |||
| | <code>int GetGold(int playerID) </code> | |||
| | 返回指定玩家现有金钱量 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetGoldBagsCollected|GetGoldBagsCollected}} | ||
| |  | |||
| | <code>int GetGoldBagsCollected(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetGoldLostToDeath|GetGoldLostToDeath}} | ||
| |  | |||
| | <code>int GetGoldLostToDeath(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetGoldPerMin|GetGoldPerMin}} | ||
| |  | |||
| | <code>float GetGoldPerMin(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetGoldSpentOnBuybacks|GetGoldSpentOnBuybacks}} | ||
| | | | <code>int GetGoldSpentOnBuybacks(int a) </code> | ||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetGoldSpentOnConsumables|GetGoldSpentOnConsumables}} | ||
| |  | |||
| | <code>int GetGoldSpentOnConsumables(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetGoldSpentOnItems|GetGoldSpentOnItems}} | ||
| |  | |||
| | <code>int GetGoldSpentOnItems(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetGoldSpentOnSupport|GetGoldSpentOnSupport}} | ||
| |  | |||
| | <code>int GetGoldSpentOnSupport(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetHealing|GetHealing}} | ||
| |  | |||
| | <code>float GetHealing(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetHeroDamageTaken|GetHeroDamageTaken}} | ||
| |  | |||
| | <code>int GetHeroDamageTaken(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetKills|GetKills}} | ||
| |  | |||
| | <code>int GetKills(int playerID) </code> | |||
| | 返回指定玩家击杀次数 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetKillsDoneToHero|GetKillsDoneToHero}} | ||
| |  | |||
| | <code>int GetKillsDoneToHero(int attackerPlayerID, int victimPlayerID) </code> | |||
| | 返回攻击者(第一个参数)杀死指定受害者(第二个参数)的次数 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetLastHitMultikill|GetLastHitMultikill}} | ||
| |  | |||
| | <code>int GetLastHitMultikill(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetLastHits|GetLastHits}} | ||
| |  | |||
| | <code>int GetLastHits(int playerID) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetLastHitStreak|GetLastHitStreak}} | ||
| |  | |||
| | <code>int GetLastHitStreak(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetLevel|GetLevel}} | ||
| |  | |||
| | <code>int GetLevel(int playerID) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetMisses|GetMisses}} | ||
| |  | |||
| | <code>int GetMisses(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetNearbyCreepDeaths|GetNearbyCreepDeaths}} | ||
| |  | |||
| | <code>int GetNearbyCreepDeaths(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetNthCourierForTeam|GetNthCourierForTeam}} | ||
| |  | |||
| | <code>handle GetNthCourierForTeam(int a, int b) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetNthPlayerIDOnTeam|GetNthPlayerIDOnTeam}} | ||
| |  | |||
| | <code>int GetNthPlayerIDOnTeam(int a, int b) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetNumConsumablesPurchased|GetNumConsumablesPurchased}} | ||
| |  | |||
| | <code>int GetNumConsumablesPurchased(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetNumCouriersForTeam|GetNumCouriersForTeam}} | ||
| |  | |||
| | <code>int GetNumCouriersForTeam(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetNumItemsPurchased|GetNumItemsPurchased}} | ||
| |  | |||
| | <code>int GetNumItemsPurchased(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetOriginalLobbyTeam|GetOriginalLobbyTeam}} | ||
| | <code> | |||
| |  | | <code>int GetOriginalLobbyTeam(int iPlayerID) </code> | ||
| | 获取玩家在房间中所属的初始队伍。 当没有房间信息时,返回DOTA_TEAM_NOTEAM。 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetPlayer|GetPlayer}} | ||
| |  | |||
| | <code>handle GetPlayer(int playerID) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetPlayerCount|GetPlayerCount}} | ||
| |  | |||
| | <code>int GetPlayerCount() </code> | |||
| | 获取未加入队伍的观战者和玩家数量。 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetPlayerCountForTeam|GetPlayerCountForTeam}} | ||
| |  | |||
| | <code>int GetPlayerCountForTeam(int iTeam) </code> | |||
| | 获取队伍中的玩家数量。 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetPlayerLoadedCompletely|GetPlayerLoadedCompletely}} | ||
| |  | |||
| | <code>bool GetPlayerLoadedCompletely(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetPlayerName|GetPlayerName}} | ||
| |  | |||
| | <code>string GetPlayerName(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetPlayerReservedState|GetPlayerReservedState}} | ||
| |  | |||
| | <code>bool GetPlayerReservedState(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetRawPlayerDamage|GetRawPlayerDamage}} | ||
| |  | |||
| | <code>int GetRawPlayerDamage(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetReliableGold|GetReliableGold}} | ||
| |  | |||
| | <code>int GetReliableGold(int playerID) </code> | |||
| | 返回指定玩家现有可靠金钱量 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetRespawnSeconds|GetRespawnSeconds}} | ||
| |  | |||
| | <code>int GetRespawnSeconds(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetRoshanKills|GetRoshanKills}} | ||
| |  | |||
| | <code>int GetRoshanKills(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetRunePickups|GetRunePickups}} | ||
| |  | |||
| | <code>int GetRunePickups(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetSelectedHeroEntity|GetSelectedHeroEntity}} | ||
| |  | |||
| | <code>handle GetSelectedHeroEntity(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetSelectedHeroID|GetSelectedHeroID}} | ||
| |  | |||
| | <code>int GetSelectedHeroID(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetSelectedHeroName|GetSelectedHeroName}} | ||
| |  | |||
| | <code>string GetSelectedHeroName(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetSteamAccountID|GetSteamAccountID}} | ||
| |  | |||
| | <code><> GetSteamAccountID(int a) </code> | |||
| | 获取32位SteamID | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetSteamID|GetSteamID}} | ||
| |  | | <code>unsigned GetSteamID(int iPlayerID) </code> | ||
| | 获取64位SteamID | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetStreak|GetStreak}} | ||
| |  | |||
| | <code>int GetStreak(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetStuns|GetStuns}} | ||
| |  | |||
| | <code>float GetStuns(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetTeam|GetTeam}} | ||
| |  | |||
| | <code>int GetTeam(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetTeamKills|GetTeamKills}} | ||
| |  | |||
| | <code>int GetTeamKills(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetTeamPlayerCount|GetTeamPlayerCount}} | ||
| |  | |||
| | <code>int GetTeamPlayerCount() </code> | |||
| | 获取处于有效队伍(天辉,夜魇,或者自定义队伍)的玩家数量。 | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetTimeOfLastConsumablePurchase|GetTimeOfLastConsumablePurchase}} | |||
| | <code>float GetTimeOfLastConsumablePurchase(int a) </code> | |||
| | <code> | |||
| | No Description Set | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetTimeOfLastDeath|GetTimeOfLastDeath}} | |||
| | <code>float GetTimeOfLastDeath(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetTimeOfLastItemPurchase|GetTimeOfLastItemPurchase}} | |||
| | <code>float GetTimeOfLastItemPurchase(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetTotalEarnedGold|GetTotalEarnedGold}} | |||
| | <code>int GetTotalEarnedGold(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetTotalEarnedXP|GetTotalEarnedXP}} | |||
| | <code>int GetTotalEarnedXP(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetTotalGoldSpent|GetTotalGoldSpent}} | ||
| |  | |||
| | <code>int GetTotalGoldSpent(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetTowerDamageTaken|GetTowerDamageTaken}} | ||
| |  | |||
| | <code>int GetTowerDamageTaken(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetTowerKills|GetTowerKills}} | ||
| |  | |||
| | <code>int GetTowerKills(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetUnitShareMaskForPlayer|GetUnitShareMaskForPlayer}} | ||
| |  | |||
| | <code>int GetUnitShareMaskForPlayer(int a, int b) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetUnreliableGold|GetUnreliableGold}} | ||
| |  | |||
| | <code>int GetUnreliableGold(int playerID) </code> | |||
| | 返回指定玩家现有不可靠金钱量 | |||
| |- | |- | ||
| |  | |||
| | <code>float  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.GetXPPerMin|GetXPPerMin}} | ||
| |  | |||
| | <code>float GetXPPerMin(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.HasCustomGameTicketForPlayerID|HasCustomGameTicketForPlayerID}} | ||
| |  | | <code>bool HasCustomGameTicketForPlayerID(int iPlayerID) </code> | ||
| | 当玩家拥有通行证时返回true | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.HasRandomed|HasRandomed}} | ||
| | | | <code>bool HasRandomed(int a) </code> | ||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.HasRepicked|HasRepicked}} | ||
| | Set  | |||
| | <code>bool HasRepicked(int playerID) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.HasSelectedHero|HasSelectedHero}} | ||
| | Set  | |||
| | <code>bool HasSelectedHero(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.HaveAllPlayersJoined|HaveAllPlayersJoined}} | ||
| | Set  | |||
| | <code>bool HaveAllPlayersJoined() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.HeroLevelUp|HeroLevelUp}} | |||
| | <code>void HeroLevelUp(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IncrementAssists|IncrementAssists}} | |||
| | <code>void IncrementAssists(int playerID) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IncrementClaimedDenies|IncrementClaimedDenies}} | |||
| | <code>void IncrementClaimedDenies(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IncrementClaimedMisses|IncrementClaimedMisses}} | |||
| | <code>void IncrementClaimedMisses(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IncrementDeaths|IncrementDeaths}} | ||
| |  | |||
| | <code>void IncrementDeaths(int playerID) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IncrementDenies|IncrementDenies}} | ||
| |  | |||
| | <code>void IncrementDenies(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IncrementGoldBagsCollected|IncrementGoldBagsCollected}} | ||
| |  | |||
| | <code>void IncrementGoldBagsCollected(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IncrementKills|IncrementKills}} | ||
| |  | |||
| | <code>void IncrementKills(int playerID, int kills) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IncrementLastHitMultikill|IncrementLastHitMultikill}} | |||
| | <code>void IncrementLastHitMultikill(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IncrementLastHits|IncrementLastHits}} | ||
| |  | |||
| | <code>void IncrementLastHits(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IncrementLastHitStreak|IncrementLastHitStreak}} | ||
| |  | |||
| | <code>void IncrementLastHitStreak(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IncrementMisses|IncrementMisses}} | ||
| |  | |||
| | <code>void IncrementMisses(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IncrementNearbyCreepDeaths|IncrementNearbyCreepDeaths}} | ||
| |  | |||
| | <code>void IncrementNearbyCreepDeaths(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IncrementStreak|IncrementStreak}} | ||
| |  | |||
| | <code>void IncrementStreak(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IncrementTotalEarnedXP|IncrementTotalEarnedXP}} | ||
| |  | |||
| | <code>void IncrementTotalEarnedXP(int a, int b) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IsBroadcaster|IsBroadcaster}} | ||
| |  | |||
| | <code>bool IsBroadcaster(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IsDisableHelpSetForPlayerID|IsDisableHelpSetForPlayerID}} | ||
| |  | |||
| | <code>bool IsDisableHelpSetForPlayerID(int a, int b) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IsFakeClient|IsFakeClient}} | ||
| |  | |||
| | <code>bool IsFakeClient(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IsHeroSelected|IsHeroSelected}} | ||
| |  | |||
| | <code>bool IsHeroSelected(string a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IsHeroSharedWithPlayerID|IsHeroSharedWithPlayerID}} | ||
| |  | |||
| | <code>bool IsHeroSharedWithPlayerID(int a, int b) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IsValidPlayer|IsValidPlayer}} | ||
| |  | |||
| | <code>bool IsValidPlayer(int playerID) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IsValidPlayerID|IsValidPlayerID}} | ||
| |  | |||
| | <code>bool IsValidPlayerID(int playerID) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IsValidTeamPlayer|IsValidTeamPlayer}} | ||
| |  | |||
| | <code>bool IsValidTeamPlayer(int playerID) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.IsValidTeamPlayerID|IsValidTeamPlayerID}} | ||
| |  | |||
| | <code>bool IsValidTeamPlayerID(int playerID) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.ModifyGold|ModifyGold}} | ||
| |  | |||
| | <code>int ModifyGold(int playerID, int goldAmmt, bool reliable, int d) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.ReplaceHeroWith|ReplaceHeroWith}} | ||
| |  | |||
| | <code>handle ReplaceHeroWith(int a, string b, int c, int d) </code> | |||
| | (玩家ID,英雄职业名,金钱,经验值) - 将玩家的英雄替换成指定的英雄、金钱和经验值 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.ResetBuybackCostTime|ResetBuybackCostTime}} | ||
| | | | <code>void ResetBuybackCostTime(int a) </code> | ||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.ResetTotalEarnedGold|ResetTotalEarnedGold}} | ||
| |  | |||
| | <code>void ResetTotalEarnedGold(int a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.SetBuybackCooldownTime|SetBuybackCooldownTime}} | ||
| |  | |||
| | <code>void SetBuybackCooldownTime(int a, float b) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.SetBuybackGoldLimitTime|SetBuybackGoldLimitTime}} | ||
| |  | |||
| | <code>void SetBuybackGoldLimitTime(int a, float b) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.SetCameraTarget|SetCameraTarget}} | ||
| |  | |||
| | <code>void SetCameraTarget(int a, handle b) </code> | |||
| | (玩家ID,实体) - 强制玩家镜头跟随目标实体 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.SetCustomBuybackCooldown|SetCustomBuybackCooldown}} | ||
| |  | |||
| | <code>void SetCustomBuybackCooldown(int a, float b) </code> | |||
| | 设置玩家买活冷却时间 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.SetCustomBuybackCost|SetCustomBuybackCost}} | ||
| | | | <code>void SetCustomBuybackCost(int a, int b) </code> | ||
| | 设置玩家买活花费 | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.SetCustomPlayerColor|SetCustomPlayerColor}} | ||
| |  | |||
| | <code>void SetCustomPlayerColor(int iPlayerID, int r, int g, int b) </code> | |||
| | 为玩家设定自定义颜色(将显示在小地图,计分板等)。 | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.SetCustomTeamAssignment|SetCustomTeamAssignment}} | ||
| |  | |||
| | <code>void SetCustomTeamAssignment(int playerIndex, int teamToJoin) </code> | |||
| | 设置玩家要加入的队伍 | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.SetGold|SetGold}} | ||
| |  | |||
| | <code>void SetGold(int playerID, int amount, bool reliableGold) </code> | |||
| | 设置玩家的可靠/不可靠金钱数 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.SetHasRandomed|SetHasRandomed}} | ||
| |  | |||
| | <code>void SetHasRandomed(int playerID) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.SetHasRepicked|SetHasRepicked}} | ||
| |  | |||
| | <code>void SetHasRepicked(int playerID) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.SetLastBuybackTime|SetLastBuybackTime}} | ||
| |  | |||
| | <code>void SetLastBuybackTime(int a, int b) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.SetOverrideSelectionEntity|SetOverrideSelectionEntity}} | ||
| |  | |||
| | <code>void SetOverrideSelectionEntity(int nPlayerID, handle hEntity)   </code> | |||
| | 强制玩家选择实体。 | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.SetPlayerReservedState|SetPlayerReservedState}} | ||
| | <code> | |||
| |  | | <code>void SetPlayerReservedState(int a, bool b) </code> | ||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.SetUnitShareMaskForPlayer|SetUnitShareMaskForPlayer}} | ||
| |  | |||
| | <code>void SetUnitShareMaskForPlayer(int a, int b, int c, bool d) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.SpendGold|SpendGold}} | ||
| |  | |||
| | <code>void SpendGold(int playerID, int amount, int reason) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.UpdateTeamSlot|UpdateTeamSlot}} | ||
| |  | |||
| | <code>void UpdateTeamSlot(int a, int b) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_PlayerResource.WhoSelectedHero|WhoSelectedHero}} | ||
| |  | |||
| | <code>int WhoSelectedHero(string a) </code> | |||
| |  | |||
| | No Description Set | |||
| |} | |||
| === CDOTA_BaseNPC === | |||
| |- | :::::extends [[#CBaseFlex| CBaseFlex]] | ||
| '''' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code>int GetLevel(int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.AddAbility|AddAbility}} | ||
| |  | | <code>handle AddAbility(string a)</code> | ||
| | 以技能名称为该单位新增技能,并且返回该技能句柄。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.AddItem|AddItem}} | |||
| | <code>handle AddItem(handle a)</code>v | |||
| | 增加物品到该单位的库存 。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.AddItemByName|AddItemByName}} | |||
| | <code>handle AddItemByName(string pszItemName)</code> | |||
| | 向玩家的库存添加一个物品。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.AddNewModifier|AddNewModifier}} | |||
| | <code>handle AddNewModifier(handle caster, handle optionalSourceAbility, string modifierName, handle modifierData)</code> | |||
| | 为该单位增加修改器。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.AddNoDraw|AddNoDraw}} | |||
| | <code>void AddNoDraw()</code> | |||
| | 为单位添加No Draw的flag。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.AddSpeechBubble|AddSpeechBubble }} | |||
| | <code>void AddSpeechBubble(int iBubble, string pszSpeech, float flDuration, unsigned unOffsetX, unsigned unOffsetY)</code> | |||
| | 为单位添加一个会话气泡(可同时存在1-4个)。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.AlertNearbyUnits|AlertNearbyUnits}} | |||
| | <code>void AlertNearbyUnits(handle hAttacker, handle hAbility)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.AngerNearbyUnits|AngerNearbyUnits}} | |||
| | <code>void AngerNearbyUnits()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.AttackNoEarlierThan|AttackNoEarlierThan}} | |||
| | <code>void AttackNoEarlierThan(float a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.AttackReady|AttackReady}} | |||
| | <code>bool AttackReady()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.BoundingRadius2D|BoundingRadius2D}} | |||
| | <code>float BoundingRadius2D()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.CanEntityBeSeenByMyTeam|CanEntityBeSeenByMyTeam}} | |||
| | <code>bool CanEntityBeSeenByMyTeam(handle a)</code> | |||
| | Check FoW to see if an entity is visible. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.CanSellItems|CanSellItems}} | |||
| | <code>bool CanSellItems()</code> | |||
| | Query if this unit can sell items. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.CastAbilityImmediately|CastAbilityImmediately}} | |||
| | <code>void CastAbilityImmediately(handle ability, int playerIndex)</code> | |||
| | 技能立即施法。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.CastAbilityNoTarget|CastAbilityNoTarget}} | |||
| | <code>void  CastAbilityNoTarget(handle ability, int playerIndex)</code> | |||
| | 无目标的施放技能 ( hAbility, iPlayerIndex ) 。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.CastAbilityOnPosition|CastAbilityOnPosition}} | |||
| | <code>void CastAbilityOnPosition(Vector a, handle b, int c)</code> | |||
| | 对一地点施放技能。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.CastAbilityOnTarget|CastAbilityOnTarget}} | |||
| | <code>void CastAbilityOnTarget(handle target, handle ability, int playerIndex)</code> | |||
| | 对一实体施放技能。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.CastAbilityToggle|CastAbilityToggle}} | |||
| | <code>void CastAbilityToggle(handle a, int b)</code> | |||
| | 切换技能 ( hAbility, iPlayerIndex ) 。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.DestroyAllSpeechBubbles|DestroyAllSpeechBubbles}} | |||
| | <code>void DestroyAllSpeechBubbles()</code> | |||
| |  | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.DisassembleItem|DisassembleItem}} | |||
| | <code>void DisassembleItem(handle a)</code> | |||
| | 拆解该单位库存中过时的物品 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.DropItemAtPosition|DropItemAtPosition}} | |||
| | <code>void DropItemAtPosition(Vector a, handle b)</code> | |||
| | 将物品扔在指定地点。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.DropItemAtPositionImmediate|DropItemAtPositionImmediate}} | |||
| | <code>void DropItemAtPositionImmediate(handle a, Vector b)</code> | |||
| | 立即将物品扔在指定地点。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.EjectItemFromStash|EjectItemFromStash}} | |||
| | <code>void EjectItemFromStash(handle a)</code> | |||
| | 自库存栏丢落指定的物品。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.FindAbilityByName|FindAbilityByName}} | |||
| | <code>handle FindAbilityByName(string a)</code> | |||
| | 以名称寻找技能。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.FindAllModifiers|FindAllModifiers}} | |||
| | <code>table FindAllModifiers() </code> | |||
| | 以table形式返回该单位所具有的所有Modifier。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.FindAllModifiersByName|FindAllModifiersByName}} | |||
| | <code>table FindAllModifiersByName(string pszScriptName)</code> | |||
| | 根据Modifier的名字,以table形式返回该单位所具有的modifier。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.FindModifierByName|FindModifierByName}} | |||
| | <code>handle FindModifierByName(string pszScriptName)</code> | |||
| | 根据给定的名称,返回modifier的句柄。如果没有找到该名称,将返回nil。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.FindModifierByNameAndCaster|FindModifierByNameAndCaster}} | |||
| | <code>handle FindModifierByNameAndCaster(string pszScriptName, handle hCaster)</code> | |||
| | 根据给定的名称,返回某施法者所具有modifier的句柄。如果没有找到该名称,将返回nil。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.ForceKill|ForceKill}} | |||
| | <code>void ForceKill(bool a)</code> | |||
| | 强制击杀该单位。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetAbilityByIndex|GetAbilityByIndex}} | |||
| | <code>handle GetAbilityByIndex(int a)</code> | |||
| | 以下标值检索该单位的技能。0是第一个技能 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetAbilityCount|GetAbilityCount}} | |||
| | <code>int GetAbilityCount()</code> | |||
| | 获取拥有的技能数量。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetAcquisitionRange|GetAcquisitionRange}} | |||
| | <code>float GetAcquisitionRange()</code> | |||
| | 获取单位的自动收集距离。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetAdditionalBattleMusicWeight|GetAdditionalBattleMusicWeight}} | |||
| | <code>float GetAdditionalBattleMusicWeight()</code> | |||
| | 获取当与该单位战斗时将会计算的战斗音乐权重。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetAggroTarget|GetAggroTarget}} | |||
| | <code>handle GetAggroTarget()Returns this unit's aggro target. </code> | |||
| | 获取该单位的仇恨目标。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetAttackAnimationPoint|GetAttackAnimationPoint}} | |||
| | <code>float GetAttackAnimationPoint()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetAttackCapability|GetAttackCapability}} | |||
| | <code>int GetAttackCapability() </code> | |||
| | 获取单位的攻击力。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetAttackDamage|GetAttackDamage}} | |||
| | <code>int GetAttackDamage()</code> | |||
| | 获取该单位伤害最大值与最小值之间的随机整数。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetAttackRange|GetAttackRange}} | |||
| | <code>float GetAttackRange()</code> | |||
| | 获取单位当前的攻击距离。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetAttackRangeBuffer|GetAttackRangeBuffer}} | |||
| | <code>float GetAttackRangeBuffer()</code> | |||
| | 获取状态增加的攻击距离。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetAttackSpeed|GetAttackSpeed}} | |||
| | <code>float GetAttackSpeed()</code> | |||
| | 获取该单位的攻速。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetAttacksPerSecond|GetAttacksPerSecond}} | |||
| | <code>float GetAttacksPerSecond()</code> | |||
| | 获取APS值(每秒能够打几下)。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetAttackTarget|GetAttackTarget}} | |||
| | <code>handle GetAttackTarget()</code> | |||
| | 返回该单位的攻击目标。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetAverageTrueAttackDamage|GetAverageTrueAttackDamage}} | |||
| | <code>int GetAverageTrueAttackDamage()</code> | |||
| | 获取该单位最大伤害值与最小伤害值的平均数。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetBaseAttackRange|GetBaseAttackRange}} | |||
| | <code>int GetBaseAttackRange()</code> | |||
| | 获取单位的基础攻击距离(修改器不列入计算)。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetBaseAttackTime|GetBaseAttackTime}} | |||
| | <code>float GetBaseAttackTime()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetBaseDamageMax|GetBaseDamageMax}} | |||
| | <code>int GetBaseDamageMax()</code> | |||
| | 获取最大伤害值。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetBaseDamageMin|GetBaseDamageMin}} | |||
| | <code>int GetBaseDamageMin()</code> | |||
| | 获取最小伤害值。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetBaseDayTimeVisionRange|GetBaseDayTimeVisionRange}} | |||
| | <code>int GetBaseDayTimeVisionRange()</code> | |||
| | 获取单位的基础日间视野距离(修改器不列入计算)。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetBaseHealthRegen|GetBaseHealthRegen}} | |||
| | <code>float GetBaseHealthRegen()</code> | |||
| | 获取单位的基础血量恢复值。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetBaseMagicalResistanceValue|GetBaseMagicalResistanceValue}} | |||
| | <code>float GetBaseMagicalResistanceValue()</code> | |||
| | 获取单位的基础魔法抗性值。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetBaseMaxHealth|GetBaseMaxHealth}} | |||
| | <code>float GetBaseMaxHealth()</code> | |||
| | 获取基础血量值。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetBaseMoveSpeed|GetBaseMoveSpeed}} | |||
| | <code>float GetBaseMoveSpeed()</code> | |||
| | 获取基础跑速。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetBaseNightTimeVisionRange|GetBaseNightTimeVisionRange}} | |||
| | <code>int GetBaseNightTimeVisionRange()</code> | |||
| | 获取单位基础的夜间视野距离(修改器不列入计算)。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetCastPoint|GetCastPoint}} | |||
| | <code>float GetCastPoint(bool a)</code> | |||
| | Parameter: bAttack | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetCloneSource|GetCloneSource}} | |||
| | <code>handle GetCloneSource()</code> | |||
| | 获取米波的主身(如果这个单位是米波)。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetCollisionPadding|GetCollisionPadding}} | |||
| | <code>float GetCollisionPadding()</code> | |||
| | 返回该单位的碰撞体积。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetConstantBasedManaRegen|GetConstantBasedManaRegen}} | |||
| | <code>float GetConstantBasedManaRegen()</code> | |||
| | 获取基础的魔力恢复值常数。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetCreationTime|GetCreationTime}} | |||
| | <code>float GetCreationTime()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetCurrentActiveAbility|GetCurrentActiveAbility}} | |||
| | <code>handle GetCurrentActiveAbility()</code> | |||
| | 获取该单位正在使用中的法术。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetCurrentVisionRange|GetCurrentVisionRange}} | |||
| | <code>int GetCurrentVisionRange()</code> | |||
| | 获取当前的视野距离。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetCursorCastTarget|GetCursorCastTarget}} | |||
| | <code>handle GetCursorCastTarget()</code> | |||
| | 获取鼠标指定的施法目标。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetCursorPosition|GetCursorPosition}} | |||
| | <code>Vector GetCursorPosition()</code> | |||
| | 获取鼠标位置。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetCursorTargetingNothing|GetCursorTargetingNothing}} | |||
| | <code>bool GetCursorTargetingNothing()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetDayTimeVisionRange|GetDayTimeVisionRange}} | |||
| | <code>int GetDayTimeVisionRange()</code> | |||
| | 获取该单位的日间视野(将修改器并入计算)。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetDeathXP|GetDeathXP}} | |||
| | <code>int GetDeathXP()</code> | |||
| | 获取该单位的击杀经验值奖赏。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetForceAttackTarget|GetForceAttackTarget}} | |||
| | <code>handle GetForceAttackTarget()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetGoldBounty|GetGoldBounty}} | |||
| | <code>int GetGoldBounty()</code> | |||
| | 获取该单位的击杀金钱奖赏。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetHasteFactor|GetHasteFactor}} | |||
| | <code>float GetHasteFactor()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetHealth|GetHealth}} | |||
| | <code>int GetHealth()</code> | |||
| | 获取该单位的血量。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetHealthDeficit|GetHealthDeficit}} | |||
| | <code>int GetHealthDeficit()</code> | |||
| | 返回损失的血量 (最大血量 - 当前血量)。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetHealthPercent|GetHealthPercent}} | |||
| | <code>int GetHealthPercent()</code> | |||
| | 获取该单位当前的血量百分比。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetHealthRegen|GetHealthRegen}} | |||
| | <code>float GetHealthRegen()</code> | |||
| | 获取该单位当前的血量恢复值。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetHullRadius|GetHullRadius}} | |||
| | <code>float GetHullRadius()</code> | |||
| | 获取该单位的碰撞体积半径。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetIdealSpeed|GetIdealSpeed}} | |||
| | <code>float GetIdealSpeed()</code> | |||
| | 获取该单位的跑速(将修改器并入计算)。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetIncreasedAttackSpeed|GetIncreasedAttackSpeed}} | |||
| | <code>float GetIncreasedAttackSpeed()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetInitialGoalEntity|GetInitialGoalEntity}} | |||
| | <code>handle GetInitialGoalEntity()</code> | |||
| | 返回该单位初始的路径点。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetItemInSlot|GetItemInSlot}} | |||
| | <code>handle GetItemInSlot(int a)</code> | |||
| | 以下标值获取物品栏中的物品。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetLastIdleChangeTime|GetLastIdleChangeTime}} | |||
| | <code>float GetLastIdleChangeTime()</code> | |||
| | 获取该单位最后 进入/离开 闲置状态的时间。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetLevel|GetLevel}} | |||
| | <code>int GetLevel()</code> | |||
| | 返回该单位当前的等级。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetMagicalArmorValue|GetMagicalArmorValue}} | |||
| | <code>float GetMagicalArmorValue()</code> | |||
| | 返回该单位当前的魔法抗性值。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetMainControllingPlayer|GetMainControllingPlayer}} | |||
| | <code>int GetMainControllingPlayer()</code> | |||
| | 返回控制该单位的玩家ID。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetMana|GetMana}} | |||
| | <code>float GetMana()</code> | |||
| | 获取该单位的魔力值。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetManaPercent|GetManaPercent}} | |||
| | <code>int GetManaPercent()</code> | |||
| | 获取该单位的剩余魔力值百分比。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetManaRegen|GetManaRegen}} | |||
| | <code>float GetManaRegen()</code> | |||
| | 获取该单位的魔力恢复值。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetMaxHealth|GetMaxHealth}} | |||
| | <code>int GetMaxHealth()</code> | |||
| | 获取该单位的最大血量。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetMaxMana|GetMaxMana}} | |||
| | <code>float GetMaxMana()</code> | |||
| | 获取该单位的最大魔力。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetMaximumGoldBounty|GetMaximumGoldBounty}} | |||
| | <code>int GetMaximumGoldBounty()</code> | |||
| | 获取击杀该单位所得的最大金钱。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetMaxMana|GetMaxMana}} | |||
| | <code>float GetMaxMana()</code> | |||
| | 获取单位的最大法力值。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetMinimumGoldBounty|GetMinimumGoldBounty}} | |||
| | <code>int GetMinimumGoldBounty()</code> | |||
| | 获取击杀该单位所得的最小金钱。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetModelRadius|GetModelRadius}} | |||
| | <code>float GetModelRadius()</code> | |||
| | 获取模型大小半径。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetModifierCount|GetModifierCount}} | |||
| | <code>int GetModifierCount()</code> | |||
| | 返回该单位所拥有的修改器数量。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetModifierNameByIndex|GetModifierNameByIndex}} | |||
| | <code>string GetModifierNameByIndex(int a)</code> | |||
| | 以下标值索引修改器,并返回修改器名称字符串。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetModifierStackCount|GetModifierStackCount}} | |||
| | <code>int GetModifierStackCount(string modifierName, handle b)</code> | |||
| | Gets the stack count of a given modifier. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetMoveSpeedModifier|GetMoveSpeedModifier}} | |||
| | <code>float GetMoveSpeedModifier(float a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetMustReachEachGoalEntity|GetMustReachEachGoalEntity}} | |||
| | <code>bool GetMustReachEachGoalEntity()</code> | |||
| | 该单位是否被要求走访每个路径点? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetNightTimeVisionRange|GetNightTimeVisionRange}} | |||
| | <code>int GetNightTimeVisionRange()</code> | |||
| | 返回夜间视野距离(将修改器并入计算)。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetOpposingTeamNumber|GetOpposingTeamNumber}} | |||
| | <code>int GetOpposingTeamNumber()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetPaddedCollisionRadius|GetPaddedCollisionRadius}} | |||
| | <code>float GetPaddedCollisionRadius()</code> | |||
| | 获取单位碰撞体积半径。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetPercentageBasedManaRegen|GetPercentageBasedManaRegen}} | |||
| | <code>float GetPercentageBasedManaRegen()</code> | |||
| | 获取基础魔力恢复值百分比。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetPhysicalArmorBaseValue|GetPhysicalArmorBaseValue}} | |||
| | <code>float GetPhysicalArmorBaseValue()</code> | |||
| | 返回基础护甲值。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetPhysicalArmorValue|GetPhysicalArmorValue}} | |||
| | <code>float GetPhysicalArmorValue()</code> | |||
| | 返回当前的护甲值。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetPlayerOwner|GetPlayerOwner}} | |||
| | <code>handle GetPlayerOwner()</code> | |||
| | 获取拥有此单位的玩家实体。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetPlayerOwnerID|GetPlayerOwnerID}} | |||
| | <code>int GetPlayerOwnerID()</code> | |||
| | 获取拥有此单位的玩家ID。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetProjectileSpeed|GetProjectileSpeed}} | |||
| | <code>int GetProjectileSpeed()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetRangeToUnit|GetRangeToUnit}} | |||
| | <code>float GetRangeToUnit(handle a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetSecondsPerAttack|GetSecondsPerAttack}} | |||
| | <code>float GetSecondsPerAttack()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetStatsBasedManaRegen|GetStatsBasedManaRegen}} | |||
| | <code>float GetStatsBasedManaRegen()</code> | |||
| | 获取因智慧而增加的魔法恢复值。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetTeamNumber|GetTeamNumber}} | |||
| | <code>int GetTeamNumber()</code> | |||
| | 获取该单位所属的队伍ID。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetTotalPurchasedUpgradeGoldCost|GetTotalPurchasedUpgradeGoldCost}} | |||
| | <code>int GetTotalPurchasedUpgradeGoldCost()</code> | |||
| | 获取用在升级的金钱。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetUnitLabel|GetUnitLabel}} | |||
| | <code>string GetUnitLabel()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GetUnitName|GetUnitName}} | |||
| | <code>string GetUnitName()</code> | |||
| | 获取单位名称。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.GiveMana|GiveMana}} | |||
| | <code>void GiveMana(float a)</code> | |||
| | 给予此单位指定的魔法值。(Giff me mana!) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.HasAbility|HasAbility}} | |||
| | <code>bool HasAbility(string a)</code> | |||
| | 以技能名称搜寻该单位是否拥有此技能。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.HasAttackCapability|HasAttackCapability}} | |||
| | <code>bool HasAttackCapability()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.HasFlyingVision|HasFlyingVision}} | |||
| | <code>bool HasFlyingVision()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.HasFlyMovementCapability|HasFlyMovementCapability}} | |||
| | <code>bool HasFlyMovementCapability()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.HasGroundMovementCapability|HasGroundMovementCapability}} | |||
| | <code>bool HasGroundMovementCapability()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.HasInventory|HasInventory}} | |||
| | <code>bool HasInventory()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.HasItemInInventory|HasItemInInventory}} | |||
| | <code>bool HasItemInInventory(string a)</code> | |||
| | 以物品名称搜寻该单位是否拥有此物品。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.HasModifier|HasModifier}} | |||
| | <code>bool HasModifier(string a)</code> | |||
| | 以修改器名称搜寻该单位是否拥有此修改器。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.HasMovementCapability|HasMovementCapability}} | |||
| | <code>bool HasMovementCapability()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.HasScepter|HasScepter}} | |||
| | <code>bool HasScepter()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.Heal|Heal}} | |||
| | <code>void Heal(float amount, handle source)</code> | |||
| | 治疗该单位。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.Hold|Hold}} | |||
| | <code>void Hold()</code> | |||
| | 命令单位在原地待命。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.Interrupt|Interrupt}} | |||
| | <code>void Interrupt()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.InterruptChannel|InterruptChannel}} | |||
| | <code>void InterruptChannel()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.InterruptMotionControllers|InterruptMotionControllers}} | |||
| | <code>void InterruptMotionControllers(bool a)</code> | |||
| | Parameter boolean determines finding clear space. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsAlive|IsAlive}} | |||
| | <code>bool IsAlive()</code> | |||
| | 此单位是否还活着? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsAncient|IsAncient}} | |||
| | <code>bool IsAncient()</code> | |||
| | 该生物是否为远古野怪? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsAttackImmune|IsAttackImmune}} | |||
| | <code>bool IsAttackImmune()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsAttacking|IsAttacking}} | |||
| | <code>bool IsAttacking()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsAttackingEntity|IsAttackingEntity}} | |||
| | <code>bool IsAttackingEntity(handle a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsBlind|IsBlind}} | |||
| | <code>bool IsBlind()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsBlockDisabled|IsBlockDisabled}} | |||
| | <code>bool IsBlockDisabled()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsCommandRestricted|IsCommandRestricted}} | |||
| | <code>bool IsCommandRestricted()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsControllableByAnyPlayer|IsControllableByAnyPlayer}} | |||
| | <code>bool IsControllableByAnyPlayer()</code> | |||
| | 该单位是否为非Bot玩家所控制? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsCreature|IsCreature}} | |||
| | <code>bool IsCreature()</code> | |||
| | 此单位是否为怪物类型单位? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsDeniable|IsDeniable}} | |||
| | <code>bool IsDeniable()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsDisarmed|IsDisarmed}} | |||
| | <code>bool IsDisarmed()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsDominated|IsDominated}} | |||
| | <code>bool IsDominated()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsEvadeDisabled|IsEvadeDisabled}} | |||
| | <code>bool IsEvadeDisabled()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsFrozen|IsFrozen}} | |||
| | <code>bool IsFrozen()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsHardDisarmed|IsHardDisarmed}} | |||
| | <code>bool IsHardDisarmed()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsHero|IsHero}} | |||
| | <code>bool IsHero()</code> | |||
| | 此单位是否为英雄或英雄幻象? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsHexed|IsHexed}} | |||
| | <code>bool IsHexed()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsIdle|IsIdle}} | |||
| | <code>bool IsIdle()</code> | |||
| | 该生物是否处于闲置状态? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsIllusion|IsIllusion}} | |||
| | <code>bool IsIllusion()</code> | |||
| | 该单位是否为幻象单位? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsInvisible|IsInvisible}} | |||
| | <code>bool IsInvisible()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsInvulnerable|IsInvulnerable}} | |||
| | <code>bool IsInvulnerable()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsLowAttackPriority|IsLowAttackPriority}} | |||
| | <code>bool IsLowAttackPriority()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsMagicImmune|IsMagicImmune}} | |||
| | <code>bool IsMagicImmune()</code> | |||
| | 该单位是否魔法免疫? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsMechanical|IsMechanical}} | |||
| | <code>bool IsMechanical()</code> | |||
| | 该单位是否为机械单位? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsMovementImpaired|IsMovementImpaired}} | |||
| | <code>bool IsMovementImpaired()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsMuted|IsMuted}} | |||
| | <code>bool IsMuted()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsNeutralUnitType|IsNeutralUnitType}} | |||
| | <code>bool IsNeutralUnitType()</code> | |||
| | 该单位是否为野怪? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsNightmared|IsNightmared}} | |||
| | <code>bool IsNightmared()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsOpposingTeam|IsOpposingTeam}} | |||
| | <code>bool IsOpposingTeam(int a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsOutOfGame|IsOutOfGame}} | |||
| | <code>bool IsOutOfGame()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsOwnedByAnyPlayer|IsOwnedByAnyPlayer}} | |||
| | <code>bool IsOwnedByAnyPlayer()</code> | |||
| | 该单位是否为非Bot之玩家所有? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsPhantom|IsPhantom}} | |||
| | <code>bool IsPhantom()</code> | |||
| | 该单位是否为幻象单位? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsPhantomBlocker|IsPhantomBlocker}} | |||
| | <code>bool IsPhantomBlocker()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsPhased|IsPhased}} | |||
| | <code>bool IsPhased()</code> | |||
| | 是否在相位状态? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsPositionInRange|IsPositionInRange}} | |||
| | <code>bool IsPositionInRange(Vector a, float b)</code> | |||
| | 是否在某点的范围内 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsRangedAttacker|IsRangedAttacker}} | |||
| | <code>bool IsRangedAttacker()</code> | |||
| | 该单位攻击类型是否为远程攻击? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsRealHero|IsRealHero}} | |||
| | <code>bool IsRealHero()</code> | |||
| | 返回该单位是否为真正的英雄单位,而非小兵或是幻象。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsRooted|IsRooted}} | |||
| | <code>bool IsRooted()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsSilenced|IsSilenced}} | |||
| | <code>bool IsSilenced()</code> | |||
| | 该单位是否被沉默? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsSoftDisarmed|IsSoftDisarmed}} | |||
| | <code>bool IsSoftDisarmed()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsSpeciallyDeniable|IsSpeciallyDeniable}} | |||
| | <code>bool IsSpeciallyDeniable()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsStunned|IsStunned}} | |||
| | <code>bool IsStunned()</code> | |||
| | 该单位是否被晕眩了? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsSummoned|IsSummoned}} | |||
| | <code>bool IsSummoned()</code> | |||
| | 此单位是否为召唤物? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsTower|IsTower}} | |||
| | <code>bool IsTower()</code> | |||
| | 此单位是否为塔? | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsUnableToMiss|IsUnableToMiss}} | |||
| | <code>bool IsUnableToMiss()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.IsUnselectable|IsUnselectable}} | |||
| | <code>bool IsUnselectable()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.Kill|Kill}} | |||
| | <code>void Kill(handle a, handle b)</code> | |||
| | 杀死一个单位,参数为使用的技能与攻击者。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.MakeIllusion|MakeIllusion}} | |||
| | <code>void MakeIllusion()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.MakePhantomBlocker|MakePhantomBlocker}} | |||
| | <code>void MakePhantomBlocker()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.MakeVisibleDueToAttack|MakeVisibleDueToAttack}} | |||
| | <code>void MakeVisibleDueToAttack(int a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.MakeVisibleToTeam|MakeVisibleToTeam}} | |||
| | <code>void MakeVisibleToTeam(int a, float b)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.ManageModelChanges|ManageModelChanges}} | |||
| | <code>void ManageModelChanges()</code> | |||
| |  | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.ModifyHealth|ModifyHealth}} | |||
| | <code>void ModifyHealth(int a, handle b, bool c, int d)</code> | |||
| | 设置血量为所指定的值 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.MoveToNPC|MoveToNPC}} | |||
| | <code>void MoveToNPC(handle a)</code> | |||
| | 移动至指定的单位。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.MoveToNPCToGiveItem|MoveToNPCToGiveItem}} | |||
| | <code>void MoveToNPCToGiveItem(handle npc, handle item)</code> | |||
| | 将身上的物品丢给指定的单位。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.MoveToPosition|MoveToPosition}} | |||
| | <code>void MoveToPosition(Vector a)</code> | |||
| | 移动到指定的位置。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.MoveToPositionAggressive|MoveToPositionAggressive}} | |||
| | <code>void MoveToPositionAggressive(Vector a)</code> | |||
| | 移动到指定的位置。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.MoveToTargetToAttack|MoveToTargetToAttack}} | |||
| | <code>void MoveToTargetToAttack(handle a)</code> | |||
| | 移动至指定的单位,并且发动攻击。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.NoHealthBar|NoHealthBar}} | |||
| | <code>bool NoHealthBar()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.NoTeamMoveTo|NoTeamMoveTo}} | |||
| | <code>bool NoTeamMoveTo()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.NoTeamSelect|NoTeamSelect}} | |||
| | <code>bool NoTeamSelect()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.NotifyWearablesOfModelChange|NotifyWearablesOfModelChange}} | |||
| | <code>void NotifyWearablesOfModelChange(bool bOriginalModel) </code> | |||
| | 通知模型的可穿戴性发生了改变。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.NotOnMinimap|NotOnMinimap}} | |||
| | <code>bool NotOnMinimap()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.NotOnMinimapForEnemies|NotOnMinimapForEnemies}} | |||
| | <code>bool NotOnMinimapForEnemies()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.NoUnitCollision|NoUnitCollision}} | |||
| | <code>bool NoUnitCollision()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.PassivesDisabled|PassivesDisabled}} | |||
| | <code>bool PassivesDisabled()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.PerformAttack|PerformAttack}} | |||
| | <code>void PerformAttack(handle hTarget, bool bUseCastAttackOrb, bool bProcessProcs, bool bSkipCooldown, bool bIgnoreInvis, bool bUseProjectile)</code> | |||
| | 对一单位执行攻击。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.PickupDroppedItem|PickupDroppedItem}} | |||
| | <code>void PickupDroppedItem(handle a)</code> | |||
| | 捡起掉落的物品。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.PickupRune|PickupRune}} | |||
| | <code>void PickupRune(handle a)</code> | |||
| | 捡起神符。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.ProvidesVision|ProvidesVision}} | |||
| | <code>bool ProvidesVision()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.Purge|Purge}} | |||
| | <code>void Purge(bool bRemovePositiveBuffs, bool bRemoveDebuffs, bool bFrameOnly, bool bRemoveStuns, bool bRemoveExceptions)</code> | |||
| | (bool RemovePositiveBuffs, bool RemoveDebuffs, bool BuffsCreatedThisFrameOnly, bool RemoveStuns, bool RemoveExceptions 根据增益、减益等一系列条件,清除单位的BUFF。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.ReduceMana|ReduceMana}} | |||
| | <code>void ReduceMana(float a)</code> | |||
| | 移除单位的魔力,不过是用在该单位非自愿失去魔力,而非用在使用技能消耗魔力的情况。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.RemoveAbility|RemoveAbility}} | |||
| | <code>void RemoveAbility(string a)</code> | |||
| | 以技能名称移除该单位相应的技能。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.RemoveGesture|RemoveGesture}} | |||
| | <code>void RemoveGesture(int nActivity)  </code> | |||
| | 移除某个动作。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.RemoveHorizontalMotionController|RemoveHorizontalMotionController}} | |||
| | <code>void RemoveHorizontalMotionController(handle hBuff) </code> | |||
| | 移除水平方向上的运动控制器。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.RemoveItem|RemoveItem}} | |||
| | <code>void RemoveItem(handle a)</code> | |||
| | 将该单位库存中的过期物品移除。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.RemoveModifierByName|RemoveModifierByName}} | |||
| | <code>void RemoveModifierByName(string a)</code> | |||
| | 以名称移除修改器。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.RemoveModifierByNameAndCaster|RemoveModifierByNameAndCaster}} | |||
| | <code>void RemoveModifierByNameAndCaster(string a, handle b)</code> | |||
| | 以施法者与修改器名称移除修改器。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.RemoveNoDraw|RemoveNoDraw}} | |||
| | <code>void RemoveNoDraw()</code> | |||
| | Remove the no draw flag. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.RemoveVerticalMotionController|RemoveVerticalMotionController}} | |||
| | <code>void RemoveVerticalMotionController(handle hBuff)</code> | |||
| | 移除垂直方向上的运动控制器。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.RespawnUnit|RespawnUnit}} | |||
| | <code>void RespawnUnit()</code> | |||
| | 复活该单位。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.TakeItem|TakeItem}} | |||
| | <code>void TakeItem(handle hItem) </code> | |||
| | 隐藏物品 | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SellItem|SellItem}} | ||
| | <code> | | <code>void SellItem(handle a)</code> | ||
| |  | | 卖出该单位的物品。 | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetAbilityByIndex|SetAbilityByIndex}} | |||
| | <code>void SetAbilityByIndex(handle hAbility, int iIndex) </code> | |||
| | 改变技能Index | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetAcquisitionRange|SetAcquisitionRange}} | ||
| | <code>int  | | <code>void SetAcquisitionRange(float a)</code> | ||
| |  | | Sets acquisition range | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetAdditionalBattleMusicWeight|SetAdditionalBattleMusicWeight}} | |||
| | <code>void SetAdditionalBattleMusicWeight(float a)</code> | |||
| | 获取当与该单位战斗时将会计算的战斗音乐权重。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetAggroTarget|SetAggroTarget}} | |||
| | <code>void SetAggroTarget(handle hAggroTarget)</code> | |||
| | 将这个单位的仇恨目标设为某个单位。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetAttackCapability|SetAttackCapability}} | |||
| | <code>void SetAttackCapability(int a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetAttacking|SetAttacking}} | |||
| | <code>void SetAttacking(handle a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetBaseAttackTime|SetBaseAttackTime}} | |||
| | <code>void SetBaseAttackTime(float a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetBaseDamageMax|SetBaseDamageMax}} | |||
| | <code>void SetBaseDamageMax(int a)</code> | |||
| | 设置基础最大攻击力。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetBaseDamageMin|SetBaseDamageMin}} | |||
| | <code>void SetBaseDamageMin(int a)</code> | |||
| | 设置基础最小攻击力。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetBaseHealthRegen|SetBaseHealthRegen}} | |||
| | <code>void SetBaseHealthRegen(float a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetBaseMagicalResistanceValue|SetBaseMagicalResistanceValue}} | |||
| | <code>void SetBaseMagicalResistanceValue(float a)</code> | |||
| | 设置基础魔法抗性值。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetBaseManaRegen|SetBaseManaRegen}} | |||
| | <code>void SetBaseManaRegen(float a)</code> | |||
| | 设置基础魔力恢复值。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetBaseMaxHealth|SetBaseMaxHealth}} | |||
| | <code>void SetBaseMaxHealth(float a)</code> | |||
| | 设置基础最大血量。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetBaseMoveSpeed|SetBaseMoveSpeed}} | |||
| | <code>void SetBaseMoveSpeed(int a)</code> | |||
| | 设置基础跑速。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetCanSellItems|SetCanSellItems}} | |||
| | <code>void SetCanSellItems(bool bCanSell)</code> | |||
| | 设置这个单位是否能出售物品。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetControllableByPlayer|SetControllableByPlayer}} | |||
| | <code>void SetControllableByPlayer(int a, bool b)</code> | |||
| | 以玩家ID设置该单位的控制权。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetCursorCastTarget|SetCursorCastTarget}} | |||
| | <code>void SetCursorCastTarget(handle a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetCursorPosition|SetCursorPosition}} | |||
| | <code>void SetCursorPosition(Vector a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetCursorTargetingNothing|SetCursorTargetingNothing}} | |||
| | <code>void SetCursorTargetingNothing(bool a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetDayTimeVisionRange|SetDayTimeVisionRange}} | |||
| | <code>void SetDayTimeVisionRange(int a)</code> | |||
| | 设置基础的视间视野距离。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetDeathXP|SetDeathXP}} | |||
| | <code>void SetDeathXP(int a)</code> | |||
| | 设置该单位的击杀经验值奖赏。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetDeathXP|SetDeathXP}} | |||
| | <code>void SetDeathXP(int iXPBounty)</code> | |||
| | Set the XP bounty on this unit | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetForceAttackTarget|SetForceAttackTarget}} | |||
| | <code>void SetForceAttackTarget(handle a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetHasInventory|SetHasInventory}} | |||
| | <code>void SetHasInventory(bool a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetHullRadius|SetHullRadius}} | |||
| | <code>void SetHullRadius(float a)</code> | |||
| | 设置该单位的碰撞半径。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetIdleAcquire|SetIdleAcquire}} | |||
| | <code>void SetIdleAcquire(bool a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetInitialGoalEntity|SetInitialGoalEntity}} | |||
| | <code>void SetInitialGoalEntity(handle a)</code> | |||
| | 设置该单位的初始路径点。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetMana|SetMana}} | |||
| | <code>void SetMana(float a)</code> | |||
| | 设置该单位的魔力值。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetMaximumGoldBounty|SetMaximumGoldBounty}} | |||
| | <code>void SetMaximumGoldBounty(int a)</code> | |||
| | 设置该单位的最高赏金。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetMinimumGoldBounty|SetMinimumGoldBounty}} | |||
| | <code>void SetMinimumGoldBounty(int a)</code> | |||
| | 设置该单位的最低赏金。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetModifierStackCount|SetModifierStackCount}} | |||
| | <code>void SetModifierStackCount(string modifierName, handle b, int modifierCount)</code> | |||
| | Sets the stack count of a given modifier. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetMoveCapability|SetMoveCapability}} | |||
| | <code>void SetMoveCapability(int a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetMustReachEachGoalEntity|SetMustReachEachGoalEntity}} | |||
| | <code>void SetMustReachEachGoalEntity(bool a)</code> | |||
| | 设置该单位是否要走访每个路径点。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetNeverMoveToClearSpace|SetNeverMoveToClearSpace}} | |||
| | <code>void SetNeverMoveToClearSpace(bool a)</code> | |||
| | 如果设置为True,则不会将该单位移动到净空的地方。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetNightTimeVisionRange|SetNightTimeVisionRange}} | |||
| | <code>void SetNightTimeVisionRange(int a)</code> | |||
| | 设置基础夜间视野距离。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetOrigin|SetOrigin}} | |||
| | <code>void SetOrigin(Vector vLocation)</code> | |||
| | 设置单位位置。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetOriginalModel|SetOriginalModel}} | |||
| | <code>void SetOriginalModel(string originalModel)</code> | |||
| | 设置单位原模型。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetPhysicalArmorBaseValue|SetPhysicalArmorBaseValue}} | |||
| | <code>void SetPhysicalArmorBaseValue(float a)</code> | |||
| | 设置基础护甲值。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetRangedProjectileName|SetRangedProjectileName}} | |||
| | <code>void SetRangedProjectileName(string a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetRenderAlpha|SetRenderAlpha}} | |||
| | <code>void SetRenderAlpha( int alpha ) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetStolenScepter|SetStolenScepter}} | ||
| | <code>handle  | | <code>void SetStolenScepter(bool a)</code> | ||
| |  | | No Description Set | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SetUnitName|SetUnitName}} | |||
| | <code>void SetUnitName(string a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.ShouldIdleAcquire|ShouldIdleAcquire}} | |||
| | <code>bool ShouldIdleAcquire()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SpendMana|SpendMana}} | |||
| | <code>void SpendMana(float a, handle b)</code> | |||
| | 消耗魔力,可以用在技能消耗或使用物品。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.StartGesture|StartGesture}} | |||
| | <code>void StartGesture(int nActivity)</code> | |||
| | 向单位添加给定的动作。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.StartGestureWithPlaybackRate|StartGestureWithPlaybackRate}} | |||
| | <code>void StartGestureWithPlaybackRate(int nActivity, float flRate ) </code> | |||
| | 向单位添加给定的动作,带有自定义的动作速度。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.Stop|Stop}} | |||
| | <code>void Stop()</code> | |||
| | 使该单位暂停当前动作。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SwapAbilities|SwapAbilities}} | |||
| | <code>void SwapAbilities(string a, string b, bool c, bool d)</code> | |||
| | 交换两个技能的字段,并设置其是否生效。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.SwapItems|SwapItems}} | |||
| | <code>void SwapItems(int nSlot1, int nSlot2)</code> | |||
| | 交换两个物品的位置。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.TimeUntilNextAttack|TimeUntilNextAttack}} | |||
| | <code>float TimeUntilNextAttack()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.TriggerModifierDodge|TriggerModifierDodge}} | |||
| | <code>bool TriggerModifierDodge()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.TriggerSpellAbsorb|TriggerSpellAbsorb}} | |||
| | <code>bool TriggerSpellAbsorb(handle a)</code> | |||
| | 判断传递的技能是否会触发该单位的技能吸收 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.TriggerSpellReflect|TriggerSpellReflect}} | |||
| | <code>void TriggerSpellReflect(handle hAbility)</code> | |||
| | 触发类似于清莲宝珠一样的效果。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC.UnitCanRespawn|UnitCanRespawn}} | |||
| | <code>bool UnitCanRespawn()</code> | |||
| | No Description Set | |||
| |} | |||
| === CDOTA_BaseNPC_Hero === | |||
| :::::extends [[#CDOTA_BaseNPC| CDOTA_BaseNPC]] | |||
| '''' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.AddExperience|AddExperience}} | ||
| | <code>int  | | <code>bool AddExperience(float amount, bool applyBotDifficultyScaling)</code> | ||
| |  | | 给单位增加经验值 | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.Buyback|Buyback}} | |||
| | <code>void Buyback()</code> | |||
| | 花费金钱并买活英雄 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.CalculateStatBonus|CalculateStatBonus}} | |||
| | <code>void CalculateStatBonus()</code> | |||
| | 英雄返回属性后,重新计算全部属性 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.CanEarnGold|CanEarnGold}} | |||
| | <code>bool CanEarnGold()</code> | |||
| | 返回布尔值,买活返回金钱限制时间是否少于游戏时间(其实就是是否能够正常返回金钱.....) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.ClearLastHitMultikill|ClearLastHitMultikill}} | |||
| | <code>void ClearLastHitMultikill()</code> | |||
| | 数值存储在玩家资源(PlayerResource)中 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.ClearLastHitStreak|ClearLastHitStreak}} | |||
| | <code>void ClearLastHitStreak()</code> | |||
| | 数值存储在玩家资源(PlayerResource)中 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.ClearStreak|ClearStreak}} | |||
| | <code>void ClearStreak()</code> | |||
| | 数值存储在玩家资源(PlayerResource)中 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetAbilityPoints|GetAbilityPoints}} | |||
| | <code>int GetAbilityPoints()</code> | |||
| | 返回未分配的技能点数 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetAdditionalOwnedUnits|GetAdditionalOwnedUnits}} | |||
| | <code>table GetAdditionalOwnedUnits()</code> | |||
| | 返回玩家拥有的额外单位 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetAgility|GetAgility}} | |||
| | <code>float GetAgility()</code> | |||
| | 返回敏捷值 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetAgilityGain|GetAgilityGain}} | |||
| | <code>float GetAgilityGain()</code> | |||
| | 返回敏捷成长 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetAssists|GetAssists}} | |||
| | <code>int GetAssists()</code> | |||
| | 返回助攻数,数值存储在玩家资源(PlayerResource)中 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetAttacker|GetAttacker}} | |||
| | <code>int GetAttacker(int a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetBaseAgility|GetBaseAgility}} | |||
| | <code>float GetBaseAgility()</code> | |||
| | 返回基础敏捷 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetBaseDamageMax|GetBaseDamageMax}} | |||
| | <code>int GetBaseDamageMax()</code> | |||
| | 返回基础攻击伤害最大值,英雄的基础攻击伤害也会受到属性影响 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetBaseDamageMin|GetBaseDamageMin}} | |||
| | <code>int GetBaseDamageMin()</code> | |||
| | 返回基础攻击伤害最小值,英雄的基础攻击伤害也会受到属性影响 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetBaseIntellect|GetBaseIntellect}} | |||
| | <code>float GetBaseIntellect()</code> | |||
| | 返回基础智力 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetBaseStrength|GetBaseStrength}} | |||
| | <code>float GetBaseStrength()</code> | |||
| | 返回基础力量 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetBonusDamageFromPrimaryStat|GetBonusDamageFromPrimaryStat}} | |||
| | <code>int GetBonusDamageFromPrimaryStat()</code> | |||
| | 返回来自主属性奖励的攻击伤害值 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetBuybackCooldownTime|GetBuybackCooldownTime}} | |||
| | <code>float GetBuybackCooldownTime()</code> | |||
| | 返回该英雄买活CD的剩余时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetBuybackCost|GetBuybackCost}} | |||
| | <code>int GetBuybackCost()</code> | |||
| | 返回买活所需金钱 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetBuybackGoldLimitTime|GetBuybackGoldLimitTime}} | |||
| | <code>float GetBuybackGoldLimitTime()</code> | |||
| | 返回买活所带来的金钱惩罚剩余时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetCurrentXP|GetCurrentXP}} | |||
| | <code>int GetCurrentXP()</code> | |||
| | 返回当前经验值 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetDeathGoldCost|GetDeathGoldCost}} | |||
| | <code>int GetDeathGoldCost()</code> | |||
| | 返回死亡损失金钱 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetDeaths|GetDeaths}} | |||
| | <code>int GetDeaths()</code> | |||
| | 返回死亡次数 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetDenies|GetDenies}} | |||
| | <code>int GetDenies()</code> | |||
| | 返回反补次数 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetGold|GetGold}} | |||
| | <code>int GetGold()</code> | |||
| | 返回该英雄拥有者所有的金钱数量 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetGoldBounty|GetGoldBounty}} | |||
| | <code>int GetGoldBounty()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetHealthRegen|GetHealthRegen}} | |||
| | <code>float GetHealthRegen()</code> | |||
| | 返回每秒生命回复,英雄生命回复受到属性影响 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetIncreasedAttackSpeed|GetIncreasedAttackSpeed}} | |||
| | <code>float GetIncreasedAttackSpeed()</code> | |||
| | 返回攻击速度增加值(IAS),英雄攻击速度受到敏捷影响 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetIntellect|GetIntellect}} | |||
| | <code>float GetIntellect()</code> | |||
| | 返回智力值 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetIntellectGain|GetIntellectGain}} | |||
| | <code>float GetIntellectGain()</code> | |||
| | 返回智力成长 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetKills|GetKills}} | |||
| | <code>int GetKills()</code> | |||
| | 返回击杀数,数值存储在玩家资源(PlayerResource)中 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetLastHits|GetLastHits}} | |||
| | <code>int GetLastHits()</code> | |||
| | 返回正补数,数值存储在玩家资源(PlayerResource)中 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetManaRegen|GetManaRegen}} | |||
| | <code>float GetManaRegen()</code> | |||
| | 返回每秒魔法回复,英雄魔法回复受到属性影响 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetMostRecentDamageTime|GetMostRecentDamageTime}} | |||
| | <code>float GetMostRecentDamageTime()</code> | |||
| | 返回最近一次伤害时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetMultipleKillCount|GetMultipleKillCount}} | |||
| | <code>int GetMultipleKillCount()</code> | |||
| | 返回多杀计数 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetNumAttackers|GetNumAttackers}} | |||
| | <code>int GetNumAttackers()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetNumItemsInInventory|GetNumItemsInInventory}} | |||
| | <code>int GetNumItemsInInventory()</code> | |||
| | 返回玩家拥有的物品数量。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetNumItemsInStash|GetNumItemsInStash}} | |||
| | <code>int GetNumItemsInStash()</code> | |||
| | 返回玩家储藏处内 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetPhysicalArmorValue|GetPhysicalArmorValue}} | |||
| | <code>float GetPhysicalArmorValue()</code> | |||
| | 返回护甲值,英雄护甲受到属性影响 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetPlayerID|GetPlayerID}} | |||
| | <code>int GetPlayerID()</code> | |||
| | 返回英雄拥有者的ID | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetPrimaryAttribute|GetPrimaryAttribute}} | |||
| | <code>int GetPrimaryAttribute()</code> | |||
| | 返回英雄主要属性,0 = 力量, 1 = 敏捷, 2 = 智力. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetPrimaryStatValue|GetPrimaryStatValue}} | |||
| | <code>float GetPrimaryStatValue()</code> | |||
| | 返回主属性值 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetRespawnsDisabled|GetRespawnsDisabled}} | |||
| | <code>bool GetRespawnsDisabled()</code> | |||
| | 返回该英雄是否被禁止复活。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetRespawnTime|GetRespawnTime}} | |||
| | <code>float GetRespawnTime()</code> | |||
| | 返回复活时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetStatsBasedManaRegen|GetStatsBasedManaRegen}} | |||
| | <code>float GetStatsBasedManaRegen()</code> | |||
| | 返回属性提供的魔法回复 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetStreak|GetStreak}} | |||
| | <code>int GetStreak()</code> | |||
| | 返回连杀数 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetStrength|GetStrength}} | |||
| | <code>float GetStrength()</code> | |||
| | 返回力量值 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetStrengthGain|GetStrengthGain}} | |||
| | <code>float GetStrengthGain()</code> | |||
| | 返回力量成长 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetTimeUntilRespawn|GetTimeUntilRespawn}} | |||
| | <code>float GetTimeUntilRespawn()</code> | |||
| | 返回复活所需的时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.GetTogglableWearable|GetTogglableWearable}} | |||
| | <code>handle GetTogglableWearable(int nSlotType)</code> | |||
| | 返回物品栏中可佩带(可切换)的物品。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.HasAnyAvailableInventorySpace|HasAnyAvailableInventorySpace}} | |||
| | <code>bool HasAnyAvailableInventorySpace()</code> | |||
| | 返回是否有可用物品栏空间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.HasFlyingVision|HasFlyingVision}} | |||
| | <code>bool HasFlyingVision()</code> | |||
| | 返回是否拥有空中视野 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.HasOwnerAbandoned|HasOwnerAbandoned}} | |||
| | <code>bool HasOwnerAbandoned()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.HasRoomForItem|HasRoomForItem}} | |||
| | <code>int HasRoomForItem(string a, bool b, bool c)</code> | |||
| | 参数: const char pItemName, bool bIncludeStashCombines, bool bAllowSelling | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.HeroLevelUp|HeroLevelUp}} | |||
| | <code>void HeroLevelUp(bool a)</code> | |||
| | 升级英雄, 参数决定是否播放升级效果. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.IncrementAssists|IncrementAssists}} | |||
| | <code>void IncrementAssists()</code> | |||
| | 数值存储在玩家资源(PlayerResource)中 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.IncrementDeaths|IncrementDeaths}} | |||
| | <code>void IncrementDeaths()</code> | |||
| | 数值存储在玩家资源(PlayerResource)中 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.IncrementDenies|IncrementDenies}} | |||
| | <code>void IncrementDenies()</code> | |||
| | 数值存储在玩家资源(PlayerResource)中 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.IncrementKills|IncrementKills}} | |||
| | <code>void IncrementKills(int kills)</code> | |||
| | 增加击杀数,击杀者为当前英雄,传入ID为受害者ID。数值存储在玩家资源(PlayerResource)中 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.IncrementLastHitMultikill|IncrementLastHitMultikill}} | |||
| | <code>void IncrementLastHitMultikill()</code> | |||
| | 数值存储在玩家资源(PlayerResource)中 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.IncrementLastHits|IncrementLastHits}} | |||
| | <code>void IncrementLastHits()</code> | |||
| | 数值存储在玩家资源(PlayerResource)中 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.IncrementLastHitStreak|IncrementLastHitStreak}} | |||
| | <code>void IncrementLastHitStreak()</code> | |||
| | 数值存储在玩家资源(PlayerResource)中 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.IncrementNearbyCreepDeaths|IncrementNearbyCreepDeaths}} | |||
| | <code>void IncrementNearbyCreepDeaths()</code> | |||
| | 数值存储在玩家资源(PlayerResource)中 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.IncrementStreak|IncrementStreak}} | |||
| | <code>void IncrementStreak()</code> | |||
| | 数值存储在玩家资源(PlayerResource)中 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.IsBuybackDisabledByReapersScythe|IsBuybackDisabledByReapersScythe}} | |||
| | <code>bool IsBuybackDisabledByReapersScythe()</code> | |||
| | 是否被死神镰刀禁止买活 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.IsReincarnating|IsReincarnating}} | |||
| | <code>bool IsReincarnating()</code> | |||
| | 是否处于重生中 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.KilledHero|KilledHero}} | |||
| | <code>void KilledHero(handle a, handle b)</code> | |||
| | 参数: 英雄, 加害者 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.ModifyAgility|ModifyAgility}} | |||
| | <code>void ModifyAgility(float a)</code> | |||
| | 增加指定值到英雄基础敏捷,随后调用CalculateStatBonus | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.ModifyGold|ModifyGold}} | |||
| | <code>int ModifyGold(int goldAmmt, bool reliable, int reason)</code> | |||
| | 给予英雄金钱。参数: int 金钱数, bool 是否为可靠金钱, int 原因 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.ModifyIntellect|ModifyIntellect}} | |||
| | <code>void ModifyIntellect(float a)</code> | |||
| | 增加指定值到英雄基础智力,随后调用CalculateStatBonus | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.ModifyStrength|ModifyStrength}} | |||
| | <code>void ModifyStrength(float a)</code> | |||
| | 增加指定值到英雄基础力量,随后调用CalculateStatBonus | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.PerformTaunt|PerformTaunt}} | |||
| | <code>void PerformTaunt()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.RecordLastHit|RecordLastHit}} | |||
| | <code>void RecordLastHit()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.RespawnHero|RespawnHero}} | |||
| | <code>void RespawnHero(bool buyback, bool IsActuallyBeingSpawnedForTheFirstTime, bool RespawnPenalty)</code> | |||
| |  | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.SetAbilityPoints|SetAbilityPoints}} | |||
| | <code>void SetAbilityPoints(int a)</code> | |||
| | 设置当前可用技能点 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.SetBaseAgility|SetBaseAgility}} | |||
| | <code>void SetBaseAgility(float a)</code> | |||
| | 设置基础敏捷 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.SetBaseIntellect|SetBaseIntellect}} | |||
| | <code>void SetBaseIntellect(float a)</code> | |||
| | 设置基础智力 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.SetBaseStrength|SetBaseStrength}} | |||
| | <code>void SetBaseStrength(float a)</code> | |||
| | 设置基础力量 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.SetBotDifficulty|SetBotDifficulty}} | |||
| | <code>void SetBotDifficulty(int nDifficulty)</code> | |||
| | 设置人机对战的难度。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.SetBuybackCooldownTime|SetBuybackCooldownTime}} | |||
| | <code>void SetBuybackCooldownTime(float a)</code> | |||
| | 设置买活冷却时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.SetBuyBackDisabledByReapersScythe|SetBuyBackDisabledByReapersScythe}} | |||
| | <code>void SetBuyBackDisabledByReapersScythe(bool a)</code> | |||
| | 设置是否被死神镰刀禁止买活 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.SetBuybackGoldLimitTime|SetBuybackGoldLimitTime}} | |||
| | <code>void SetBuybackGoldLimitTime(float a)</code> | |||
| | 设置买活后金钱惩罚时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.SetCustomDeathXP|SetCustomDeathXP}} | |||
| | <code>void SetCustomDeathXP(int a)</code> | |||
| | GameRules boolean must be set for this to work!}} | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.SetGold|SetGold}} | |||
| | <code>void SetGold(int amount, bool reliableGold)</code> | |||
| | 设置英雄拥有者的金钱 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.SetPlayerID|SetPlayerID}} | |||
| | <code>void SetPlayerID(int a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.SetPrimaryAttribute|SetPrimaryAttribute}} | |||
| | <code>void SetPrimaryAttribute(int nPrimaryAttribute)</code> | |||
| | 设置英雄的主属性值。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.SetRespawnPosition|SetRespawnPosition}} | |||
| | <code>void SetRespawnPosition(Vector a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.SetRespawnsDisabled|SetRespawnsDisabled}} | |||
| | <code>void SetRespawnsDisabled(bool bDisableRespawns)</code> | |||
| | 禁止英雄复活。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.SetTimeUntilRespawn|SetTimeUntilRespawn}} | |||
| | <code>void SetTimeUntilRespawn(float a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.ShouldDoFlyHeightVisual|ShouldDoFlyHeightVisual}} | |||
| | <code>bool ShouldDoFlyHeightVisual()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.SpendGold|SpendGold}} | |||
| | <code>void SpendGold(int amount, int reason)</code> | |||
| | 参数: int 金钱, int 原因 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.UnitCanRespawn|UnitCanRespawn}} | |||
| | <code>bool UnitCanRespawn()</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.UpgradeAbility|UpgradeAbility}} | |||
| | <code>void UpgradeAbility(handle a)</code> | |||
| | 升级指定技能,需要英雄拥有该技能和技能点 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.WillReincarnate|WillReincarnate}} | |||
| | <code>bool WillReincarnate()</code> | |||
| | No Description Set | |||
| |} | |||
| === CDOTA_BaseNPC_Creature === | |||
| :::::extends [[#CDOTA_BaseNPC| CDOTA_BaseNPC]] | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Creature.AddItemDrop|AddItemDrop}} | ||
| |  | |||
| | <code>void AddItemDrop(handle a) </code> | |||
| | 为该生物添加特别的道具掉落 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Creature.CreatureLevelUp|CreatureLevelUp}} | ||
| |  | |||
| | <code>void CreatureLevelUp(int a) </code> | |||
| | 升级目标生物指定级别 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Creature.IsChampion|IsChampion}} | ||
| |  | |||
| | <code>bool IsChampion() </code> | |||
| | 是否为冠军生物 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Creature.SetArmorGain|SetArmorGain}} | ||
| |  | |||
| | <code>void SetArmorGain(float a) </code> | |||
| | 设置该生物每级增加的护甲 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Creature.SetAttackTimeGain|SetAttackTimeGain}} | ||
| |  | |||
| | <code>void SetAttackTimeGain(float a) </code> | |||
| | 设置该生物每级增加的攻击速度 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Creature.SetBountyGain|SetBountyGain}} | ||
| |  | |||
| | <code>void SetBountyGain(int a) </code> | |||
| | 设置该生物每级增加的奖励金币 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Creature.SetChampion|SetChampion}} | ||
| |  | |||
| | <code>void SetChampion(bool a) </code> | |||
| | 将该生物标记为冠军生物 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Creature.SetDamageGain|SetDamageGain}} | ||
| |  | |||
| | <code>void SetDamageGain(int a) </code> | |||
| | 设置该生物每级增加的攻击伤害 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Creature.SetDisableResistanceGain|SetDisableResistanceGain}} | ||
| |  | |||
| | <code>void SetDisableResistanceGain(float a) </code> | |||
| | 设置该生物每级增加的控制抗性 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Creature.SetHPGain|SetHPGain}} | ||
| |  | |||
| | <code>void SetHPGain(int a) </code> | |||
| | 设置该生物每级增加的生命值 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Creature.SetHPRegenGain|SetHPRegenGain}} | ||
| |  | |||
| | <code>void SetHPRegenGain(float a) </code> | |||
| | 设置该生物每级增加的生命回复 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Creature.SetMagicResistanceGain|SetMagicResistanceGain}} | ||
| |  | |||
| | <code>void SetMagicResistanceGain(float a) </code> | |||
| | 设置该生物每级增加的魔法抗性 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Creature.SetManaGain|SetManaGain}} | ||
| |  | |||
| | <code>void SetManaGain(int a) </code> | |||
| | 设置该生物每级增加的魔法值 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Creature.SetManaRegenGain|SetManaRegenGain}} | ||
| |  | |||
| | <code>void SetManaRegenGain(float a) </code> | |||
| | 设置该生物每级增加的魔法回复 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Creature.SetMoveSpeedGain|SetMoveSpeedGain}} | ||
| |  | |||
| | <code>void SetMoveSpeedGain(int a) </code> | |||
| | 设置该生物每级增加的移动速度 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Creature.SetXPGain|SetXPGain}} | ||
| |  | |||
| | <code>void SetXPGain(int a) </code> | |||
| | 设置该生物每级增加的经验值 | |||
| |} | |||
| === CDOTA_BaseNPC_Building === | |||
| :::::extends [[#CDOTA_BaseNPC| CDOTA_BaseNPC]] | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Building.GetInvulnCount|GetInvulnCount}} | ||
| | <code>int GetInvulnCount() </code> | |||
| | 返回建筑无敌计数 | |||
| |  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Building.SetInvulnCount|SetInvulnCount}} | ||
| |  | |||
| | <code>void SetInvulnCount(int a) </code> | |||
| | 设置建筑无敌计数 | |||
| |} | |||
| === CRPG_Unit === | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.ActionState|ActionState}} | ||
| |  | |||
| | <code>handle ActionState() </code> | |||
| | 返回该单位的ActionState物体 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.ClearMovementTarget|ClearMovementTarget}} | ||
| |  | |||
| | <code>void ClearMovementTarget() </code> | |||
| | 清除移动目标实体或点 | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.FindSensedEnemies|FindSensedEnemies}} | |||
| |  | |||
| | | | <code>table FindSensedEnemies() </code> | ||
| | <code> | | 返回该单位视野锥或感应球体内所有敌方单位列表 | ||
| |  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.GetMaxSpeed|GetMaxSpeed}} | ||
| |  | |||
| | <code>float GetMaxSpeed() </code> | |||
| | 返回最大移动速度 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.GetMaxStamina|GetMaxStamina}} | ||
| |  | |||
| | <code>float GetMaxStamina() </code> | |||
| | 返回最大耐力值 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.GetMovementTargetEntity|GetMovementTargetEntity}} | ||
| |  | |||
| | <code>handle GetMovementTargetEntity() </code> | |||
| | 返回移动目标实体,如果已经设置移动目标实体 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.GetSensingSphereRange|GetSensingSphereRange}} | ||
| |  | |||
| | <code>float GetSensingSphereRange() </code> | |||
| | 返回单位的360度感应球体范围 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.GetSightConeAngle|GetSightConeAngle}} | ||
| |  | |||
| | <code>float GetSightConeAngle() </code> | |||
| | 返回单位视野锥的夹角 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.GetSightConeRange|GetSightConeRange}} | ||
| |  | |||
| | <code>float GetSightConeRange() </code> | |||
| | 返回单位视野锥的范围 | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.GetStamina|GetStamina}} | |||
| |  | |||
| | | | <code>float GetStamina() </code> | ||
| | <code>float  | | 返回当前耐力值 | ||
| |  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.GetTurnRate|GetTurnRate}} | ||
| |  | |||
| | <code>float GetTurnRate() </code> | |||
| | 返回单位转身速度,单位为度每秒 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.GetUnitName|GetUnitName}} | ||
| |  | |||
| | <code>string GetUnitName() </code> | |||
| | 返回单位名字 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.GrantItem|GrantItem}} | ||
| |  | |||
| | <code>void GrantItem(string a, bool b) </code> | |||
| | 授予单位物品 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.IsBlocking|IsBlocking}} | ||
| |  | |||
| | <code>bool IsBlocking() </code> | |||
| | 单位是否正在格挡(不确定) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.IsFacing|IsFacing}} | ||
| |  | |||
| | <code>bool IsFacing(Vector a, float b) </code> | |||
| | 参数为(Vector目标点,float允许角度差)如果单位朝向目标角度低于角度差则返还true | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.SetBlocking|SetBlocking}} | ||
| |  | |||
| | <code>void SetBlocking(bool a) </code> | |||
| | 设置单位格挡状态(不确定) | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.SetMaxSpeed|SetMaxSpeed}} | ||
| |  | |||
| | <code>void SetMaxSpeed(float a) </code> | |||
| | 设置单位最大速度 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.SetMovementTargetEntity|SetMovementTargetEntity}} | ||
| |  | |||
| | <code>void SetMovementTargetEntity(handle a, float b) </code> | |||
| | 参数为(目标实体,跟随范围)单位向目标实体移动直到抵达指定范围内 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.SetMovementTargetPosition|SetMovementTargetPosition}} | ||
| |  | |||
| | <code>void SetMovementTargetPosition(Vector a, float b) </code> | |||
| | 参数为(目标点,跟随范围)单位向目标点移动直到抵达指定范围内 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.SetSensingSphereRange|SetSensingSphereRange}} | ||
| |  | |||
| | <code>void SetSensingSphereRange(float a) </code> | |||
| | 设置单位的360度感应球体范围 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.SetSightConeAngle|SetSightConeAngle}} | ||
| |  | |||
| | <code>void SetSightConeAngle(float a) </code> | |||
| | 设置单位的视野锥夹角 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.SetSightConeRange|SetSightConeRange}} | ||
| |  | |||
| | <code>void SetSightConeRange(float a) </code> | |||
| | 设置单位的视野锥范围 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.SetTurnRate|SetTurnRate}} | ||
| |  | |||
| | | | <code>void SetTurnRate(float a) </code> | ||
| | 设置单位转向速率(度每秒) | |||
| |} | |||
| |- | |||
| === CDOTABaseGameMode === | |||
| :::::extends [[#CBaseEntity| CBaseEntity]] | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.ClearAbilityTuningValueFilter|ClearAbilityTuningValueFilter}} | ||
| | <code>void  | | <code>void ClearAbilityTuningValueFilter()</code> | ||
| |  | | 清除脚本过滤器--有关技能中所用到的调整值的 | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.ClearBountyRunePickupFilter|ClearBountyRunePickupFilter}} | |||
| | <code>void ClearBountyRunePickupFilter()</code> | |||
| | 清除脚本过滤器--控制触发赏金符时的行为的 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.ClearDamageFilter|ClearDamageFilter}} | |||
| | <code>void ClearDamageFilter()</code> | |||
| | 清除脚本过滤器--控制单位造成伤害 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.ClearExecuteOrderFilter|ClearExecuteOrderFilter}} | |||
| | <code>void ClearExecuteOrderFilter()</code> | |||
| | 清除脚本过滤器--在单位捡起物品时生效的 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.ClearItemAddedToInventoryFilter|ClearItemAddedToInventoryFilter}} | |||
| | <code>void ClearItemAddedToInventoryFilter() </code> | |||
| | 清除脚本过滤器--在物品放入物品栏时生效的 | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.ClearModifierGainedFilter|ClearModifierGainedFilter}} | ||
| | <code>void  | | <code>void ClearModifierGainedFilter()</code> | ||
| |  | | 清除脚本过滤器--控制Modifier控制器的 | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.ClearModifyExperienceFilter|ClearModifyExperienceFilter}} | |||
| | <code>void ClearModifyExperienceFilter()</code> | |||
| | 清除脚本过滤器--控制单位的经验机制的 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.ClearModifyGoldFilter|ClearModifyGoldFilter}} | |||
| | <code>void ClearModifyGoldFilter()</code> | |||
| | 清除脚本过滤器--控制英雄金钱机制的 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.ClearRuneSpawnFilter|ClearRuneSpawnFilter}} | |||
| | <code>void ClearRuneSpawnFilter()</code> | |||
| | 清除脚本过滤器--控制神符刷新的 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.ClearTrackingProjectileFilter|ClearTrackingProjectileFilter}} | |||
| | <code>void ClearTrackingProjectileFilter()</code> | |||
| | 清除脚本过滤器--控制追踪投射物的 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.ClientLoadGridNav|ClientLoadGridNav}} | |||
| | <code>void ClientLoadGridNav()</code> | |||
| | 通知客户端需要载入网格信息,可用于允许客户端确定允许建筑的区域等 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetAlwaysShowPlayerNames|GetAlwaysShowPlayerNames}} | |||
| | <code>bool GetAlwaysShowPlayerNames() </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetAlwaysShowPlayerInventory|GetAlwaysShowPlayerInventory}} | ||
| | <code>void  | | <code>bool GetAlwaysShowPlayerInventory()</code> | ||
| |  | | 返回是否不论任何单位被选中,始终在HUD上显示英雄的物品库存 | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetAnnouncerDisabled|GetAnnouncerDisabled}} | |||
| | <code>bool GetAnnouncerDisabled()</code> | |||
| | 返回游戏内播音员是否被禁用 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetCameraDistanceOverride|GetCameraDistanceOverride}} | |||
| | <code>float GetCameraDistanceOverride()</code> | |||
| | 返回是否设置摄像机距离Dota内的默认值为1134 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetCustomBuybackCooldownEnabled|GetCustomBuybackCooldownEnabled}} | |||
| | <code>bool GetCustomBuybackCooldownEnabled()</code> | |||
| |  返回是否允许自定义的买活CD | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetCustomBuybackCostEnabled|GetCustomBuybackCostEnabled}} | |||
| | <code>bool GetCustomBuybackCostEnabled()</code> | |||
| | 返回是否允许自定义的买活金钱 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetCustomHeroMaxLevel|GetCustomHeroMaxLevel}} | |||
| | <code>int GetCustomHeroMaxLevel()</code> | |||
| | 返回是否允许改变英雄的最高等级(默认25) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetFixedRespawnTime|GetFixedRespawnTime}} | |||
| | <code>float GetFixedRespawnTime() </code> | |||
| | 返回是否返回固定的复活时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetFogOfWarDisabled|GetFogOfWarDisabled}} | |||
| | <code>bool GetFogOfWarDisabled()</code> | |||
| | 返回是否关闭/开启战争迷雾 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetGoldSoundDisabled|GetGoldSoundDisabled}} | |||
| | <code>bool GetGoldSoundDisabled()</code> | |||
| | 返回是否开启/关闭获得金钱时的音效 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetMaximumAttackSpeed|GetMaximumAttackSpeed}} | |||
| | <code>int GetMaximumAttackSpeed()</code> | |||
| | 获取单位的最大攻击速度 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetMinimumAttackSpeed|GetMinimumAttackSpeed}} | |||
| | <code>int GetMinimumAttackSpeed()</code> | |||
| | 获取单位的最小攻击速度 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetRecommendedItemsDisabled|GetRecommendedItemsDisabled}} | |||
| | <code>bool GetRecommendedItemsDisabled()</code> | |||
| |  返回是否开启/关闭推荐出装在商店中的显示 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetStashPurchasingDisabled|GetStashPurchasingDisabled}} | |||
| | <code>bool GetStashPurchasingDisabled()</code> | |||
| | 返回是否关闭/开启储藏处购买功能。如果该功能被关闭,英雄必须在商店范围内购买物品 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetStickyItemDisabled|GetStickyItemDisabled}} | |||
| | <code>bool GetStickyItemDisabled()</code> | |||
| | 返回是否隐藏快速购买处的物品 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetTopBarTeamValuesOverride|GetTopBarTeamValuesOverride}} | |||
| | <code>bool GetTopBarTeamValuesOverride()</code> | |||
| | 返回是否覆盖游戏界面顶部的队伍比分 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetTopBarTeamValuesVisible|GetTopBarTeamValuesVisible}} | |||
| | <code>bool GetTopBarTeamValuesVisible()</code> | |||
| | 返回是否关闭/开启游戏界面顶部的队伍比分 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetTowerBackdoorProtectionEnabled|GetTowerBackdoorProtectionEnabled}} | |||
| | <code>bool GetTowerBackdoorProtectionEnabled()</code> | |||
| | 返回是否启用/禁用偷塔保护 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.GetUseCustomHeroLevels|GetUseCustomHeroLevels}} | |||
| | <code>bool GetUseCustomHeroLevels()</code> | |||
| | 返回自定义经验机制是否被使用 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.IsBuybackEnabled|IsBuybackEnabled}} | |||
| | <code>bool IsBuybackEnabled()</code> | |||
| |  返回是否启用/禁用买活 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetAbilityTuningValueFilter|SetAbilityTuningValueFilter}} | |||
| | <code>void SetAbilityTuningValueFilter(handle hFunction, handle hContext)</code> | |||
| | 设置一个过滤器,用来控制技能所用到的调整值(修改数据table并返回True来使用新值,, 返回False来使用旧值) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetAlwaysShowPlayerNames|SetAlwaysShowPlayerNames}} | |||
| | <code>void SetAlwaysShowPlayerNames(bool bShow) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetAlwaysShowPlayerInventory|SetAlwaysShowPlayerInventory}} | ||
| | <code>void  | | <code>void SetAlwaysShowPlayerInventory(bool bAlwaysShow)</code> | ||
| |  | | 不论任何单位被选中,始终在HUD上显示英雄的物品库存 | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetAnnouncerDisabled|SetAnnouncerDisabled}} | |||
| | <code>void SetAnnouncerDisabled(bool enabled)</code> | |||
| | 禁用播音员 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetBotsAlwaysPushWithHuman|SetBotsAlwaysPushWithHuman}} | |||
| | <code>void SetBotsAlwaysPushWithHuman(bool bAlwaysPush)</code> | |||
| | 设置Bot玩家是否总是跟从人类玩家进行推进 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetBotsInLateGame|SetBotsInLateGame}} | |||
| | <code>void SetBotsInLateGame(bool bLateGame)</code> | |||
| | Set if bots should enable their late game behavior. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetBotsMaxPushTier|SetBotsMaxPushTier}} | |||
| | <code>void SetBotsMaxPushTier(int nMaxTier)</code> | |||
| | 设置Bot玩家将推进到哪一级别的防御塔(-1代表不推进) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetBotThinkingEnabled|SetBotThinkingEnabled}} | |||
| | <code>void SetBotThinkingEnabled(bool a)</code> | |||
| | 允许/禁止机器人思考,需要与Dota PvP高度相似的三路线地图、商店等 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetBountyRunePickupFilter|SetBountyRunePickupFilter}} | |||
| | <code>void SetBountyRunePickupFilter(handle hFunction, handle hContext)</code> | |||
| | 设置一个过滤器,用来控制触发赏金符时的行为(改变数据表并返回True来使用新值, 返回False来取消事件) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetBuybackEnabled|SetBuybackEnabled}} | |||
| | <code>void SetBuybackEnabled(bool a)</code> | |||
| | 完全允许/禁止买活 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetCameraDistanceOverride|SetCameraDistanceOverride}} | |||
| | <code>void SetCameraDistanceOverride(float a)</code> | |||
| | 设置默认的镜头距离Dota默认为1134 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetCustomBuybackCooldownEnabled|SetCustomBuybackCooldownEnabled}} | |||
| | <code>void SetCustomBuybackCooldownEnabled(bool a)</code> | |||
| | 开启该选项来允许自定义买活冷却时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetCustomBuybackCostEnabled|SetCustomBuybackCostEnabled}} | |||
| | <code>void SetCustomBuybackCostEnabled(bool a)</code> | |||
| | 开启该选项来允许自定义买活花费 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetCustomGameForceHero|SetCustomGameForceHero}} | |||
| | <code>void SetCustomGameForceHero(string pHeroName)</code> | |||
| | 强制单人游戏英雄的选择 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetCustomHeroMaxLevel|SetCustomHeroMaxLevel}} | |||
| | <code>void SetCustomHeroMaxLevel(int maxLevel)</code> | |||
| | 定义最大英雄等级(默认为25) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetCustomXPRequiredToReachNextLevel|SetCustomXPRequiredToReachNextLevel}} | |||
| | <code>void SetCustomXPRequiredToReachNextLevel(handle a)</code> | |||
| | 定义英雄经验值表(table) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetDamageFilter|SetDamageFilter}} | |||
| | <code>void SetDamageFilter(handle hFunction, handle hContext)</code> | |||
| | 设置一个过滤器,用来控制单位受到伤害时的行为 (改变数据表并返回True来使用新值, 返回False来取消事件) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetExecuteOrderFilter|SetExecuteOrderFilter}} | |||
| | <code>void SetExecuteOrderFilter(handle hFunction, handle hContext)</code> | |||
| | 设置一个过滤器,用来控制单位捡起物品时的行为 (改变数据表并返回True来使用新值, 返回False来取消事件) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetFixedRespawnTime|SetFixedRespawnTime}} | |||
| | <code>void SetFixedRespawnTime(float time)</code> | |||
| | Sets the dota respawn time. -1 for default behavior | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetFogOfWarDisabled|SetFogOfWarDisabled}} | |||
| | <code>void SetFogOfWarDisabled(bool a)</code> | |||
| | 开关战争迷雾 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetFountainConstantManaRegen|SetFountainConstantManaRegen}} | |||
| | <code>void SetFountainConstantManaRegen(float flConstantManaRegen)</code> | |||
| | 设定泉水给予的固定魔法的恢复速率(默认为-1) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetFountainPercentageHealthRegen|SetFountainPercentageHealthRegen}} | |||
| | <code>void SetFountainPercentageHealthRegen(float flPercentageHealthRegen)</code> | |||
| | 设定泉水给予的的百分比生命恢复速率(默认为-1) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetFountainPercentageManaRegen|SetFountainPercentageManaRegen}} | |||
| | <code>void SetFountainPercentageManaRegen(float flPercentageManaRegen)</code> | |||
| | 设定泉水给予的百分比魔法恢复速率(默认为-1) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetGoldSoundDisabled|SetGoldSoundDisabled}} | |||
| | <code>void SetGoldSoundDisabled(bool a)</code> | |||
| | 是否禁止获取金钱时的声音提示 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetHUDVisible|SetHUDVisible}} | |||
| | <code>void SetHUDVisible(int iHUDElement, bool bVisible)</code> | |||
| | 设置HUD元素是否可见 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetItemAddedToInventoryFilter|SetItemAddedToInventoryFilter}} | |||
| | <code>void SetItemAddedToInventoryFilter(handle hFunction, handle hContext) </code> | |||
| | 设置一个过滤器,用来控制物品被放入物品栏时的行为。 | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetLoseGoldOnDeath|SetLoseGoldOnDeath}} | ||
| | <code>bool  | | <code>void SetLoseGoldOnDeath(bool bEnabled)</code> | ||
| |  | | 设置禁用死亡时损失金钱 | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetMaximumAttackSpeed|SetMaximumAttackSpeed}} | |||
| | <code>void SetMaximumAttackSpeed(int nMaxSpeed)</code> | |||
| | 设置单位的最大攻击速度 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetMinimumAttackSpeed|SetMinimumAttackSpeed}} | |||
| | <code>void SetMinimumAttackSpeed(int nMinSpeed)</code> | |||
| | 设置单位的最小攻击速度 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetModifierGainedFilter|SetModifierGainedFilter}} | |||
| | <code>void SetModifierGainedFilter(handle hFunction, handle hContext)</code> | |||
| | 设置一个过滤器,用来控制Modifier的获得, 返回Flase来删除Modifier | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetModifyExperienceFilter|SetModifyExperienceFilter}} | |||
| | <code>void SetModifyExperienceFilter(handle hFunction, handle hContext)</code> | |||
| | 设置一个过滤器,用来控制英雄经验值被改变时的行为(改变数据表并返回True来使用新值, 返回False来取消事件) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetModifyGoldFilter|SetModifyGoldFilter}} | |||
| | <code>void SetModifyGoldFilter(handle hFunction, handle hContext)</code> | |||
| | 设置一个过滤器,用来控制英雄的金钱被改变时的行为(改变数据表并返回True来使用新值, 返回False来取消事件) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetOverrideSelectionEntity|SetOverrideSelectionEntity}} | |||
| | <code>void SetOverrideSelectionEntity(handle unit)</code> | |||
| | 覆盖默认选择实体,替代所有玩家的英雄 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetRecommendedItemsDisabled|SetRecommendedItemsDisabled}} | |||
| | <code>void SetRecommendedItemsDisabled(bool a)</code> | |||
| | 是否禁止显示商店中的推荐购买物品 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetRemoveIllusionsOnDeath|SetRemoveIllusionsOnDeath}} | |||
| | <code>void SetRemoveIllusionsOnDeath(bool a)</code> | |||
| | 使幻象死亡时立即消失,而不是延迟数秒 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetRuneEnabled|SetRuneEnabled}} | |||
| | <code>void SetRuneEnabled(int nRune, bool bEnabled)</code> | |||
| | 设定某种神符是否启用 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetRuneSpawnFilter|SetRuneSpawnFilter}} | |||
| | <code>void SetRuneSpawnFilter(handle hFunction, handle hContext)</code> | |||
| | 设置一个过滤器,用来控制神符的刷新(改变数据表并返回True来使用新值, 返回False来取消事件) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetStashPurchasingDisabled|SetStashPurchasingDisabled}} | |||
| | <code>void SetStashPurchasingDisabled(bool bDisabled) </code> | |||
| | 是否关闭/开启储藏处购买功能。如果该功能被关闭,英雄必须在商店范围内购买物品 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetStickyItemDisabled|SetStickyItemDisabled}} | |||
| | <code>void SetStickyItemDisabled(bool bDisabled)</code> | |||
| | 隐藏快速购买处的物品 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetTopBarTeamValue|SetTopBarTeamValue}} | |||
| | <code>void SetTopBarTeamValue(int a, int b)</code> | |||
| | 设置顶端的队伍数值 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetTopBarTeamValuesOverride|SetTopBarTeamValuesOverride}} | |||
| | <code>void SetTopBarTeamValuesOverride(bool a)</code> | |||
| | 是否覆盖顶端的队伍数值 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetTopBarTeamValuesVisible|SetTopBarTeamValuesVisible}} | |||
| | <code>void SetTopBarTeamValuesVisible(bool a)</code> | |||
| | 开关顶端的队伍数值 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetTowerBackdoorProtectionEnabled|SetTowerBackdoorProtectionEnabled}} | |||
| | <code>void SetTowerBackdoorProtectionEnabled(bool a)</code> | |||
| | 开关偷塔保护 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetTrackingProjectileFilter|SetTrackingProjectileFilter}} | |||
| | <code>void SetTrackingProjectileFilter(handle hFunction, handle hContext)</code> | |||
| | 设置一个过滤器,用来控制追踪投射物(改变数据表并返回True来使用新值, 返回False来取消事件) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetUnseenFogOfWarEnabled|SetUnseenFogOfWarEnabled}} | |||
| | <code>void SetUnseenFogOfWarEnabled(bool bEnabled)</code> | |||
| | 启用/禁用战争迷雾。启用时,玩家从未探测过的区域将会完全被战争迷雾掩盖 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetUseCustomHeroLevels|SetUseCustomHeroLevels}} | |||
| | <code>void SetUseCustomHeroLevels(bool a)</code> | |||
| | 开关自定义英雄英雄经验表,该表必须提前被定义 | |||
| |} | |||
| === CDotaQuest === | |||
| :::::extends [[#CBaseEntity| CBaseEntity]] | |||
| ''A quest, as seen in the Tutorial and Frostivus'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDotaQuest.AddSubquest|AddSubquest}} | ||
| |  | |||
| | <code>void AddSubquest(handle a) </code> | |||
| | 为该任务添加子任务 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDotaQuest.CompleteQuest|CompleteQuest}} | ||
| |  | |||
| | <code>void CompleteQuest() </code> | |||
| | 标记该任务完成 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDotaQuest.GetSubquest|GetSubquest}} | ||
| |  | |||
| | <code>handle GetSubquest(int a) </code> | |||
| | 用索引号找到该任务的子任务 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDotaQuest.GetSubquestByName|GetSubquestByName}} | ||
| |  | |||
| | <code>handle GetSubquestByName(string a) </code> | |||
| | 用任务名称找到该任务的子任务 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDotaQuest.RemoveSubquest|RemoveSubquest}} | ||
| |  | |||
| | <code>void RemoveSubquest(handle a) </code> | |||
| | 从该任务移除一个子任务 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDotaQuest.SetTextReplaceString|SetTextReplaceString}} | ||
| |  | |||
| | <code>void SetTextReplaceString(string a) </code> | |||
| | 设置该任务的文本取代字符串 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDotaQuest.SetTextReplaceValue|SetTextReplaceValue}} | ||
| |  | |||
| | | | <code>void SetTextReplaceValue(int a, int b) </code> | ||
| | 设置任务数值 | |||
| |} | |||
| |- | |||
| === CDotaSubquestBase === | |||
| :::::extends [[#CDotaQuest| CDotaQuest]] | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDotaSubquestBase.CompleteSubquest|CompleteSubquest}} | ||
| |  | |||
| | <code>void CompleteSubquest() </code> | |||
| | 完成子任务 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDotaSubquestBase.SetTextReplaceString|SetTextReplaceString}} | ||
| |  | |||
| | <code>void SetTextReplaceString(string a) </code> | |||
| | 设置该子任务的文本取代字符串 | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDotaSubquestBase.SetTextReplaceValue|SetTextReplaceValue}} | |||
| | <code>void SetTextReplaceValue(int a, int b) </code> | |||
| | 设置子任务数值 | |||
| |} | |||
| === CPhysicsComponent === | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | {| class="standard-table" style="width: 100%;" | ||
| !  | |||
| !  | ! 函数名  | ||
| ! Description   | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CPhysicsComponent.ExpensiveInstantRayCast|ExpensiveInstantRayCast}} | |||
| | <code>bool ExpensiveInstantRayCast(Vector a, Vector b, handle c) </code> | |||
| | 进行一个立即(即阻挡)的光线投射,稍后会有handle/queue版本,并不计划实际使用这个! | |||
| |} | |||
| === CPointTemplate === | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CPointTemplate.DeleteCreatedSpawnGroups|DeleteCreatedSpawnGroups}} | ||
| |  | |||
| | <code>void DeleteCreatedSpawnGroups() </code> | |||
| | 删除任何该点模板的刷新组。提示:并不删除点模板 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CPointTemplate.ForceSpawn|ForceSpawn}} | ||
| |  | |||
| | <code>void ForceSpawn() </code> | |||
| | 强制刷新该点模板指向的全部实体 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CPointTemplate.GetSpawnedEntities|GetSpawnedEntities}} | ||
| |   | |||
| | <code>handle GetSpawnedEntities() </code> | |||
| | 获取最近被刷新的实体 | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CPointTemplate.SetSpawnCallback|SetSpawnCallback}} | |||
| | | | <code>void SetSpawnCallback(handle a, handle b) </code> | ||
| |  | |||
| | <code>void  | | 设置刷新回调(hCallbackFunc, hCallbackScope, hCallbackData ),当模板产生实体时回调。被刷新的实体作为数组被传入 | ||
| |  | |} | ||
| === CBodyComponent === | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBodyComponent.AddImpulseAtPosition|AddImpulseAtPosition}} | ||
| |  | |||
| | <code>void AddImpulseAtPosition(Vector a, Vector b) </code> | |||
| | 在指定的世界位置施加一个物理推动 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBodyComponent.AddVelocity|AddVelocity}} | ||
| |  | |||
| | <code>void AddVelocity(Vector a, Vector b) </code> | |||
| | 为物理物件增加一个线速度或角速度 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBodyComponent.DetachFromParent|DetachFromParent}} | ||
| |  | |||
| | <code>void DetachFromParent() </code> | |||
| | 从其父项(parent)中分离 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBodyComponent.GetSequence|GetSequence}} | ||
| |  | |||
| | <code><unknown> GetSequence() </code> | |||
| | 返回激活的序列(sequence) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBodyComponent.IsAttachedToParent|IsAttachedToParent}} | ||
| |  | |||
| | <code>bool IsAttachedToParent() </code> | |||
| | 是否依附父项(parent) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBodyComponent.LookupSequence|LookupSequence}} | ||
| |  | |||
| | <code><unknown> LookupSequence(string a) </code> | |||
| | 输入名字返回序列(sequence)ID | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBodyComponent.SequenceDuration|SequenceDuration}} | ||
| |  | |||
| | <code>float SequenceDuration(string a) </code> | |||
| | 按秒数返回指定序列(sequence)的持续时间 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBodyComponent.SetAngularVelocity|SetAngularVelocity}} | ||
| |  | |||
| | <code>void SetAngularVelocity(Vector a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBodyComponent.SetAnimation|SetAnimation}} | ||
| |  | |||
| | <code>void SetAnimation(string a) </code> | |||
| | 输入动画名称播放动作,需要模型拥有该动画 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBodyComponent.SetBodyGroup|SetBodyGroup}} | ||
| |  | |||
| | <code>void SetBodyGroup(string a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBodyComponent.SetMaterialGroup|SetMaterialGroup}} | ||
| |  | |||
| | <code>void SetMaterialGroup(utlstringtoken a) </code> | |||
| | No Description Set | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBodyComponent.SetVelocity|SetVelocity}} | ||
| |  | |||
| | <code>void SetVelocity(Vector velocity) </code> | |||
| |  | |||
| | No Description Set | |||
| |} | |||
| === CBaseAnimating === | |||
| |- | :::::extends [[#CBaseEntity| CBaseEntity]] | ||
| ''A class containing functions involved in animations'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.GetAttachmentAngles|GetAttachmentAngles}} | ||
| |  | |||
| | <code>Vector GetAttachmentAngles(int a) </code> | |||
| | 获得指定ID附件的角度,返回vector(p,y,r) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.GetAttachmentOrigin|GetAttachmentOrigin}} | ||
| |  | |||
| | <code>Vector GetAttachmentOrigin(int a) </code> | |||
| | 获得指定ID附件的源vector | |||
| |- | |- | ||
| |  | |||
| | <code>float  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.GetModelScale|GetModelScale}} | ||
| |  | |||
| | <code>float GetModelScale() </code> | |||
| | 获取实体的模型比例。 | |||
| |- | |- | ||
| |  | |||
| | <code> | |||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.IsSequenceFinished|IsSequenceFinished}} | ||
| | <code>bool IsSequenceFinished() </code> | |||
| | 查询主序列是否播放结束 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.ScriptLookupAttachment|ScriptLookupAttachment}} | ||
| |  | |||
| | <code>int ScriptLookupAttachment(string a) </code> | |||
| | 获得指定名序列的ID | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.SetBodygroup|SetBodygroup}} | ||
| |  | |||
| | <code>void SetBodygroup(int a, int b) </code> | |||
| | 设置一个bodygroup | |||
| |- | |- | ||
| |  | |||
| | <code>float  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.SetModelScale|SetModelScale}} | ||
| |  | |||
| | <code>void SetModelScale(float scale) </code> | |||
| |  设置模型放大率。如果模型缩放为1,使用SetModelScale(10.0)将放大率设置成10.0. | |||
| |- | |- | ||
| |  | |||
| | <code>float  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.SetPoseParameter|SetPoseParameter}} | ||
| |  | |||
| | <code>float SetPoseParameter(string a, float b) </code> | |||
| | 将指定的位置参数(pose parameter)设定为指定值 | |||
| |} | |||
| === CBaseCombatCharacter === | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseCombatCharacter.GetEquippedWeapons|GetEquippedWeapons}} | ||
| |  | |||
| | <code>table GetEquippedWeapons() </code> | |||
| | GetEquippedWeapons(): 获取一个装备武器的数组 | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseCombatCharacter.GetWeaponCount|GetWeaponCount}} | ||
| | | | <code>int GetWeaponCount() </code> | ||
| | GetWeaponCount(): 获取当前装备的武器数量 | |||
| |  | |} | ||
| === ProjectileManager === | |||
| ''The projectile manager, it manages projectiles.'' | |||
| |- | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/ProjectileManager.CreateLinearProjectile|CreateLinearProjectile}} | ||
| |  | |||
| | <code>int CreateLinearProjectile(table infoTable) </code> | |||
| | 创建一个线性投射物并返回其ID | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/ProjectileManager.CreateTrackingProjectile|CreateTrackingProjectile}} | ||
| |  | |||
| | <code>void CreateTrackingProjectile(handle a) </code> | |||
| | 创建一个追踪投射物 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/ProjectileManager.DestroyLinearProjectile|DestroyLinearProjectile}} | ||
| |  | |||
| | <code>void DestroyLinearProjectile(int a) </code> | |||
| | 摧毁指定ID的线性投射物 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/ProjectileManager.GetLinearProjectileVelocity|GetLinearProjectileVelocity}} | ||
| |  | |||
| | <code>Vector GetLinearProjectileVelocity(int int_1) </code> | |||
| | 返回一个表示当前投射物速度的向量。 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/ProjectileManager.ProjectileDodge|ProjectileDodge}} | ||
| |  | |||
| | | | <code>void ProjectileDodge(handle a) </code> | ||
| | 使得特定单位躲避投射物 | |||
| |} | |||
| |- | |||
| === CBaseTrigger === | |||
| :::::extends [[#CBaseEntity| CBaseEntity]] | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseTrigger.Disable|Disable}} | ||
| |  | |||
| | <code>void Disable() </code> | |||
| | 禁止触发器 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseTrigger.Enable|Enable}} | ||
| |  | |||
| | <code>void Enable() </code> | |||
| | 允许触发器 | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseTrigger.IsTouching|IsTouching}} | |||
| | | | <code>bool IsTouching(handle a) </code> | ||
| |  | |||
| | <code>handle  | | 检查指定实体是否正在接触触发器 | ||
| |} | |||
| | | |||
| |  | |||
| === CEnvEntityMaker === | |||
| :::::extends [[#CBaseEntity| CBaseEntity]] | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| |- | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEnvEntityMaker.SpawnEntity|SpawnEntity}} | ||
| |  | |||
| | <code>void SpawnEntity() </code> | |||
| | 在生成器的位置创建一个实体 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEnvEntityMaker.SpawnEntityAtEntityOrigin|SpawnEntityAtEntityOrigin}} | ||
| |  | |||
| | <code>void SpawnEntityAtEntityOrigin(handle a) </code> | |||
| | 在指定实体的位置立刻创建一个实体 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEnvEntityMaker.SpawnEntityAtLocation|SpawnEntityAtLocation}} | ||
| |  | |||
| | <code>void SpawnEntityAtLocation(Vector a, Vector b) </code> | |||
| | 在指定位置和方向创建一个实体,方向是角度制欧拉角(pitch, yaw, roll) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEnvEntityMaker.SpawnEntityAtNamedEntityOrigin|SpawnEntityAtNamedEntityOrigin}} | ||
| | | | <code>void SpawnEntityAtNamedEntityOrigin(string a) </code> | ||
| |  | |||
| | 在指定名字实体的位置创建一个实体 | |||
| |} | |||
| === CDOTAVoteSystem === | |||
| ''No Description Set'' | |||
| |- | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code>handle  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAVoteSystem.StartVote|StartVote}} | ||
| |  | |||
| | <code>void StartVote(handle a) </code> | |||
| | 开始投票,详细由传入的table制定 | |||
| |} | |||
| === CMarkupVolumeTagged === | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CMarkupVolumeTagged.HasTag|HasTag}} | ||
| |  | |||
| | | | <code>bool HasTag(string a) </code> | ||
| | 查询该卷是否带有指定标签 | |||
| |} | |||
| |- | |||
| === CScriptPrecacheContext === | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CScriptPrecacheContext.AddResource|AddResource}} | ||
| |  | |||
| | <code>void AddResource(string a) </code> | |||
| | 预缓存指定资源 | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CScriptPrecacheContext.GetValue|GetValue}} | |||
| | | | <code>table GetValue(string a) </code> | ||
| |  | |||
| | 读取一个键值(spawn key) | |||
| |} | |||
| | <code> | |||
| | | |||
| |  | === CScriptKeyValues === | ||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |||
| |- | |- | ||
| |  | |||
| | <code>string  | | {{L|Dota 2 Workshop Tools/Scripting/API/CScriptKeyValues.GetValue|GetValue}} | ||
| |  | |||
| | <code>table GetValue(string a) </code> | |||
| | Reads a spawn key | |||
| |} | |||
| === CScriptParticleManager === | |||
| ''No Description Set'' | |||
| ''Global accessor variable:'' <code>ParticleManager</code> | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.CreateParticle|CreateParticle}} | ||
| |  | | <code>int CreateParticle(string particleName, int particleAttach, handle owningEntity)</code> | ||
| |- | | 创建一个新的粒子特效 | ||
| |  | |-  | ||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.CreateParticleForPlayer|CreateParticleForPlayer}} | ||
| |  | | <code>int CreateParticleForPlayer(string particleName, int particleAttach, handle owningEntity, handle owningPlayer)</code> | ||
| | 创建一个只对指定玩家播放的粒子特效 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.CreateParticleForTeam|CreateParticleForTeam}} | |||
| | <code>int CreateParticleForTeam(string string_1, int int_2, handle handle_3, int int_4) </code> | |||
| | 创建一个仅为某方队伍播放的粒子特效。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.DestroyParticle|DestroyParticle}} | |||
| | <code>void DestroyParticle(int particleID, bool immediately)</code> | |||
| | 清除粒子。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.GetParticleReplacement|GetParticleReplacement}} | |||
| | <code>string GetParticleReplacement(string a, handle b)</code> | |||
| | No Description Set | |||
| |-   | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.ReleaseParticleIndex|ReleaseParticleIndex}} | |||
| | <code>void ReleaseParticleIndex(int particleId)</code> | |||
| | 施放指定粒子特效索引号 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.SetParticleAlwaysSimulate|SetParticleAlwaysSimulate}} | |||
| | <code>void SetParticleAlwaysSimulate(int a)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.SetParticleControl|SetParticleControl}} | |||
| | <code>void SetParticleControl(int particleId, int controlIndex, Vector controlData)</code> | |||
| | 设置控制粒子特效的控制点数据 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.SetParticleControlEnt|SetParticleControlEnt}} | |||
| | <code>void SetParticleControlEnt(int a, int b, handle c, int d, string e, Vector f, bool g)</code> | |||
| | No Description Set | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.SetParticleControlForward|SetParticleControlForward}} | |||
| | <code>void SetParticleControlForward(int int_1, int int_2, Vector Vector_3)(int nFXIndex, int nPoint, vForward) </code> | |||
| | 设置粒子的前进运动 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.SetParticleControlOrientation|SetParticleControlOrientation}} | |||
| | <code>void SetParticleControlOrientation(int int_1, int int_2, Vector Vector_3, Vector Vector_4, Vector Vector_5)(int nFXIndex, int nPoint, vForward, vRight, vUp) </code> | |||
| | 设置粒子的三向运动。 | |||
| |} | |||
| === CScriptHeroList === | |||
| ''No Description Set'' | |||
| ''Global accessor variable:'' <code>HeroList</code> | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CScriptHeroList.GetAllHeroes|GetAllHeroes}} | ||
| |  | |||
| | <code>table GetAllHeroes() </code> | |||
| | 返回当前世界全部英雄 | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CScriptHeroList.GetHero|GetHero}} | ||
| |  | |||
| | <code>handle GetHero(int heroId) </code> | |||
| | 获取英雄列表中第N位英雄 | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CScriptHeroList.GetHeroCount|GetHeroCount}} | |||
| | <code>int GetHeroCount() </code> | |||
| | 返回当前世界英雄数目 | |||
| |} | |||
| | | |||
| |  | |||
| |  | |||
| === CNativeOutputs === | |||
| | <code> | |||
| ''No Description Set'' | |||
| | | |||
| |  | {| class="standard-table" style="width: 100%;" | ||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CNativeOutputs.AddOutput|AddOutput}} | ||
| |  | |||
| | <code>void AddOutput(string a, string b) </code> | |||
| | 增加一个输出 | |||
| |- | |- | ||
| |  | |||
| | <code>int  | | {{L|Dota 2 Workshop Tools/Scripting/API/CNativeOutputs.Init|Init}} | ||
| |  | |||
| | <code>void Init(int a) </code> | |||
| | 初始化输出 | |||
| |} | |||
| === CEnvProjectedTexture === | |||
| :::::extends [[#CBaseEntity| CBaseEntity]] | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CEnvProjectedTexture.SetFarRange|SetFarRange}} | ||
| | | | <code>void SetFarRange(float a) </code> | ||
| | <code> | | 设置光照最大距离 | ||
| |  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEnvProjectedTexture.SetLinearAttenuation|SetLinearAttenuation}} | ||
| |  | |||
| | <code>void SetLinearAttenuation(float a) </code> | |||
| | 设置光照线性淡化值 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CEnvProjectedTexture.SetNearRange|SetNearRange}} | ||
| |  | |||
| | <code>void SetNearRange(float a) </code> | |||
| | 设置光照最小距离 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CEnvProjectedTexture.SetQuadraticAttenuation|SetQuadraticAttenuation}} | ||
| |  | |||
| | <code>void SetQuadraticAttenuation(float a) </code> | |||
| | 设置光照二次项淡化值 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CEnvProjectedTexture.SetVolumetrics|SetVolumetrics}} | ||
| |  | |||
| | <code>void SetVolumetrics(bool a, float b, float c, int d, float e) </code> | |||
| | 开关体积光参数: bool bOn, float flIntensity, float flNoise, int nPlanes, float flPlaneOffset | |||
| |} | |||
| === CInfoData === | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CInfoData.QueryColor|QueryColor}} | |||
| |  | |||
| | | | <code>Vector QueryColor(utlstringtoken a, Vector b) </code> | ||
| | <code> | | 查询该键值颜色数据 | ||
| |  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CInfoData.QueryFloat|QueryFloat}} | ||
| |  | |||
| | <code>float QueryFloat(utlstringtoken a, float b) </code> | |||
| | 查询该键值浮点(float)数据 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CInfoData.QueryInt|QueryInt}} | ||
| |  | |||
| | <code>int QueryInt(utlstringtoken a, int b) </code> | |||
| | 查询该键值整型(int)数据 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CInfoData.QueryNumber|QueryNumber}} | ||
| |  | |||
| | <code>float QueryNumber(utlstringtoken a, float b) </code> | |||
| | 查询该键值数值数据 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CInfoData.QueryString|QueryString}} | ||
| |  | |||
| | <code>string QueryString(utlstringtoken a, string b) </code> | |||
| | 查询该键值字符串(string)数据 | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CInfoData.QueryVector|QueryVector}} | |||
| | | | <code>Vector QueryVector(utlstringtoken a, Vector b) </code> | ||
| |  | |||
| | 查询该键值矢量(vector)数据 | |||
| |} | |||
| | <code> | |||
| | | |||
| |  | === CPhysicsProp === | ||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CPhysicsProp.DisableMotion|DisableMotion}} | ||
| |  | |||
| | <code>void DisableMotion() </code> | |||
| | 禁止该元件运动 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CPhysicsProp.EnableMotion|EnableMotion}} | ||
| |  | |||
| | <code>void EnableMotion() </code> | |||
| | 允许该元件运动 | |||
| |} | |||
| === CDOTAGamerules === | |||
| '''' | |||
| ''Global accessor variable:'' <code>GameRules</code> | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.AddMinimapDebugPoint|AddMinimapDebugPoint}} | ||
| |  | | <code>void AddMinimapDebugPoint(int int_1, Vector Vector_2, int int_3, int int_4, int int_5, int int_6, float float_7)</code> | ||
| | 在小地图上增加一个点。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.AddMinimapDebugPointForTeam|AddMinimapDebugPointForTeam}} | |||
| | <code>void AddMinimapDebugPointForTeam(int int_1, Vector Vector_2, int int_3, int int_4, int int_5, int int_6, float float_7, int int_8)</code> | |||
| | 向某方队伍在小地图上增加一个点。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.Defeated|Defeated}} | |||
| | <code>void Defeated()</code> | |||
| | 摧毁遗迹等 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.DidMatchSignoutTimeOut|DidMatchSignoutTimeOut}} | |||
| | <code>bool DidMatchSignoutTimeOut()</code> | |||
| | 当游戏结束,等待弹窗时为真 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.EnableCustomGameSetupAutoLaunch|EnableCustomGameSetupAutoLaunch}} | |||
| | <code>void EnableCustomGameSetupAutoLaunch(bool bool_1)</code> | |||
| | 启用 (true)或禁用 (false) 自定义游戏的自动设置。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.FinishCustomGameSetup|FinishCustomGameSetup}} | |||
| | <code>void FinishCustomGameSetup()</code> | |||
| | 提示自定义游戏的设置阶段已经完成,并应用到游戏中。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetCustomGameDifficulty|GetCustomGameDifficulty}} | |||
| | <code>int GetCustomGameDifficulty()</code> | |||
| | 返回自定义游戏难度。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetCustomGameDifficulty|GetCustomGameDifficulty}} | |||
| | <code>int GetCustomGameDifficulty()</code> | |||
| | 返回自定义游戏模式难度 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetDifficulty|GetDifficulty}} | |||
| | <code>int GetDifficulty()</code> | |||
| | 返回游戏难度 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetDOTATime|GetDOTATime}} | |||
| | <code>float GetDOTATime(bool bool_1, bool bool_2)(b IncludePregameTime b IncludeNegativeTime) </code> | |||
| | 返回Dota游戏内的时间。(是否包含赛前时间或负时间)。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetDroppedItem|GetDroppedItem}} | |||
| | <code>handle GetDroppedItem(int dropIndex)</code> | |||
| | 获得第X个掉落物品 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetGameModeEntity|GetGameModeEntity}} | |||
| | <code>handle GetGameModeEntity()</code> | |||
| | 设置游戏模式实体 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetGameSessionConfigValue|GetGameSessionConfigValue}} | |||
| | <code>string GetGameSessionConfigValue(string string_1, string string_2)</code> | |||
| | 从会话配置中获取字符串 (地图选项)。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetGameTime|GetGameTime}} | |||
| | <code>float GetGameTime()</code> | |||
| | 返回游戏开始后经过的秒数,暂停时间不计算在内 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetMatchSignoutComplete|GetMatchSignoutComplete}} | |||
| | <code>bool GetMatchSignoutComplete()</code> | |||
| | 是否已经接受包含回报信息的弹窗 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetNianFightStartTime|GetNianFightStartTime}} | |||
| | <code>float GetNianFightStartTime()</code> | |||
| | 获得年兽大战开始时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetNianTotalDamageTaken|GetNianTotalDamageTaken}} | |||
| | <code>int GetNianTotalDamageTaken()</code> | |||
| | 芳晓活动,获得年兽受到的总伤害 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetPlayerCustomGameAccountRecord|GetPlayerCustomGameAccountRecord}} | |||
| | <code>table GetPlayerCustomGameAccountRecord(int int_1)(Preview/Unreleased) </code> | |||
| | Gets the player's custom game account record, as it looked at the start of this session | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetTimeOfDay|GetTimeOfDay }} | |||
| | <code>float GetTimeOfDay()</code> | |||
| | 获取一天中的时间(游戏时间) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.IsDaytime|IsDaytime}} | |||
| | <code>bool IsDaytime()</code> | |||
| | 是否是白天 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.IsGamePaused|IsGamePaused}} | |||
| | <code>bool IsGamePaused()</code> | |||
| | 返回游戏是否被暂停了。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.IsCheatMode|IsCheatMode}} | |||
| | <code>bool IsCheatMode() </code> | |||
| | 检测房间是否被设置为允许作弊或 sv_cheats 1. | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.LockCustomGameSetupTeamAssignment|LockCustomGameSetupTeamAssignment}} | ||
| | <code>bool  | | <code>void LockCustomGameSetupTeamAssignment(bool bool_1)</code> | ||
| |  | | 锁定(true)或解锁(false)队伍分配.。如果队伍分配被锁定,玩家将不再能修改队伍。 | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.MakeTeamLose|MakeTeamLose}} | |||
| | <code>void MakeTeamLose(int team)</code> | |||
| | 使指定队伍失败 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.NumDroppedItems|NumDroppedItems}} | |||
| | <code>int NumDroppedItems()</code> | |||
| | 返回当前掉落在地面的物品数量 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.PlayerHasCustomGameHostPrivileges|PlayerHasCustomGameHostPrivileges}} | |||
| | <code>bool PlayerHasCustomGameHostPrivileges(handle handle_1)</code> | |||
| | 返回玩家是否具有主机特权 (洗牌等)。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.Playtesting_UpdateAddOnKeyValues|Playtesting_UpdateAddOnKeyValues}} | |||
| | <code>void Playtesting_UpdateAddOnKeyValues()</code> | |||
| | 从磁盘数据中更新自定义英雄、单位、技能的键值 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.ResetDefeated|ResetDefeated}} | |||
| | <code>void ResetDefeated()</code> | |||
| | 遗迹摧毁后重新开始 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.ResetToHeroSelection|ResetToHeroSelection}} | |||
| | <code>void ResetToHeroSelection()</code> | |||
| | 重新开始时选择英雄 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SendCustomMessage|SendCustomMessage}} | |||
| | <code>void SendCustomMessage(string message, int teamID, int unknown(1?))</code> | |||
| | 在左侧文本框显示一行文本,通常用来提示死亡、反补队友、买活等信息。使用严格HTML格式(>;br<;,>;u<;,>;font<;) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SendCustomMessageToTeam|SendCustomMessageToTeam}} | |||
| | <code>void SendCustomMessageToTeam(string string_1, int int_2, int int_3, int int_4)</code> | |||
| | 代表一个玩家向某个队伍发送信息。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetCreepMinimapIconScale|SetCreepMinimapIconScale}} | |||
| | <code>void SetCreepMinimapIconScale(float scale)</code> | |||
| | 在小地图上缩放中立生物图标 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetCustomGameAccountRecordSaveFunction|SetCustomGameAccountRecordSaveFunction}} | |||
| | <code>void SetCustomGameAccountRecordSaveFunction(handle handle_1, handle handle_2)(Preview/Unreleased) </code> | |||
| | 向句柄设置一个回调来保存玩家的账户信息。 (回调传递了玩家的ID,并应该返回一个简单的table)。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetCustomGameDifficulty|SetCustomGameDifficulty}} | |||
| | <code>void SetCustomGameDifficulty(int a)</code> | |||
| | 设置自定义游戏模式难度等级 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetCustomGameEndDelay|SetCustomGameEndDelay}} | |||
| | <code>void SetCustomGameEndDelay(float delay)</code> | |||
| | 设置游戏完全结束前的等待时间。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetCustomGameSetupAutoLaunchDelay|SetCustomGameSetupAutoLaunchDelay}} | |||
| | <code>void SetCustomGameSetupAutoLaunchDelay(float float_1)</code> | |||
| | 设置自动开始前的等待时间。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetCustomGameSetupRemainingTime|SetCustomGameSetupRemainingTime}} | |||
| | <code>void SetCustomGameSetupRemainingTime(float float_1)</code> | |||
| | 设置游戏的设置时间,0 = 立即开始 -1 = 等待直到设置完毕。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetCustomGameSetupTimeout|SetCustomGameSetupTimeout}} | |||
| | <code>void SetCustomGameSetupTimeout(float float_1)</code> | |||
| | 设置设置(赛前)阶段的超时。 0 = 立即开始, -1 = 永远 (直到FinishCustomGameSetup 被调用) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetCustomGameTeamMaxPlayers|SetCustomGameTeamMaxPlayers}} | |||
| | <code>void SetCustomGameTeamMaxPlayers(int int_1, int int_2)</code> | |||
| | 在设置阶段,设置某方队伍是否还能被选择加入 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetCustomVictoryMessage|SetCustomVictoryMessage}} | |||
| | <code>void SetCustomVictoryMessage(string string_1)</code> | |||
| | 设置胜利信息。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetCustomVictoryMessageDuration|SetCustomVictoryMessageDuration}} | |||
| | <code>void SetCustomVictoryMessageDuration(float duration)</code> | |||
| | 设置自订胜利信息将会持续多长时间。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetFirstBloodActive|SetFirstBloodActive}} | |||
| | <code>void SetFirstBloodActive(bool a)</code> | |||
| | 设置第一滴血是否已经产生 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetGameWinner|SetGameWinner}} | |||
| | <code>void SetGameWinner(int team)</code> | |||
| | 使指定队伍胜利 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetGoldPerTick|SetGoldPerTick}} | |||
| | <code>void SetGoldPerTick(int a)</code> | |||
| | 设置每个时间间隔获得的金币 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetGoldTickTime|SetGoldTickTime}} | |||
| | <code>void SetGoldTickTime(float a)</code> | |||
| | 设置获得金币的时间周期 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetHeroMinimapIconScale|SetHeroMinimapIconScale}} | |||
| | <code>void SetHeroMinimapIconScale(int iconSize)</code> | |||
| | 设置小地图英雄图标尺寸 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetHeroRespawnEnabled|SetHeroRespawnEnabled}} | |||
| | <code>void SetHeroRespawnEnabled(bool canRespawn)</code> | |||
| | 设置是否使用默认英雄复活规则 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetHeroSelectionTime|SetHeroSelectionTime}} | |||
| | <code>void SetHeroSelectionTime(float time)</code> | |||
| | 设置选择英雄的时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetHideKillMessageHeaders|SetHideKillMessageHeaders}} | |||
| | <code>void SetHideKillMessageHeaders(bool hide)</code> | |||
| | 设置是否隐藏击杀提示。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetNianFightStartTime|SetNianFightStartTime}} | |||
| | <code>void SetNianFightStartTime(float a)</code> | |||
| | 设置年兽大战开始时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetOverlayHealthBarUnit|SetOverlayHealthBarUnit}} | |||
| | <code>void SetOverlayHealthBarUnit(handle unit, int style)</code> | |||
| | 在前端蒙版生命条上显示单位生命值 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetPostGameTime|SetPostGameTime}} | |||
| | <code>void SetPostGameTime(float time)</code> | |||
| | 设置在结束游戏后服务器与玩家断线前的时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetPreGameTime|SetPreGameTime}} | |||
| | <code>void SetPreGameTime(float time)</code> | |||
| | 设置选择英雄与开始游戏之间的时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetRuneMinimapIconScale|SetRuneMinimapIconScale}} | |||
| | <code>void SetRuneMinimapIconScale(float scale)</code> | |||
| | 缩放小地图神符图标 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetRuneSpawnTime|SetRuneSpawnTime}} | |||
| | <code>void SetRuneSpawnTime(float time)</code> | |||
| | 设置神符刷新时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetSafeToLeave|SetSafeToLeave}} | |||
| | <code>void SetSafeToLeave(bool safeToLeave)</code> | |||
| | 标记游戏可安全离开 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetSameHeroSelectionEnabled|SetSameHeroSelectionEnabled}} | |||
| | <code>void SetSameHeroSelectionEnabled(bool enabled)</code> | |||
| | 允许选择重复英雄 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetStartingGold|SetStartingGold}} | |||
| | <code>void SetStartingGold(int int_1)</code> | |||
| | 设置初始金钱。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetTimeOfDay|SetTimeOfDay}} | |||
| | <code>void SetTimeOfDay(float time)</code> | |||
| | 设置一天中的时间(游戏时间) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetTreeRegrowTime|SetTreeRegrowTime}} | |||
| | <code>void SetTreeRegrowTime(float time)</code> | |||
| | 设置树重新生长的时间(秒) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetUseBaseGoldBountyOnHeroes|SetUseBaseGoldBountyOnHeroes}} | |||
| | <code>void SetUseBaseGoldBountyOnHeroes(bool a)</code> | |||
| | 英雄将使用基础NPC规则来决定赏金,而不是DOTA指定规则 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetUseCustomHeroXPValues|SetUseCustomHeroXPValues}} | |||
| | <code>void SetUseCustomHeroXPValues(bool a)</code> | |||
| | 允许英雄提供指定数目的经验值(必须先设置) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetUseUniversalShopMode|SetUseUniversalShopMode}} | |||
| | <code>void SetUseUniversalShopMode(bool enabled)</code> | |||
| | 为真时,所有物品当处于任意商店范围内时都能购买到,包括秘密商店物品 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.State_Get|State_Get}} | |||
| | <code><> State_Get()</code> | |||
| | 获取当前游戏规则状态 | |||
| |} | |||
| === CToneMapControllerComponent === | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CToneMapControllerComponent.GetBloomScale|GetBloomScale}} | ||
| |  | |||
| | <code>float GetBloomScale() </code> | |||
| | 获取该光泽贴图控制器(tonemap controller)的泛光缩放(bloomscale) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CToneMapControllerComponent.GetMaxExposure|GetMaxExposure}} | ||
| |  | |||
| | <code>float GetMaxExposure() </code> | |||
| | 获取该光泽贴图控制器(tonemap controller)的最大曝光(max exposure) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CToneMapControllerComponent.GetMinExposure|GetMinExposure}} | ||
| |  | |||
| | <code>float GetMinExposure() </code> | |||
| | 获取该光泽贴图控制器(tonemap controller)的最小曝光(min exposure) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CToneMapControllerComponent.SetBloomScale|SetBloomScale}} | ||
| |  | |||
| | <code>void SetBloomScale(float a) </code> | |||
| | 设置该光泽贴图控制器(tonemap controller)的泛光缩放(bloomscale) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CToneMapControllerComponent.SetMaxExposure|SetMaxExposure}} | ||
| |  | |||
| | <code>void SetMaxExposure(float a) </code> | |||
| | 设置该光泽贴图控制器(tonemap controller)的最大曝光(max exposure) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CToneMapControllerComponent.SetMinExposure|SetMinExposure}} | ||
| |  | |||
| | | | <code>void SetMinExposure(float a) </code> | ||
| | 设置该光泽贴图控制器(tonemap controller)的最小曝光(min exposure) | |||
| |} | |||
| |- | |||
| === CDebugOverlayScriptHelper === | |||
| ''No Description Set'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Axis|Axis}} | ||
| |  | |||
| | <code>void Axis(Vector a, Quaternion b, float c, bool d, float e) </code> | |||
| | 绘制一个轴线。在世界空间中指定出发点和方向 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Box|Box}} | ||
| |  | |||
| | <code>void Box(Vector a, Vector b, int c, int d, int e, int f, bool g, float h) </code> | |||
| | 绘制一个世界空间轴向盒。在世界空间中指定边界 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.BoxAngles|BoxAngles}} | ||
| |  | |||
| | <code>void BoxAngles(Vector a, Vector b, Vector c, Quaternion d, int e, int f, int g, int h, bool i, float j) </code> | |||
| | 在出发点绘制一个定向盒。在世界空间中指定边界 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Capsule|Capsule}} | ||
| |  | |||
| | <code>void Capsule(Vector a, Quaternion b, float c, float d, int e, int f, int g, int h, bool i, float j) </code> | |||
| | 绘制一个胶囊体。在世界空间中指定基部 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Circle|Circle}} | ||
| |  | |||
| | <code>void Circle(Vector a, Quaternion b, float c, int d, int e, int f, int g, bool h, float i) </code> | |||
| | 绘制一个圆。在世界空间中指定中心 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.CircleScreenOriented|CircleScreenOriented}} | ||
| |  | |||
| | <code>void CircleScreenOriented(Vector a, float b, int c, int d, int e, int f, bool g, float h) </code> | |||
| | 绘制一个指向屏幕的圆。在世界空间中指定中心 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Cone|Cone}} | ||
| |  | |||
| | <code>void Cone(Vector a, Vector b, float c, float d, int e, int f, int g, int h, bool i, float j) </code> | |||
| | 绘制一个线框锥形。在世界空间中指定结束点和方向 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Cross|Cross}} | ||
| |  | |||
| | <code>void Cross(Vector a, float b, int c, int d, int e, int f, bool g, float h) </code> | |||
| | 绘制一个对齐屏幕的十字。在世界空间中指定出发点 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Cross3D|Cross3D}} | ||
| |  | |||
| | <code>void Cross3D(Vector a, float b, int c, int d, int e, int f, bool g, float h) </code> | |||
| | 绘制一个对齐世界的十字。在世界空间中指定出发点 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Cross3DOriented|Cross3DOriented}} | ||
| |  | |||
| | <code>void Cross3DOriented(Vector a, Quaternion b, float c, int d, int e, int f, int g, bool h, float i) </code> | |||
| | 绘制一个指向的十字。在世界空间中指定出发点 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.DrawTickMarkedLine|DrawTickMarkedLine}} | ||
| |  | |||
| | <code>void DrawTickMarkedLine(Vector a, Vector b, float c, int d, int e, int f, int g, int h, bool i, float j) </code> | |||
| | 绘制一个短划线。在世界空间中指定结束点 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.EntityAttachments|EntityAttachments}} | ||
| |  | |||
| | <code>void EntityAttachments(ehandle ehandle_1, float float_2, float float_3) </code> | |||
| | 绘制实体附件 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.EntityAxis|EntityAxis}} | ||
| |  | |||
| | <code>void EntityAxis(ehandle a, float b, bool c, float d) </code> | |||
| | 绘制实体源坐标轴 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.EntityBounds|EntityBounds}} | ||
| |  | |||
| | <code>void EntityBounds(ehandle a, int b, int c, int d, int e, bool f, float g) </code> | |||
| | 绘制实体边界 | |||
| |- | |- | ||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.EntitySkeleton|EntitySkeleton}} | |||
| |  | |||
| | <code>void EntitySkeleton(ehandle a, float b) </code> | |||
| |  | |||
| | <code> | | 绘制实体骨架 | ||
| |  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.EntityText|EntityText}} | ||
| |  | |||
| | <code>void EntityText(ehandle a, int b, string c, int d, int e, int f, int g, float h) </code> | |||
| | 在实体上绘制文本 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.FilledRect2D|FilledRect2D}} | ||
| |  | |||
| | <code>void FilledRect2D(Vector2D a, Vector2D b, int c, int d, int e, int f, float g) </code> | |||
| | 绘制一个2D矩形填充的屏幕空间。按照像素对齐 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.HorzArrow|HorzArrow}} | ||
| |  | |||
| | <code>void HorzArrow(Vector a, Vector b, float c, int d, int e, int f, int g, bool h, float i) </code> | |||
| | 绘制一个水平箭头。在世界空间中指定结束点 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Line|Line}} | ||
| |  | |||
| | <code>void Line(Vector a, Vector b, int c, int d, int e, int f, bool g, float h) </code> | |||
| | 绘制一个两点间连线 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Line2D|Line2D}} | ||
| |  | |||
| | <code>void Line2D(Vector2D a, Vector2D b, int c, int d, int e, int f, float g) </code> | |||
| | 绘制一个屏幕空间中亮点间连线 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.PopDebugOverlayScope|PopDebugOverlayScope}} | ||
| |  | |||
| | <code>void PopDebugOverlayScope() </code> | |||
| | 弹出蒙版分组用的标记,被标记的蒙版可被成批删除 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.PushAndClearDebugOverlayScope|PushAndClearDebugOverlayScope}} | ||
| |  | |||
| | <code>void PushAndClearDebugOverlayScope(utlstringtoken a) </code> | |||
| | 推入一个蒙版分组用的标记。删除所有使用该蒙版ID的蒙版 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.PushDebugOverlayScope|PushDebugOverlayScope}} | ||
| |  | |||
| | <code>void PushDebugOverlayScope(utlstringtoken a) </code> | |||
| | 推入一个蒙版分组用的标记。被标记的蒙版可被成批删除 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.RemoveAllInScope|RemoveAllInScope}} | ||
| |  | |||
| | <code>void RemoveAllInScope(utlstringtoken a) </code> | |||
| | 移除指定标记的全部蒙版,无视其生命周期 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.SolidCone|SolidCone}} | ||
| |  | |||
| | <code>void SolidCone(Vector a, Vector b, float c, float d, int e, int f, int g, int h, bool i, float j) </code> | |||
| | 绘制一个固体锥。在世界空间中指定出发点和方向 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Sphere|Sphere}} | ||
| |  | |||
| | <code>void Sphere(Vector a, float b, int c, int d, int e, int f, bool g, float h) </code> | |||
| | 绘制一个线框球体。在世界空间中指定中心 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.SweptBox|SweptBox}} | ||
| |  | |||
| | <code>void SweptBox(Vector a, Vector b, Vector c, Vector d, Quaternion e, int f, int g, int h, int i, float j) </code> | |||
| | 绘制一个扫描盒。在世界空间中指定结束点并在本地空间中指定边界 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Text|Text}} | ||
| |  | |||
| | <code>void Text(Vector a, int b, string c, float d, int e, int f, int g, int h, float i) </code> | |||
| | 绘制2D文本。在世界空间中指定出发点 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Texture|Texture}} | ||
| |  | |||
| | <code>void Texture(string a, Vector2D b, Vector2D c, int d, int e, int f, int g, Vector2D h, Vector2D i, float j) </code> | |||
| | 绘制一个屏幕空间纹理。按照像素对齐 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Triangle|Triangle}} | ||
| |  | |||
| | <code>void Triangle(Vector a, Vector b, Vector c, int d, int e, int f, int g, bool h, float i) </code> | |||
| | 绘制一个填充三角形。在世界空间中指定顶部 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.UnitTestCycleOverlayRenderType|UnitTestCycleOverlayRenderType}} | ||
| |  | |||
| | <code>void UnitTestCycleOverlayRenderType() </code> | |||
| | 转换蒙版混合类型, 用于单位测试 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.VectorText3D|VectorText3D}} | ||
| |  | |||
| | <code>void VectorText3D(Vector a, Quaternion b, string c, int d, int e, int f, int g, bool h, float i) </code> | |||
| | 绘制3D文本。在世界空间中指定出发点和方向 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.VertArrow|VertArrow}} | ||
| |  | |||
| | <code>void VertArrow(Vector a, Vector b, float c, int d, int e, int f, int g, bool h, float i) </code> | |||
| | 绘制一个垂直箭头。在世界空间中指定结束点 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.YawArrow|YawArrow}} | ||
| |  | |||
| | <code>void YawArrow(Vector a, float b, float c, float d, int e, int f, int g, int h, bool i, float j) </code> | |||
| | 绘制一个指定偏航角的箭头。在世界空间中指定结束点 | |||
| |} | |||
| === CBaseFlex === | |||
| :::::extends [[#CBaseAnimating| CBaseAnimating]] | |||
| ''Animated characters who have vertex flex capability (Hi hex6)'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseFlex.GetCurrentScene|GetCurrentScene}} | ||
| |  | |||
| | <code>handle GetCurrentScene() </code> | |||
| | 返回最早激活的场景实体的实例(如果存在的话) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseFlex.GetSceneByIndex|GetSceneByIndex}} | ||
| | | | <code>handle GetSceneByIndex(int a) </code> | ||
| |  | |||
| | 返回指定索引号的场景实体的实例 | |||
| |} | |||
| === CSceneEntity === | |||
| :::::extends [[#CBaseEntity| CBaseEntity]] | |||
| |- | |||
| ''Choreographed scene which controls animation and/or dialog on one or more actors.'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CSceneEntity.AddBroadcastTeamTarget|AddBroadcastTeamTarget}} | ||
| |  | |||
| | <code>void AddBroadcastTeamTarget(int a) </code> | |||
| | 在记分板列表上增加一个组(使用索引号) | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CSceneEntity.Cancel|Cancel}} | ||
| |  | |||
| | <code>void Cancel() </code> | |||
| | 取消场景重播 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CSceneEntity.EstimateLength|EstimateLength}} | ||
| |  | |||
| | <code>float EstimateLength() </code> | |||
| | 返回场景长度(秒) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CSceneEntity.FindCamera|FindCamera}} | ||
| |  | |||
| | <code>handle FindCamera() </code> | |||
| | 获取镜头 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CSceneEntity.FindNamedEntity|FindNamedEntity}} | ||
| |  | |||
| | <code>handle FindNamedEntity(string a) </code> | |||
| | 通过一个实体参照,比如!target,获取场景物体中的实际实体 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CSceneEntity.IsPaused|IsPaused}} | ||
| |  | |||
| | <code>bool IsPaused() </code> | |||
| | 场景是否被暂停 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CSceneEntity.IsPlayingBack|IsPlayingBack}} | ||
| |  | |||
| | <code>bool IsPlayingBack() </code> | |||
| | 场景是否正播放 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CSceneEntity.LoadSceneFromString|LoadSceneFromString}} | ||
| |  | |||
| | <code>bool LoadSceneFromString(string a, string b) </code> | |||
| | 输入虚拟场景名和VCD字符串,载入场景 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CSceneEntity.RemoveBroadcastTeamTarget|RemoveBroadcastTeamTarget}} | ||
| |  | |||
| | <code>void RemoveBroadcastTeamTarget(int a) </code> | |||
| | 从记分板列表上移除一个组(使用索引号) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CSceneEntity.Start|Start}} | ||
| |  | |||
| | <code>void Start(handle a) </code> | |||
| | 开始场景重播,参数为激活者实体(activatorEntity) | |||
| |} | |||
| === GridNav === | |||
| ''A class that can communicate with the gridnav, useful for seeing if stuff should be able to move'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/GridNav.CanFindPath|CanFindPath}} | ||
| | <code>bool  | | <code>bool CanFindPath(Vector Vector_1, Vector Vector_2)</code> | ||
| |  | | 判断是否能从某个起始点移动到某个终点。(vStart, vEnd) | ||
| |- | |-   | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/GridNav.DestroyTreesAroundPoint|DestroyTreesAroundPoint}} | ||
| | <code>void  | | <code>void DestroyTreesAroundPoint(Vector Vector_1, float float_2, bool bool_3)</code> | ||
| |  | | 砍掉区域内所有的树。(vPosition, flRadius, bFullCollision | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/GridNav.FindPathLength|FindPathLength}} | |||
| | <code>float FindPathLength(Vector Vector_1, Vector Vector_2)</code> | |||
| | 找到两点间可通过的路径,并返回路径长度。如果寻路失败,将返回-1。 float (vStart, vEnd ) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/GridNav.GetAllTreesAroundPoint|GetAllTreesAroundPoint}} | |||
| | <code>table GetAllTreesAroundPoint(Vector Vector_1, float float_2, bool bool_3)</code> | |||
| | 以table形式返回附近所有的树木。 HSCRIPTS (vPosition, flRadius, bFullCollision). | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/GridNav.GridPosToWorldCenterX|GridPosToWorldCenterX}} | |||
| | <code>float GridPosToWorldCenterX(int a) </code> | |||
| | 获取指定X索引号的世界中心X位置(网格到世界) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/GridNav.GridPosToWorldCenterY|GridPosToWorldCenterY}} | ||
| |  | |||
| | <code>float GridPosToWorldCenterY(int a) </code> | |||
| | 获取指定Y索引号的世界中心Y位置(网格到世界) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/GridNav.IsBlocked|IsBlocked}} | ||
| |  | |||
| | <code>bool IsBlocked(Vector a) </code> | |||
| | 检查给定位置是否被阻挡 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/GridNav.IsNearbyTree|IsNearbyTree}} | ||
| |  | |||
| | <code>bool IsNearbyTree(Vector position, float radius, bool c) </code> | |||
| |   | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/GridNav.IsTraversable|IsTraversable}} | ||
| |  | |||
| | <code>bool IsTraversable(Vector a) </code> | |||
| | 检查给予维持是否可通过 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/GridNav.RegrowAllTrees|RegrowAllTrees}} | ||
| |  | |||
| | <code>void RegrowAllTrees() </code> | |||
| |   | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/GridNav.WorldToGridPosX|WorldToGridPosX}} | ||
| |  | |||
| | <code>int WorldToGridPosX(float a) </code> | |||
| | 获取指定世界X位置的X索引(世界到网格) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/GridNav.WorldToGridPosY|WorldToGridPosY}} | ||
| |  | |||
| | | | <code>int WorldToGridPosY(float a) </code> | ||
| | 获取指定世界Y位置的Y索引(世界到网格) | |||
| |} | |||
| |- | |||
| === Convars === | |||
| ''No Description Set'' | |||
| ''Global accessor variable:'' <code>ConVars</code> | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/Convars.GetBool|GetBool}} | ||
| |  | |||
| | <code>table GetBool(string variableName) </code> | |||
| | GetBool(name) : 将指定的控制台变量(convar)作为boolean返回. | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/Convars.GetCommandClient|GetCommandClient}} | ||
| |  | |||
| | <code>handle GetCommandClient() </code> | |||
| | GetCommandClient() : 返回输入该控制台指令的玩家 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/Convars.GetDOTACommandClient|GetDOTACommandClient}} | ||
| |  | |||
| | <code>handle GetDOTACommandClient() </code> | |||
| | GetDOTACommandClient() : 返回输入该控制台智力的DOTA玩家 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/Convars.GetFloat|GetFloat}} | ||
| |  | |||
| | <code>table GetFloat(string name) </code> | |||
| | GetFloat(name) : 将指定的控制台变量(convar)作为float返回. 不存在时返回nil | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/Convars.GetInt|GetInt}} | ||
| |  | |||
| | <code>table GetInt(string a) </code> | |||
| | GetInt(name) : 将指定的控制台变量(convar)作为int返回. 不存在时返回nil | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/Convars.GetStr|GetStr}} | ||
| |  | |||
| | <code>table GetStr(string variableName) </code> | |||
| | GetStr(name) : 将指定的控制台变量(convar)作为string返回. 不存在时返回nil | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/Convars.RegisterCommand|RegisterCommand}} | ||
| |  | |||
| | <code>void RegisterCommand(string variableName, handle function, string helpText, int flags) </code> | |||
| | RegisterCommand(name, fn, helpString, flags) : 注册一个控制台指令. | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/Convars.RegisterConvar|RegisterConvar}} | ||
| |  | |||
| | <code>void RegisterConvar(string name, string defaultValue, string helpText, int flags) </code> | |||
| | RegisterConvar(name, defaultValue, helpString, flags): 注册一个新的控制台变量. | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/Convars.SetBool|SetBool}} | ||
| |  | |||
| | <code>void SetBool(string variableName, bool value) </code> | |||
| | SetBool(name,val) : 将指定控制台变量(convar)设置为指定bool. | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/Convars.SetFloat|SetFloat}} | ||
| |  | |||
| | <code>void SetFloat(string variableName, float value) </code> | |||
| | SetFloat(name,val) : 将指定控制台变量(convar)设置为指定float. | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/Convars.SetInt|SetInt}} | ||
| |  | |||
| | <code>void SetInt(string a, int b) </code> | |||
| | SetInt(name,val) : 将指定控制台变量(convar)设置为指定int. | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/Convars.SetStr|SetStr}} | ||
| | | | <code>void SetStr(string a, string b) </code> | ||
| |  | | SetStr(name,val) : 将指定控制台变量(convar)设置为指定string. | ||
| |} | |||
| === Vector === | |||
| ''Vector class'' | |||
| ''Global accessor variable:'' <code>Vector(x,y,z)</code> | |||
| |- | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/Vector.__add|__add}} | ||
| |  | |||
| | <code>Vector __add(Vector a, Vector b) </code> | |||
| | 重载+.矢量加运算 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/Vector.__div|__div}} | ||
| |  | |||
| | <code>Vector __div(Vector a, Vector b) </code> | |||
| | 重载/.矢量除运算 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/Vector.__eq|__eq}} | ||
| |  | |||
| | <code>bool __eq(Vector a, Vector b) </code> | |||
| | 重载==.矢量比较运算 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/Vector.__len|__len}} | ||
| |  | |||
| | <code>float __len() </code> | |||
| | 重载#返回矢量长度 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/Vector.__mul|__mul}} | ||
| |  | |||
| | <code>Vector __mul(Vector a, Vector b) </code> | |||
| | 重载*返回矢量乘运算 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/Vector.__sub|__sub}} | ||
| |  | |||
| | <code>Vector __sub(Vector a, Vector b) </code> | |||
| | 重载-.矢量减运算 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/Vector.__tostring|__tostring}} | ||
| |  | |||
| | <code>string __tostring() </code> | |||
| | 重载..转换矢量为字符串 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/Vector.__unm|__unm}} | ||
| |  | |||
| | <code>Vector __unm() </code> | |||
| | 重载- operator | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/Vector.Cross|Cross}} | ||
| |  | |||
| | <code>Vector Cross(Vector a, Vector b) </code> | |||
| | 矢量叉积 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/Vector.Dot|Dot}} | ||
| |  | |||
| | <code>float Dot(Vector a, Vector b) </code> | |||
| | 矢量点积 | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/Vector.Length|Length}} | ||
| |  | |||
| | <code>float Length() </code> | |||
| | 矢量长度(模) | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/Vector.Length2D|Length2D}} | ||
| |  | |||
| | <code>float Length2D() </code> | |||
| | 矢量XY平面上长度(模) | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/Vector.Normalized|Normalized}} | ||
| |  | |||
| | <code>Vector Normalized() </code> | |||
| | 返回单位矢量 | |||
| | <code> | |||
| |  | |||
| |} | |} | ||
| ===  | |||
| '''' | |||
| {| class="standard-table" style="width: 100%;" | |||
| !  | === CDOTA_MapTree === | ||
| !  | |||
| !  | :::::extends [[#CBaseEntity| CBaseEntity]] | ||
| ''A tree on the map'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_MapTree.CutDown|CutDown}} | ||
| |   | |||
| | <code>void CutDown(int TeamNumberKnownTo ) </code> | |||
| | 砍掉这棵树 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_MapTree.CutDownRegrowAfter|CutDownRegrowAfter}} | ||
| |  | |||
| | <code>void CutDownRegrowAfter(float RegrowAfter, int TeamNumberKnownTo ) </code> | |||
| | 砍掉这棵树,一段时间后再生 | |||
| |- | |- | ||
| |  | |||
| | <code>void  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_MapTree.GrowBack|GrowBack}} | ||
| |  | |||
| | <code>void GrowBack() </code> | |||
| | 再生一棵被砍掉的树 | |||
| |- | |- | ||
| |  | |||
| | <code>bool  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_MapTree.IsStanding|IsStanding}} | ||
| |  | |||
| | <code>bool IsStanding() </code> | |||
| |  | |||
| | 如果树站立着返回true,如果被砍掉返回false | |||
| |} | |||
| === CDOTA_SimpleObstruction === | |||
| :::::extends [[#CBaseEntity| CBaseEntity]] | |||
| ''An obstruction on the map that effects the gridnav'' | |||
| |- | {| class="standard-table" style="width: 100%;" | ||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_SimpleObstruction.IsEnabled|IsEnabled}} | ||
| |  | |||
| | <code>bool IsEnabled() </code> | |||
| | Returns whether the obstruction is currently active | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_SimpleObstruction.SetEnabled|SetEnabled}} | ||
| |  | |||
| | <code>void SetEnabled(bool enabled, bool b) </code> | |||
| | Enable or disable the obstruction | |||
| |} | |||
| === CDOTA_Unit_Courier === | |||
| :::::extends [[#CDOTA_BaseNPC| CDOTA_BaseNPC]] | |||
| ''信使类。'' | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数名  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | |||
| | <code> | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Unit_Courier.UpgradeToFlyingCourier|UpgradeToFlyingCourier}} | ||
| |  | |||
| | <code>bool UpgradeToFlyingCourier()</code> | |||
| | 升级为飞行信使。 | |||
| |} | |||
| === CDOTA_Ability_DataDriven === | |||
| ''No Description Set'' | |||
| ''Global accessor variable:'' <code>Unknown</code> | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数 | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_DataDriven.ApplyDataDrivenModifier|ApplyDataDrivenModifier}} | ||
| | <code> | | <code>handle ApplyDataDrivenModifier(handle hCaster, handle hTarget, string pszModifierName, handle hModifierTable) </code> | ||
| |  | | 获取单位的攻击力。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_DataDriven.ApplyDataDrivenThinker|ApplyDataDrivenThinker}} | ||
| | <code> | | <code>handle ApplyDataDrivenThinker(handle hCaster, Vector vLocation, string pszModifierName, handle hModifierTable) </code> | ||
| |  | | 在指定地点应用一个数据驱动thinker。 | ||
| | | |} | ||
| === CBaseModelEntity === | |||
| |  | ''No Description Set'' | ||
| ''Global accessor variable:'' <code>Unknown</code> | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! Function  | |||
| ! Signature  | |||
| ! Description  | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseModelEntity.SetLightGroup|SetLightGroup}} | ||
| | <code> | | <code>void SetLightGroup(string pLightGroup) </code> | ||
| |  | | SetLightGroup( string ): 设置实体所属的光照组。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseModelEntity.SetModel|SetModel}} | ||
| | <code> | | <code>void SetModel(string pModelName) </code> | ||
| |  | | 设置模型 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseModelEntity.SetRenderColor|SetRenderColor}} | ||
| | <code> | | <code>void SetRenderColor(int r, int g, int b) </code> | ||
| |  | | SetRenderColor( r, g, b ): 设置实体的渲染颜色。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseModelEntity.SetRenderMode|SetRenderMode}} | ||
| | <code>int  | | <code>void SetRenderMode(int nMode) </code> | ||
| |  | | SetRenderMode( int ): 设置实体的渲染模式。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CBaseModelEntity.SetSize|SetSize}} | ||
| | <code> | | <code>void SetSize(Vector mins, Vector maxs) </code> | ||
| |  | | 设置尺寸。 | ||
| |} | |||
| === CCustomGameEventManager === | |||
| ''No Description Set'' | |||
| ''全局变量:'' <code>CustomGameEventManager</code> | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! Function  | |||
| ! Signature  | |||
| ! Description  | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CCustomGameEventManager.RegisterListener|RegisterListener}} | ||
| | <code>int  | | <code>int RegisterListener(string string_1, handle handle_2) </code> | ||
| |  | | ( string EventName, func CallbackFunction ) - 监听指定自定义事件,注册一个回调函数,在指定事件触发时被调用。返回一个监听者ID用来在以后取消监听。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CCustomGameEventManager.Send_ServerToAllClients|Send_ServerToAllClients}} | ||
| | <code> | | <code>void Send_ServerToAllClients(string string_1, handle handle_2) </code> | ||
| |  | | ( string EventName, table EventData ) | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CCustomGameEventManager.Send_ServerToPlayer|Send_ServerToPlayer}} | ||
| | <code> | | <code>void Send_ServerToPlayer(handle handle_1, string string_2, handle handle_3) </code> | ||
| |  | | ( Entity Player, string EventName, table EventData ) | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CCustomGameEventManager.Send_ServerToTeam|Send_ServerToTeam}} | ||
| | <code>int  | | <code>void Send_ServerToTeam(int int_1, string string_2, handle handle_3) </code> | ||
| |  | | ( int TeamNumber, string EventName, table EventData ) | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CCustomGameEventManager.UnregisterListener|UnregisterListener}} | ||
| | <code>int  | | <code>void UnregisterListener(int int_1) </code> | ||
| |  | | ( int ListnerID ) - 对指定的监听者取消监听。 | ||
| |} | |||
| === CCustomNetTableManager === | |||
| ''No Description Set'' | |||
| ''Global accessor variable:'' <code>CustomNetTables</code> | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! Function  | |||
| ! Signature  | |||
| ! Description  | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CCustomNetTableManager.GetTableValue|GetTableValue}} | ||
| | <code> | | <code>handle GetTableValue(string string_1, string string_2) </code> | ||
| |  | | ( string TableName, string KeyName ) | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CCustomNetTableManager.SetTableValue|SetTableValue}} | ||
| | <code> | | <code>bool SetTableValue(string string_1, string string_2, handle handle_3) </code> | ||
| |  | | ( string TableName, string KeyName, script_table Value ) | ||
| |} | |||
| === CDOTATutorial === | |||
| ''No description Set'' | |||
| ''Global accessor variable:'' <code>Unknown</code> | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数  | |||
| ! 函数原型 | |||
| ! 解释 | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.AddBot|AddBot}} | ||
| | <code> | | <code>bool AddBot(string string_1, string string_2, string string_3, bool bool_4)</code> | ||
| |  | | 添加一个由电脑控制的机器人。 | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.AddQuest|AddQuest}} | |||
| | <code>void AddQuest(string string_1, int int_2, string string_3, string string_4)</code> | |||
| | 向任务日志中添加一个任务。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.AddShopWhitelistItem|AddShopWhitelistItem}} | |||
| | <code>void AddShopWhitelistItem(string string_1)</code> | |||
| | 向商店白名单中添加一个物品。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.CompleteQuest|CompleteQuest}} | |||
| | <code>void CompleteQuest(string string_1)</code> | |||
| | 完成一个任务。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.CreateLocationTask|CreateLocationTask}} | |||
| | <code>void CreateLocationTask(Vector Vector_1)</code> | |||
| | 增加一个移动到指定地点的任务。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.EnableCreepAggroViz|EnableCreepAggroViz}} | |||
| | <code>void EnableCreepAggroViz(bool bool_1)</code> | |||
| | 当小兵对英雄产生仇恨时提醒玩家。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.EnablePlayerOffscreenTip|EnablePlayerOffscreenTip}} | |||
| | <code>void EnablePlayerOffscreenTip(bool bool_1) </code> | |||
| | 启用提醒玩家找到其英雄的提示。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.EnableTowerAggroViz|EnableTowerAggroViz}} | |||
| | <code>void EnableTowerAggroViz(bool bool_1)</code> | |||
| | 当防御塔对英雄产生仇恨时提醒玩家。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.FinishTutorial|FinishTutorial}} | |||
| | <code>void FinishTutorial()</code> | |||
| | 结束教程。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.ForceGameStart|ForceGameStart}} | |||
| | <code>void ForceGameStart()</code> | |||
| | 强制开始游戏。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.GetTimeFrozen|GetTimeFrozen}} | |||
| | <code>bool GetTimeFrozen()</code> | |||
| | 返回时间是否停止。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.IsItemInWhiteList|IsItemInWhiteList}} | |||
| | <code>bool IsItemInWhiteList(string string_1)</code> | |||
| | 返回物品是否在白名单中。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.RemoveShopWhitelistItem|RemoveShopWhitelistItem}} | |||
| | <code>void RemoveShopWhitelistItem(string string_1)</code> | |||
| | 从白名单中移除一个物品。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.SelectHero|SelectHero}} | |||
| | <code>void SelectHero(string string_1)</code> | |||
| | 为本地玩家选取一个英雄。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.SelectPlayerTeam|SelectPlayerTeam}} | |||
| | <code>void SelectPlayerTeam(string string_1)</code> | |||
| | 为本地玩家选取一个队伍。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.SetItemGuide|SetItemGuide}} | |||
| | <code>void SetItemGuide(string string_1) </code> | |||
| | 设置当前的物品指南。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.SetOrModifyPlayerGold|SetOrModifyPlayerGold}} | |||
| | <code>void SetOrModifyPlayerGold(int int_1, bool bool_2)</code> | |||
| | 为教学中的玩家设置金钱数目(设置或修改), (int) GoldAmount, (bool) true=进行设置, false=进行修改。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.SetQuickBuy|SetQuickBuy}} | |||
| | <code>void SetQuickBuy(string string_1)</code> | |||
| | 设置快速购买。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.SetShopOpen|SetShopOpen}} | |||
| | <code>void SetShopOpen(bool bool_1)</code> | |||
| | 设置打开/关闭商店。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.SetTimeFrozen|SetTimeFrozen}} | |||
| | <code>void SetTimeFrozen(bool bool_1)</code> | |||
| | 设置是否停止时间。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.SetTutorialConvar|SetTutorialConvar}} | |||
| | <code>void SetTutorialConvar(string string_1, string string_2)</code> | |||
| | Set a tutorial convar | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.SetTutorialUI|SetTutorialUI}} | |||
| | <code>void SetTutorialUI(int int_1)</code> | |||
| | 设置教学UI,以简化界面并突出一些元素。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.SetWhiteListEnabled|SetWhiteListEnabled}} | |||
| | <code>void SetWhiteListEnabled(bool bool_1)</code> | |||
| | 设置是否将商店物品加入白名单。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.StartTutorialMode|StartTutorialMode}} | |||
| | <code>void StartTutorialMode() </code> | |||
| | 初始化教学模式。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTATutorial.UpgradePlayerAbility|UpgradePlayerAbility}} | |||
| | <code>void UpgradePlayerAbility(string string_1)</code> | |||
| | 为本地英雄升级某个技能。 | |||
| |} | |||
| === CDOTA_Ability_Lua === | |||
| ''No Description Set'' | |||
| ''Global accessor variable:'' <code>Unknown</code> | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数  | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.CastFilterResult|CastFilterResult}} | ||
| | <code>float  | | <code>int CastFilterResult()</code> | ||
| |  | | 判断一个无目标的命令是否有效 | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.CastFilterResultLocation|CastFilterResultLocation}} | |||
| | <code>int CastFilterResultLocation(Vector vLocation)</code> | |||
| | (Vector vLocation)判断一个作用于某个地点的命令是否有效 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.CastFilterResultTarget|CastFilterResultTarget}} | |||
| | <code>int CastFilterResultTarget(handle hTarget)</code> | |||
| | (HSCRIPT hTarget) 判断一个作用于某个单位的命令是否有效 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.GetAssociatedPrimaryAbilities|GetAssociatedPrimaryAbilities}} | |||
| | <code>string GetAssociatedPrimaryAbilities()</code> | |||
| | 获取相互关联的技能Returns abilities that are stolen simultaneously, or otherwise related in functionality. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.GetAssociatedSecondaryAbilities|GetAssociatedSecondaryAbilities}} | |||
| | <code>string GetAssociatedSecondaryAbilities()</code> | |||
| | Returns other abilities that are stolen simultaneously, or otherwise related in functionality. Generally hidden abilities. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.GetBehavior|GetBehavior}} | |||
| | <code>int GetBehavior()</code> | |||
| | 返回技能的施法动作类型 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.GetCastAnimation|GetCastAnimation}} | |||
| | <code>int GetCastAnimation()</code> | |||
| | 返回技能的施法动画 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.GetCastRange|GetCastRange}} | |||
| | <code>int GetCastRange(Vector vLocation, handle hTarget)</code> | |||
| | 返回技能的施法范围 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.GetChannelAnimation|GetChannelAnimation}} | |||
| | <code>int GetChannelAnimation()</code> | |||
| | 返回技能的持续施法动画 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.GetChannelledManaCostPerSecond|GetChannelledManaCostPerSecond}} | |||
| | <code>int GetChannelledManaCostPerSecond(int iLevel)</code> | |||
| | 返回当前等级下,技能持续施法时的每秒魔法消耗 (当前为-1) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.GetChannelTime|GetChannelTime}} | |||
| | <code>float GetChannelTime()</code> | |||
| | 返回技能的持续施法时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.GetConceptRecipientType|GetConceptRecipientType}} | |||
| | <code>int GetConceptRecipientType()</code> | |||
| | 返回该技能被释放时将听到语音的单位 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.GetCooldown|GetCooldown}} | |||
| | <code>float GetCooldown(int iLevel)</code> | |||
| | 返回技能的CD | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.GetCustomCastError|GetCustomCastError}} | |||
| | <code>string GetCustomCastError()</code> | |||
| | 返回一条失效的无目标命令的错误信息 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.GetCustomCastErrorLocation|GetCustomCastErrorLocation}} | |||
| | <code>string GetCustomCastErrorLocation(Vector vLocation)</code> | |||
| | (Vector vLocation) 返回一条失效的作用于地点的命令的错误信息 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.GetCustomCastErrorTarget|GetCustomCastErrorTarget}} | |||
| | <code>string GetCustomCastErrorTarget(handle hTarget)</code> | |||
| | (HSCRIPT hTarget) 返回一条失效的指向目标的命令的错误信息 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.GetGoldCost|GetGoldCost}} | |||
| | <code>int GetGoldCost(int iLevel)</code> | |||
| | 返回某等级的金钱花费(当前为-1) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.GetIntrinsicModifierName|GetIntrinsicModifierName}} | |||
| | <code>string GetIntrinsicModifierName()</code> | |||
| | 返回被该技能被动施加的Mordifier | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.GetManaCost|GetManaCost}} | |||
| | <code>int GetManaCost(int iLevel)</code> | |||
| | 返回某等级的魔法消耗(当前为-1) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.GetPlaybackRateOverride|GetPlaybackRateOverride}} | |||
| | <code>float GetPlaybackRateOverride()</code> | |||
| | 返回施法动画的播放速度 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.IsHiddenAbilityCastable|IsHiddenAbilityCastable}} | |||
| | <code>bool IsHiddenAbilityCastable()</code> | |||
| | 返回当该技能不在动作面板上时是否能使用 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.IsHiddenWhenStolen|IsHiddenWhenStolen}} | |||
| | <code>bool IsHiddenWhenStolen()</code> | |||
| | 返回该技能被技能窃取后是否是隐藏的 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.IsRefreshable|IsRefreshable}} | |||
| | <code>bool IsRefreshable()</code> | |||
| | 返回该技能是否能被刷新球刷新 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.IsStealable|IsStealable}} | |||
| | <code>bool IsStealable()</code> | |||
| | 返回该技能是否能被窃取 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnAbilityPhaseInterrupted|OnAbilityPhaseInterrupted}} | |||
| | <code>void OnAbilityPhaseInterrupted()</code> | |||
| | 施法被打断 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnAbilityPhaseStart|OnAbilityPhaseStart}} | |||
| | <code>bool OnAbilityPhaseStart()</code> | |||
| | 施法开始(施法成功时返回True) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnChannelFinish|OnChannelFinish}} | |||
| | <code>void OnChannelFinish(bool bInterrupted)</code> | |||
| | (bool bInterrupted) 持续施法完成 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnChannelThink|OnChannelThink}} | |||
| | <code>void OnChannelThink(float flInterval)</code> | |||
| | (float flInterval) 持续施法开始 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnHeroCalculateStatBonus|OnHeroCalculateStatBonus}} | |||
| | <code>void OnHeroCalculateStatBonus()</code> | |||
| | 施法者(仅限英雄)升级,得到技能加点, 或 received a new stat bonus. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnHeroDiedNearby|OnHeroDiedNearby}} | |||
| | <code>void OnHeroDiedNearby(handle unit, handle attacker, handle table)</code> | |||
| | 一个英雄在附近死亡 (比如说骨灰盒的效果)时, 获取参数表 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnHeroLevelUp|OnHeroLevelUp}} | |||
| | <code>void OnHeroLevelUp()</code> | |||
| | 施法者升级 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnInventoryContentsChanged|OnInventoryContentsChanged}} | |||
| | <code>void OnInventoryContentsChanged()</code> | |||
| | 施法者物品库存发生变化 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnItemEquipped|OnItemEquipped}} | |||
| | <code>void OnItemEquipped(handle hItem)</code> | |||
| | ( HSCRIPT hItem ) 施法者装备了物品 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnOwnerDied|OnOwnerDied}} | |||
| | <code>void OnOwnerDied()</code> | |||
| | 施法者死亡 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnOwnerSpawned|OnOwnerSpawned}} | |||
| | <code>void OnOwnerSpawned()</code> | |||
| | 施法者第一次出生或重生 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnProjectileHit|OnProjectileHit}} | |||
| | <code>bool OnProjectileHit(handle hTarget, Vector vLocation)</code> | |||
| | (HSCRIPT hTarget, Vector vLocation) 投射物撞击到某目标或者到达指定位置 (目标不可用) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnProjectileHit_ExtraData|OnProjectileHit_ExtraData}} | |||
| | <code>bool OnProjectileHit_ExtraData(handle hTarget, Vector vLocation, handle table)</code> | |||
| | (HSCRIPT hTarget, Vector vLocation, table kv) 投射物撞击到某目标或者到达指定位置 (目标不可用) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnProjectileThink|OnProjectileThink}} | |||
| | <code>void OnProjectileThink(Vector vLocation)</code> | |||
| | (Vector vLocation) 投射物正在运动 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnProjectileThink_ExtraData|OnProjectileThink_ExtraData}} | |||
| | <code>void OnProjectileThink_ExtraData(Vector vLocation, handle table)</code> | |||
| | (Vector vLocation, table kv ) 投射物正在运动 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnSpellStart|OnSpellStart}} | |||
| | <code>void OnSpellStart()</code> | |||
| | 施法前摇结束,技能效果开始 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnStolen|OnStolen}} | |||
| | <code>void OnStolen(handle hSourceAbility)</code> | |||
| | ( HSCRIPT hAbility ) 当技能被窃取时,进行的某特殊行为 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnToggle|OnToggle}} | |||
| | <code>void OnToggle()</code> | |||
| | Ability is toggled on/off.   技能被开启/关闭 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnUnStolen|OnUnStolen}} | |||
| | <code>void OnUnStolen()</code> | |||
| | 当技能未被(成功)窃取时,进行的某特殊行为 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.OnUpgrade|OnUpgrade}} | |||
| | <code>void OnUpgrade()</code> | |||
| | 技能升级 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.ProcsMagicStick|ProcsMagicStick}} | |||
| | <code>bool ProcsMagicStick() </code> | |||
| | 返回该技能是否会增加周围单位的魔棒点数 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Ability_Lua.SpeakTrigger|SpeakTrigger}} | |||
| | <code>int SpeakTrigger()</code> | |||
| | 返回所使用的语音类型 | |||
| |} | |||
| === CDOTA_CustomUIManager === | |||
| ''No Description Set'' | |||
| ''Global accessor variable:'' <code>Unknown</code> | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数  | |||
| ! 函数原型  | |||
| ! 解释 | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_CustomUIManager.DynamicHud_Create|DynamicHud_Create}} | ||
| | <code> | | <code>void DynamicHud_Create(int int_1, string string_2, string string_3, handle handle_4)</code> | ||
| |  | | 为某玩家建立一个新的自定义用户界面元素。 ( int PlayerID /*-1 means everyone*/, string ElementID /* should be unique */, string LayoutFileName, table DialogVariables /* can be nil */ ) | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_CustomUIManager.DynamicHud_Destroy|DynamicHud_Destroy}} | |||
| | <code>void DynamicHud_Destroy(int int_1, string string_2)</code> | |||
| | 删除一个自定义用户界面元素。 ( int PlayerID /*-1 means everyone*/, string ElementID ) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_CustomUIManager.DynamicHud_SetDialogVariables|DynamicHud_SetDialogVariables}} | |||
| | <code>void DynamicHud_SetDialogVariables(int int_1, string string_2, handle handle_3)</code> | |||
| | 为已有的用户界面元素添加/修改一个会话变量。( int PlayerID /*-1 means everyone*/, string ElementID, table DialogVariables ) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_CustomUIManager.DynamicHud_SetVisible|DynamicHud_SetVisible}} | |||
| | <code>void DynamicHud_SetVisible(int int_1, string string_2, bool bool_3)</code> | |||
| | 切换已有的用户见面元素的可见性。 ( int PlayerID /*-1 means everyone*/, string ElementID, bool Visible ) | |||
| |} | |||
| === CPropHMDAvatar === | |||
| ''No Description Set'' | |||
| ''Global accessor variable:'' <code>Unknown</code> | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数 | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CPropHMDAvatar.GetVRHand|GetVRHand}} | ||
| | <code>int  | | <code>handle GetVRHand(int nHandID) </code> | ||
| |  | | 根据ID获取VR | ||
| |} | |||
| === CPropVRHand === | |||
| ''No Description Set'' | |||
| ''Global accessor variable:'' <code>Unknown</code> | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数 | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CPropVRHand.GetAttachment|GetAttachment}} | ||
| | <code> | | <code>handle GetAttachment() </code> | ||
| |  | | 获取这只手上的附件。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CPropVRHand.SetAttachment|SetAttachment}} | ||
| | <code>float  | | <code>void SetAttachment(handle hAttachment) </code> | ||
| |  | | 设置这只手上的附件。 | ||
| |} | |||
| === CDOTA_Buff === | |||
| ''No Description Set'' | |||
| ''Global accessor variable:'' <code>Unknown</code> | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数 | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.AddParticle|AddParticle}} | |||
| | <code>void AddParticle(int i, bool bDestroyImmediately, bool bStatusEffect, int iPriority, bool bHeroEffect, bool bOverheadEffect)(index, bDestroyImmediately, bStatusEffect, priority, bHeroEffect, bOverheadEffect) </code> | |||
| | 增加粒子。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.DecrementStackCount|DecrementStackCount}} | |||
| | <code>void DecrementStackCount()</code> | |||
| | 将Mordifier的叠加层数-1 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.Destroy|Destroy}} | |||
| | <code>void Destroy()</code> | |||
| | 运行所有相关的移除函数来移除这个Mordifier。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.ForceRefresh|ForceRefresh}} | |||
| | <code>void ForceRefresh()</code> | |||
| | 运行所有相关的刷新函数,使Mordifier恢复到初始 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.GetAbility|GetAbility}} | |||
| | <code>handle GetAbility()</code> | |||
| | 获取产生这个Mordifier的技能。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.GetCaster|GetCaster}} | |||
| | <code>handle GetCaster()</code> | |||
| | 获取产生这个Mordifier的单位。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.GetClass|GetClass}} | |||
| | <code>string GetClass()</code> | |||
| | 获取这个Mordifier所属的类。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.GetCreationTime|GetCreationTime}} | |||
| | <code>float GetCreationTime()</code> | |||
| | 获取这个Mordifier的创建时间。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.GetDieTime|GetDieTime}} | |||
| | <code>float GetDieTime()</code> | |||
| | 获取这个Mordifier的终止时间。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.GetDuration|GetDuration}} | |||
| | <code>float GetDuration()</code> | |||
| | 获取这个Mordifier的持续时间。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.GetElapsedTime|GetElapsedTime}} | |||
| | <code>float GetElapsedTime()</code> | |||
| | 获取这个Mordifier的消失时间。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.GetName|GetName}} | |||
| | <code>string GetName()</code> | |||
| | 获取这个Mordifier的名称。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.GetParent|GetParent}} | |||
| | <code>handle GetParent()</code> | |||
| | 获取这个Mordifier所继承的单位。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.GetRemainingTime|GetRemainingTime}} | |||
| | <code>float GetRemainingTime()</code> | |||
| | 获取这个Mordifier的剩余时间。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.GetStackCount|GetStackCount}} | |||
| | <code>int GetStackCount() </code> | |||
| | 获取这个Mordifier的叠加层数。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.IncrementStackCount|IncrementStackCount}} | |||
| | <code>void IncrementStackCount()Increase this modifier's stack count by 1. </code> | |||
| | 使Mordifier的叠加层数+1。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.SetDuration|SetDuration}} | |||
| | <code>void SetDuration(float flDuration, bool bInformClient)(flTime, bInformClients) </code> | |||
| | 设置持续时间。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.SetStackCount|SetStackCount}} | |||
| | <code>void SetStackCount(int iCount)</code> | |||
| | 设置叠加层数。 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Buff.StartIntervalThink|StartIntervalThink}} | |||
| | <code>void StartIntervalThink(float flInterval)</code> | |||
| | 开始Mordifier的计时功能 (OnIntervalThink) ,根据给定的间隔 (float)。 值-1将会停止这个功能。 | |||
| |} | |||
| === CDOTA_Modifier_Lua === | |||
| ''No Description Set'' | |||
| ''Global accessor variable:'' <code>Unknown</code> | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数 | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.AllowIllusionDuplicate|AllowIllusionDuplicate}} | ||
| | <code> | | <code>bool AllowIllusionDuplicate()</code> | ||
| |  | | 幻象是否继承这个Mordifier | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.DestroyOnExpire|DestroyOnExpire}} | |||
| | <code>bool DestroyOnExpire()</code> | |||
| | Buff是否会在Mordifier到期时被移除 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.GetAttributes|GetAttributes}} | |||
| | <code>int GetAttributes()</code> | |||
| | 返回被应用到Mordifier上的属性类别 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.GetAuraEntityReject|GetAuraEntityReject}} | |||
| | <code>bool GetAuraEntityReject(handle hEntity)</code> | |||
| | 返回实体是否在某些条件下获得光环 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.GetAuraRadius|GetAuraRadius}} | |||
| | <code>int GetAuraRadius()</code> | |||
| | 返回光环半径 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.GetAuraSearchFlags|GetAuraSearchFlags}} | |||
| | <code>int GetAuraSearchFlags()</code> | |||
| | 返回光环施加效果时的Flag | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.GetAuraSearchTeam|GetAuraSearchTeam}} | |||
| | <code>int GetAuraSearchTeam()</code> | |||
| | 返回光环效果将施加的队伍 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.GetAuraSearchType|GetAuraSearchType}} | |||
| | <code>int GetAuraSearchType()</code> | |||
| | 返回光环效果将施加的单位类型 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.GetEffectAttachType|GetEffectAttachType}} | |||
| | <code>int GetEffectAttachType()</code> | |||
| | 通过GetEffectName获取将添加的粒子特效类型 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.GetEffectName|GetEffectName}} | |||
| | <code>string GetEffectName()</code> | |||
| | 返回Mordifier运行时所产生的粒子特效的名称 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.GetHeroEffectName|GetHeroEffectName}} | |||
| | <code>string GetHeroEffectName()</code> | |||
| | 返回Mordifier运行时所产生的英雄粒子特效的名称 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.GetModifierAura|GetModifierAura}} | |||
| | <code>string GetModifierAura()</code> | |||
| | 返回这个Mordifier将施加的二级Mordifier 名称(如果一级Mordifier是光环) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.GetStatusEffectName|GetStatusEffectName}} | |||
| | <code>string GetStatusEffectName()</code> | |||
| | 返回Mordifier运行时所产生的状态粒子特效的名称 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.GetTexture|GetTexture}} | |||
| | <code>string GetTexture()</code> | |||
| | 返回Mordifier的图标 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.HeroEffectPriority|HeroEffectPriority}} | |||
| | <code>int HeroEffectPriority()</code> | |||
| | 英雄特效的显示优先级 (更高的数字在Buff栏中被优先显示) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.IsAura|IsAura}} | |||
| | <code>bool IsAura()</code> | |||
| | 这个Mordifier是否是光环 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.IsAuraActiveOnDeath|IsAuraActiveOnDeath}} | |||
| | <code>bool IsAuraActiveOnDeath()</code> | |||
| | 返回携带单位死后其光环是否有效 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.IsDebuff|IsDebuff}} | |||
| | <code>bool IsDebuff()</code> | |||
| | 返回这个Mordifier是否是Debuff | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.IsHidden|IsHidden}} | |||
| | <code>bool IsHidden()</code> | |||
| | 返回这个Mordifier是否在状态栏中显示 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.IsPurgable|IsPurgable}} | |||
| | <code>bool IsPurgable()</code> | |||
| | 返回这个Mordifier是否能被清除 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.IsPurgeException|IsPurgeException}} | |||
| | <code>bool IsPurgeException()</code> | |||
| | 返回这个Mordifier是否能被强力驱散清除 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.IsStunDebuff|IsStunDebuff}} | |||
| | <code>bool IsStunDebuff()</code> | |||
| |  返回这个Mordifier是否是眩晕类Debuff | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.OnCreated|OnCreated}} | |||
| | <code>void OnCreated(handle table)</code> | |||
| |  在Mordifier被创建时运行 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.OnDestroy|OnDestroy}} | |||
| | <code>void OnDestroy()</code> | |||
| | 在Mordifier清楚时运行 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.OnIntervalThink|OnIntervalThink}} | |||
| | <code>void OnIntervalThink()</code> | |||
| | 当计时器间隔开始时 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.OnRefresh|OnRefresh}} | |||
| | <code>void OnRefresh(handle table)</code> | |||
| | 当Mordifier被刷新时运行 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.RemoveOnDeath|RemoveOnDeath}} | |||
| | <code>bool RemoveOnDeath()</code> | |||
| | 返回持有者死亡时Mordifier是否被移除 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua.StatusEffectPriority|StatusEffectPriority}} | |||
| | <code>int StatusEffectPriority()</code> | |||
| | 状态特效的显示优先级 (更高的数字在Buff栏中被优先显示) | |||
| |} | |||
| === CDOTA_Modifier_Lua_Horizontal_Motion === | |||
| ''No Description Set'' | |||
| ''Global accessor variable:'' <code>Unknown</code> | |||
| {| class="standard-table" style="width: 100%;" | |||
| ! 函数 | |||
| ! 函数原型  | |||
| ! 解释  | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua_Horizontal_Motion.ApplyHorizontalMotionController|ApplyHorizontalMotionController}} | ||
| | <code> | | <code>bool ApplyHorizontalMotionController() </code> | ||
| |  | | 启动水平运动控制器的特效。启动成功后返回True。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua_Horizontal_Motion.GetPriority|GetPriority}} | ||
| | <code>int  | | <code>int GetPriority() </code> | ||
| |  | | 获取优先级。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua_Horizontal_Motion.OnHorizontalMotionInterrupted|OnHorizontalMotionInterrupted}} | ||
| | <code> | | <code>void OnHorizontalMotionInterrupted() </code> | ||
| |  | | 当运动被打断时进行回调。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua_Horizontal_Motion.SetPriority|SetPriority}} | ||
| | <code>int  | | <code>void SetPriority(int nMotionPriority) </code> | ||
| |  | | 设置优先级。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua_Horizontal_Motion.UpdateHorizontalMotion|UpdateHorizontalMotion}} | ||
| |  | | <code>void UpdateHorizontalMotion(handle me, float dt) </code> | ||
| | 根据给定的间隔对NPC施加水平运动 | |||
| |} | |||
| === CDOTA_Modifier_Lua_Motion_Both === | |||
| ''No Description Set'' | |||
| | <code>void  | |||
| |  | |||
| | | |||
| ''Global accessor variable:'' <code>Unknown</code> | |||
| '' | |||
| {| class="standard-table" style="width: 100%;" | {| class="standard-table" style="width: 100%;" | ||
| !  | ! 函数 | ||
| !  | ! 函数原型  | ||
| !  | ! 解释  | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua_Motion_Both.ApplyHorizontalMotionController|ApplyHorizontalMotionController}} | ||
| | <code> | | <code>bool ApplyHorizontalMotionController() </code> | ||
| | 启动水平运动控制器的特效。启动成功后返回True。 | |||
| |  | |||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua_Motion_Both.ApplyVerticalMotionController|ApplyVerticalMotionController}} | ||
| | <code> | | <code>bool ApplyVerticalMotionController() </code> | ||
| |  | | 启动垂直运动控制器的特效。启动成功后返回True。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua_Motion_Both.GetPriority|GetPriority}} | ||
| | <code> | | <code>int GetPriority() </code> | ||
| |  | | 获取优先级。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua_Motion_Both.OnHorizontalMotionInterrupted|OnHorizontalMotionInterrupted}} | ||
| | <code>void  | | <code>void OnHorizontalMotionInterrupted() </code> | ||
| |  | | 当水平运动被打断时进行回调。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua_Motion_Both.OnVerticalMotionInterrupted|OnVerticalMotionInterrupted}} | ||
| | <code>void  | | <code>void OnVerticalMotionInterrupted() </code> | ||
| |  | | 当竖直运动被打断时进行回调。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua_Motion_Both.SetPriority|SetPriority}} | ||
| | <code>void  | | <code>void SetPriority(int nMotionPriority) </code> | ||
| |  | | 设置优先级。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua_Motion_Both.UpdateHorizontalMotion|UpdateHorizontalMotion}} | ||
| | <code>handle  | | <code>void UpdateHorizontalMotion(handle me, float dt) </code> | ||
| |  | | 根据给定的间隔对NPC施加水平运动。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua_Motion_Both.UpdateVerticalMotion|UpdateVerticalMotion}} | ||
| | <code>handle  | | <code>void UpdateVerticalMotion(handle me, float dt) </code> | ||
| |  | | 根据给定的间隔对NPC施加竖直运动。 | ||
| |} | |} | ||
| === CDOTA_Modifier_Lua_Vertical_Motion === | |||
| ''No Description Set'' | |||
| ''Global accessor variable:'' <code>Unknown</code> | |||
| '' | |||
| {| class="standard-table" style="width: 100%;" | {| class="standard-table" style="width: 100%;" | ||
| !  | ! 函数 | ||
| !  | ! 函数原型  | ||
| !  | ! 解释  | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua_Vertical_Motion.ApplyVerticalMotionController|ApplyVerticalMotionController}} | ||
| | <code> | | <code>bool ApplyVerticalMotionController() </code> | ||
| |  | | 启动垂直运动控制器的特效。启动成功后返回True。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua_Vertical_Motion.GetMotionPriority|GetMotionPriority}} | ||
| | <code> | | <code>int GetMotionPriority() </code> | ||
| |  | | 获取优先级。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua_Vertical_Motion.OnVerticalMotionInterrupted|OnVerticalMotionInterrupted}} | ||
| | <code> | | <code>void OnVerticalMotionInterrupted() </code> | ||
| |  | | 当竖直运动被打断时进行回调 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua_Vertical_Motion.SetMotionPriority|SetMotionPriority}} | ||
| | <code> | | <code>void SetMotionPriority(int nMotionPriority) </code> | ||
| |  | | 设置优先级。 | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Modifier_Lua_Vertical_Motion.UpdateVerticalMotion|UpdateVerticalMotion}} | ||
| | <code>void UpdateVerticalMotion(handle me, float dt) </code> | |||
| | 根据给定的间隔对NPC施加竖直运动。 | |||
| |  | |||
| | <code>void  | |||
| |  | |||
| |} | |} | ||
| === CDOTA_Item_Lua === | |||
| ''No Description Set'' | |||
| ''Global accessor variable:'' <code>Unknown</code> | |||
| '' | |||
| {| class="standard-table" style="width: 100%;" | {| class="standard-table" style="width: 100%;" | ||
| !  | ! 函数 | ||
| !  | ! 函数原型  | ||
| !  | ! 解释  | ||
| |- | |- | ||
| |  | | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.CastFilterResult|CastFilterResult}} | ||
| | <code>int  | | <code>int CastFilterResult()</code> | ||
| |  | | 判断一个无目标的命令是否有效 | ||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.CastFilterResultLocation|CastFilterResultLocation}} | |||
| | <code>int CastFilterResultLocation(Vector vLocation)</code> | |||
| | (Vector vLocation)判断一个作用于地点的命令是否有效 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.CastFilterResultTarget|CastFilterResultTarget}} | |||
| | <code>int CastFilterResultTarget(handle hTarget)</code> | |||
| | (HSCRIPT hTarget) 判断一个作用于目标的命令是否有效 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.GetAssociatedPrimaryAbilities|GetAssociatedPrimaryAbilities}} | |||
| | <code>string GetAssociatedPrimaryAbilities()</code> | |||
| | Returns abilities that are stolen simultaneously, or otherwise related in functionality. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.GetAssociatedSecondaryAbilities|GetAssociatedSecondaryAbilities}} | |||
| | <code>string GetAssociatedSecondaryAbilities()</code> | |||
| | Returns other abilities that are stolen simultaneously, or otherwise related in functionality. Generally hidden abilities. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.GetBehavior|GetBehavior}} | |||
| | <code>int GetBehavior()</code> | |||
| | 返回技能的施法动作类型 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.GetCastRange|GetCastRange}} | |||
| | <code>int GetCastRange(Vector vLocation, handle hTarget)</code> | |||
| | 返回技能的施法范围 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.GetChannelledManaCostPerSecond|GetChannelledManaCostPerSecond}} | |||
| | <code>int GetChannelledManaCostPerSecond(int iLevel)</code> | |||
| | 返回当前等级下,技能持续施法时的每秒魔法消耗 (当前为-1) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.GetChannelTime|GetChannelTime}} | |||
| | <code>float GetChannelTime()</code> | |||
| | 返回技能的持续施法时间 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.GetConceptRecipientType|GetConceptRecipientType}} | |||
| | <code>int GetConceptRecipientType()</code> | |||
| | 返回该技能被释放时将听到语音的单位 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.GetCooldown|GetCooldown}} | |||
| | <code>float GetCooldown(int iLevel)</code> | |||
| | 返回技能的CD | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.GetCustomCastError|GetCustomCastError}} | |||
| | <code>string GetCustomCastError()</code> | |||
| | 返回一条失效的无目标命令的错误信息 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.GetCustomCastErrorLocation|GetCustomCastErrorLocation}} | |||
| | <code>string GetCustomCastErrorLocation(Vector vLocation)</code> | |||
| | (Vector vLocation) 返回一条失效的作用与地点的命令的错误信息 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.GetCustomCastErrorTarget|GetCustomCastErrorTarget}} | |||
| | <code>string GetCustomCastErrorTarget(handle hTarget)</code> | |||
| | (HSCRIPT hTarget) 返回一条失效的指向目标的命令的错误信息 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.GetGoldCost|GetGoldCost}} | |||
| | <code>int GetGoldCost(int iLevel)</code> | |||
| | 返回某等级的金钱花费(当前为-1) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.GetIntrinsicModifierName|GetIntrinsicModifierName}} | |||
| | <code>string GetIntrinsicModifierName()</code> | |||
| | 返回被该技能被动地施加的Mordifier | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.GetManaCost|GetManaCost}} | |||
| | <code>int GetManaCost(int iLevel)</code> | |||
| | 返回某等级的魔法消耗(当前为-1) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.GetPlaybackRateOverride|GetPlaybackRateOverride}} | |||
| | <code>float GetPlaybackRateOverride()</code> | |||
| | 返回施法动画的播放速度 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.IsHiddenAbilityCastable|IsHiddenAbilityCastable}} | |||
| | <code>bool IsHiddenAbilityCastable()</code> | |||
| | 返回当该技能不在动作面板上时是否能使用 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.IsHiddenWhenStolen|IsHiddenWhenStolen}} | |||
| | <code>bool IsHiddenWhenStolen()</code> | |||
| | 返回该技能被技能窃取后是否是隐藏的 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.IsRefreshable|IsRefreshable}} | |||
| | <code>bool IsRefreshable()</code> | |||
| | 返回该技能是否能被刷新球刷新 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.IsStealable|IsStealable}} | |||
| | <code>bool IsStealable()</code> | |||
| | 返回该技能是否能被窃取 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.OnAbilityPhaseInterrupted|OnAbilityPhaseInterrupted}} | |||
| | <code>void OnAbilityPhaseInterrupted()</code> | |||
| | 施法被打断 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.OnAbilityPhaseStart|OnAbilityPhaseStart}} | |||
| | <code>bool OnAbilityPhaseStart()</code> | |||
| | 施法开始(施法成功时返回True) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.OnChannelFinish|OnChannelFinish}} | |||
| | <code>void OnChannelFinish(bool bInterrupted)</code> | |||
| | (bool bInterrupted) 持续施法完成 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.OnChannelThink|OnChannelThink}} | |||
| | <code>void OnChannelThink(float flInterval)</code> | |||
| | (float flInterval)持续施法开始 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.OnHeroCalculateStatBonus|OnHeroCalculateStatBonus}} | |||
| | <code>void OnHeroCalculateStatBonus()</code> | |||
| | Caster (hero only) gained a level, skilled an ability, or received a new stat bonus. | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.OnHeroDiedNearby|OnHeroDiedNearby}} | |||
| | <code>void OnHeroDiedNearby(handle unit, handle attacker, handle table)</code> | |||
| | 一个英雄在附近死亡 (比如说骨灰盒的效果)时, 获取参数表 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.OnHeroLevelUp|OnHeroLevelUp}} | |||
| | <code>void OnHeroLevelUp()</code> | |||
| | 施法者升级 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.OnInventoryContentsChanged|OnInventoryContentsChanged}} | |||
| | <code>void OnInventoryContentsChanged()</code> | |||
| | 施法者物品库存发生变化 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.OnItemEquipped|OnItemEquipped}} | |||
| | <code>void OnItemEquipped(handle hItem)</code> | |||
| | ( HSCRIPT hItem ) 施法者装备了物品 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.OnOwnerDied|OnOwnerDied}} | |||
| | <code>void OnOwnerDied()</code> | |||
| | 施法者死亡 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.OnOwnerSpawned|OnOwnerSpawned}} | |||
| | <code>void OnOwnerSpawned()</code> | |||
| | 施法者第一次出生或重生 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.OnProjectileHit|OnProjectileHit}} | |||
| | <code>bool OnProjectileHit(handle hTarget, Vector vLocation)</code> | |||
| | (HSCRIPT hTarget, Vector vLocation) 投射物撞击到某目标或者到达指定位置 (目标不可用) | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.OnProjectileThink|OnProjectileThink}} | |||
| | <code>void OnProjectileThink(Vector vLocation)</code> | |||
| | (Vector vLocation) 投射物正在运动 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.OnSpellStart|OnSpellStart}} | |||
| | <code>void OnSpellStart()</code> | |||
| | 施法前摇结束,技能效果开始 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.OnStolen|OnStolen}} | |||
| | <code>void OnStolen(handle hSourceAbility)</code> | |||
| | ( HSCRIPT hAbility ) 当技能被窃取时,进行的某特殊行为 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.OnToggle|OnToggle}} | |||
| | <code>void OnToggle()</code> | |||
| | 技能被开启/关闭 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.OnUnStolen|OnUnStolen}} | |||
| | <code>void OnUnStolen()</code> | |||
| | 当技能未被窃取时,进行的某特殊行为 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.OnUpgrade|OnUpgrade}} | |||
| | <code>void OnUpgrade()</code> | |||
| | 技能升级 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.ProcsMagicStick|ProcsMagicStick}} | |||
| | <code>bool ProcsMagicStick()</code> | |||
| | 返回该技能是否会增加周围单位的魔棒点数 | |||
| |-  | |||
| | {{L|Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_Lua.SpeakTrigger|SpeakTrigger}} | |||
| | <code>int SpeakTrigger()</code> | |||
| | 返回所使用的语音类型 | |||
| |} | |} | ||
| {{shortpagetitle}} | |||
| [[Category: Dota 2 Workshop Tools]] | |||
| { | |||
Latest revision as of 07:54, 11 July 2024
 注意: This page is automatically generated.  Any changes may be overwritten
注意: This page is automatically generated.  Any changes may be overwritten
  
从Lua 获取 DOTA 2 scripts 接口
Lua 是一种动态类型语言dynamically typed,意味着在编写代码时你不需要显式地声明变量的类型。Lua 会在运行时自动推断变量的类型。然而,DOTA 2的引擎主要是用 C++ 编写的,C++ 是一种静态类型语言statically typed,要求程序员在编译时明确变量的类型。
当你使用 Lua 脚本与 DOTA 2 的 C++ API 交互时,由于这两种语言在类型处理上的差异,你需要特别注意你传递给 API 的数据类型。如果你尝试向 API 函数传递错误的数据类型,你将在 Vconsole(游戏内的控制台)中收到一个错误消息,告诉你传递了什么以及它期望的是什么类型。
例如,如果某个 API 函数期望接收一个整数作为参数,但你错误地传递了一个字符串,那么游戏引擎将无法正确处理这个参数,并且会在 Vconsole 中给出一个错误提示,告诉你期望一个整数但却收到了一个字符串。
因此,当你使用 Lua 调用 DOTA 2 的 C++ API 时,确保你了解每个函数期望的参数类型,并相应地传递正确的数据类型是非常重要的。这有助于避免运行时错误,并确保你的代码能够按预期工作。
Global
全局函数,可以被任何类使用。
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| AddFOWViewer | void AddFOWViewer(int int_1, Vector Vector_2, float float_3, float float_4, bool bool_5)  | 为指定队伍增加临时视野 ( nTeamID, vLocation, flRadius, flDuration, bObstructedVision) | 
| AngleDiff | float AngleDiff(float ang1, float ang2) | 返回两个偏航角度之差 | 
| AppendToLogFile | void AppendToLogFile(string a, string b) | 在服务器日志文件上增加一个string | 
| ApplyDamage | float ApplyDamage(handle DamageTable) | 对单位造成伤害,Table输入:victim, attacker, damage, damage_type, damage_flags, ability | 
| AxisAngleToQuaternion | Quaternion AxisAngleToQuaternion(Vector a, float b)(vector,float)  | 构造一个四元数,表现出围绕给定的vector 轴线的旋转角 | 
| CalcClosestPointOnEntityOBB | Vector CalcClosestPointOnEntityOBB(handle handle_1, Vector Vector_2) | 计算实体的OBB上最接近的两个点。 | 
| CalcDistanceBetweenEntityOBB | float CalcDistanceBetweenEntityOBB(handle handle_1, handle handle_2) | 计算两个实体的OBB间距离。如果返回值为负,代表输入值有错误。 返回值为0则代表OBB互相重叠。 | 
| CancelEntityIOEvents | void CancelEntityIOEvents(ehandle a) | 为特定的实体创建所有输入/输出事件 | 
| ClearTeamCustomHealthbarColor | void ClearTeamCustomHealthbarColor(int int_1)( teamNumber )  | 清除自定义血条颜色。 | 
| CreateEffect | bool CreateEffect(handle a) | 传递table - 输入:实体,效果 | 
| CreateHeroForPlayer | handle CreateHeroForPlayer(string unitName, handle player) | 用DOTA英雄的dota_npc_units.txt中的名字创建它并把它设为给定玩家的控制英雄 | 
| CreateHTTPRequest | handle CreateHTTPRequest(string string_1, string string_2)  | 生成一个HTTP请求。 | 
| CreateItem | handle CreateItem(string item_name, handle owner, handle owner) | 用类名称item_name创建一个owner可以使用的物品 | 
| CreateItemOnPositionForLaunch | handle CreateItemOnPositionForLaunch(Vector Vector_1, handle handle_2) | 在给定地点生成一个实际物品。 目标地点可以是空中(但这不会清空这个位置) | 
| CreateItemOnPositionSync | handle CreateItemOnPositionSync(Vector a, handle b) | 在给定位置创建一个可见的物品 | 
| CreateModifierThinker | handle CreateModifierThinker(handle handle_1, handle handle_2, string string_3, handle handle_4, Vector Vector_5, int int_6, bool bool_7) | 生成一个不和任何NPC相关联的Modifier。 ( hCaster, hAbility, modifierName, paramTable, vOrigin, nTeamNumber, bPhantomBlocker ) | 
| CreateTempTree | void CreateTempTree(Vector Vector_1, float float_2) | 生成一颗临时存在的树。 (vLocation, flDuration). | 
| CreateTrigger | handle CreateTrigger(Vector a, Vector b, Vector c) | CreateTrigger( vecMin, vecMax ) : 创建并返回一个AABB触发器 | 
| CreateTriggerRadiusApproximate | handle CreateTriggerRadiusApproximate(Vector a, float b) | CreateTriggerRadiusApproximate( vecOrigin, flRadius ) : 创建并返回一个比给定radius大的AABB触发器 | 
| CreateUnitByName | handle CreateUnitByName(string a, Vector b, bool c, handle d, handle e, int f) | 用DOTA单位的dota_npc_units.txt中的名字创建它( szUnitName, vLocation, bFindClearSpace, hNPCOwner, hUnitOwner, iTeamNumber ) | 
| CreateUnitByNameAsync | int CreateUnitByNameAsync(string a, Vector b, bool c, handle d, handle e, int f, handle g) | 用DOTA单位的dota_npc_units.txt中的名字创建它( szUnitName, vLocation, bFindClearSpace, hNPCOwner, hUnitOwner, iTeamNumber, hCallback ) | 
| CreateUnitFromTable | hscript CreateUnitFromTable(table unitProperties) | Creates a new data-driven entity with the given table | 
| cvar_getf | float cvar_getf(string a) | 获取给定cvar的值,返回float. | 
| cvar_setf | bool cvar_setf(string a, float b) | 设置给定cvar的值, 传递float. | 
| DebugBreak | void DebugBreak() | 在debugger(调试模式)中停止运行 | 
| DebugDrawBox | void DebugDrawBox(Vector origin, Vector min, Vector max, int r, int g, int b, int a, float duration) | 显示一个debug overlay窗口(origin, mins, maxs, r, g, b, a, duration ) | 
| DebugDrawBoxDirection | void  DebugDrawBoxDirection(Vector a, Vector b, Vector c, Vector d, Vector e, float f, float g) | 显示一个debug forward窗口(cent, min, max, forward, vRgb, a, duration) | 
| DebugDrawCircle | void DebugDrawCircle(Vector a, Vector b, float c, float d, bool e, float f) | 显示一个debug圆(center, vRgb, a, rad, ztest, duration) | 
| DebugDrawClear | void DebugDrawClear() | 尝试清理所有debug overlay信息 | 
| DebugDrawLine | void DebugDrawLine(Vector a, Vector b, int c, int d, int e, bool f, float g) | 显示一个debug overlay线段origin, target, r, g, b, ztest, duration) | 
| DebugDrawLine_vCol | void DebugDrawLine_vCol(Vector a, Vector b, Vector c, bool d, float e) | 使用vec颜色显示一个debug线段(start, end, vRgb, a, ztest, duration) | 
| DebugDrawScreenTextLine | void DebugDrawScreenTextLine(float a, float b, int c, string d, int e, int f, int g, int h, float i) | 显示给定行间距(lineoffset)的文字(x, y, lineOffset, text, r, g, b, a, duration) | 
| DebugDrawSphere | void DebugDrawSphere(Vector a, Vector b, float c, float d, bool e, float f) | 显示一个debug球(center, vRgb, a, rad, ztest, duration) | 
| DebugDrawText | void DebugDrawText(Vector a, string b, bool c, float d) | 显示3d文字(origin, text, bViewCheck, duration) | 
| DebugScreenTextPretty | void DebugScreenTextPretty(float a, float b, int c, string d, int e, int f, int g, int h, float i, string j, int k, bool l) | 显示漂亮的debug文字(x, y, lineOffset, text, r, g, b, a, duration, font, size, bBold) | 
| DoCleaveAttack | int DoCleaveAttack(handle handle_1, handle handle_2, handle handle_3, float float_4, float float_5, string string_6) | (hAttacker, hTarget, hAbility, fDamage, fRadius, effectName) | 
| DoEntFire | void DoEntFire(string a, string b, string c, float d, handle e, handle f)EntFire:  | 构造一个实体的输入/输出事件( szTarget, szAction, szValue, flDelay, hActivator, hCaller ) | 
| DoEntFireByInstanceHandle | void DoEntFireByInstanceHandle(handle a, string b, string c, float d, handle e, handle f) | EntFireByHandle:构造一个实体的输入/输出事件 | 
| DoIncludeScript | bool DoIncludeScript(string a, handle b) | 运行一个内部脚本 | 
| DoScriptAssert | void DoScriptAssert(bool a, string b) | ScriptAssert:断言传入数据是数值,输出信息并显示断言对话框(参考编程中的Assert功能,主要用于调试,译者注) | 
| DoUniqueString | string DoUniqueString(string a) | UniqueString:使用任意的根字符串构造一个保证在VM脚本运行周期内唯一的字符串。当给表增加数据但不确定已用关键字时有用 | 
| EmitAnnouncerSound | void EmitAnnouncerSound(string string_1) | 对所有玩家播放播音员的声音。 | 
| EmitAnnouncerSoundForPlayer | void EmitAnnouncerSoundForPlayer(string string_1, int int_2) | 对一位玩家播放播音员的音效。 | 
| EmitAnnouncerSoundForTeam | void EmitAnnouncerSoundForTeam(string string_1, int int_2) | 对一方队伍成员播放播音员的音效。 | 
| EmitAnnouncerSoundForTeamOnLocation | void EmitAnnouncerSoundForTeamOnLocation(string string_1, int int_2, Vector Vector_3) | 对在某个特定地点队伍成员播放播音员的音效 | 
| EmitGlobalSound | void EmitGlobalSound(string a) | 为所有玩家播放给定名称的音效 | 
| EmitSoundOn | void EmitSoundOn(string a, handle b) | 在一个实体上播放给定名称的音效 | 
| EmitSoundOnClient | void EmitSoundOnClient(string a, handle b) | 为指定玩家播放给定名称的音效 | 
| EmitSoundOnLocationForAllies | void EmitSoundOnLocationForAllies(Vector Vector_1, string string_2, handle handle_3) | 从处在某个地点的某个单位处播放音效,仅对这个单位的友军有效。(vLocation, soundName, hCaster) | 
| EmitSoundOnLocationWithCaster | void EmitSoundOnLocationWithCaster(Vector Vector_1, string string_2, handle handle_3) | 从处在某个地点的某个单位处播放音效。 (vLocation, soundName, hCaster). | 
| EntIndexToHScript | handle EntIndexToHScript(int a) | 把一个实体的整数索引转化为表达该实体脚本实例的HScript | 
| ExecuteOrderFromTable | void ExecuteOrderFromTable(handle a) | 从一个Script表发布命令 | 
| ExponentialDecay | float ExponentialDecay(float a, float b, float c)平 | 滑的曲线,接近0时减少较慢 | 
| FileToString | string FileToString(string a) | 从文件读取字符串给脚本,目录遍历似乎无效,字符'.','/'和'\\'被忽略,文件从C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\dota_ugc\game\dota\ems读取,函数的用途与StringToFile相反 | 
| FindClearSpaceForUnit | void FindClearSpaceForUnit(handle a, Vector b, bool c) | 在未被占用的地方创建单位 | 
| FindUnitsInRadius | table FindUnitsInRadius(int teamNumber, Vector position, handle cacheUnit, float radius, int teamFilter, int typeFilter, int flagFilter, int order, bool canGrowCache) | 在给定范围内用给定flags搜索单位( iTeamNumber, vPosition, hCacheUnit, flRadius, iTeamFilter, iTypeFilter, iFlagFilter, iOrder, bCanGrowCache ) | 
| FindUnitsInLine | table FindUnitsInLine(int teamNumber, Vector vStartPos, Vector vEndPos, handle cacheUnit, float width, int teamFilter, int typeFilter, int flagFilter)  | 在给定的一条线上用给定flags搜索单位 ( iTeamNumber, vStartPos, vEndPos, hCacheUnit, flWidth, iTeamFilter, iTypeFilter, iFlagFilter) | 
| FireEntityIOInputNameOnly | void FireEntityIOInputNameOnly(ehandle a, string b) | 触发实体的动作输入w/no数据 | 
| FireEntityIOInputString | void FireEntityIOInputString(ehandle a, string b, string c) | 用给定字符串(由你分配内存)触发实体的动作输入 | 
| FireEntityIOInputVec | void FireEntityIOInputVec(ehandle a, string b, Vector c) | 用给定的Vector( hEntity, szActionName, vector )触发实体的动作输入 | 
| FireGameEvent | void FireGameEvent(string eventName, handle parameterTable) | 触发一个预定义事件,可以在custom_events.txt或dota的资源/.res中找到 | 
| FireGameEventLocal | void FireGameEventLocal(string a, handle b) | 触发一个游戏事件但不广播给客户端 | 
| FrameTime | float FrameTime() | 获取上一帧在服务器上花费的时间 | 
| GetEntityIndexForTreeId | <unknown> GetEntityIndexForTreeId(unsigned unsigned_1) | 对于指定为DOTA_UNIT_ORDER_CAST_TARGET_TREE下的entindex_target类型的树,这个方法用来获取其实体索引。 | 
| GetFrameCount | int GetFrameCount() | 返回引擎当然的帧数 | 
| GetFrostyBoostAmount | float GetFrostyBoostAmount(int a, int b) | No Description Set | 
| GetFrostyPointsForRound | int GetFrostyPointsForRound(int a, int b, int c) | No Description Set | 
| GetGoldFrostyBoostAmount | float GetGoldFrostyBoostAmount(int a, int b) | No Description Set | 
| GetGoldFrostyPointsForRound | int GetGoldFrostyPointsForRound(int a, int b, int c) | No Description Set | 
| GetGroundHeight | float GetGroundHeight(Vector Vector_1, handle handle_2) | |
| GetGroundPosition | Vector GetGroundPosition(Vector a, handle b) | 返回移动到地面的供给位置。第二个参数是一个NPC,用于测量碰撞体积 | 
| GetItemCost | int GetItemCost(string string_1) | 通过名称获取一个物品的价格。 | 
| GetListenServerHost | handle GetListenServerHost() | 在广播服务器获取本地玩家 | 
| GetMapName | string GetMapName() | 获取地图的名字 | 
| GetMaxOutputDelay | float GetMaxOutputDelay(ehandle a, string b) | 获取输出事件的最大延迟 | 
| GetPhysAngularVelocity | Vector GetPhysAngularVelocity(handle a) | 获取VPHYS或普通物体的角速度 | 
| GetPhysVelocity | Vector GetPhysVelocity(handle a) | 获取VPHYS或普通物体的速度 | 
| GetSystemDate | string GetSystemDate() | 获取真实世界的日期 | 
| GetSystemTime | string GetSystemTime() | 获取真实世界的时间 | 
| GetTeamHeroKills | int GetTeamHeroKills(int int_1) | ( int teamID ) | 
| GetTeamName | string GetTeamName(int teamNumber) | Returns the team name | 
| GetTreeIdForEntityIndex | int GetTreeIdForEntityIndex(int int_1) | 获取已给定实体索引的树的ID | 
| GetWorldMaxX | float GetWorldMaxX() | 获取地图X坐标最大值 | 
| GetWorldMaxY | float GetWorldMaxY() | 获取地图Y坐标最大值 | 
| GetWorldMinX | float GetWorldMinX() | 获取地图X坐标最小值 | 
| GetWorldMinY | float GetWorldMinY() | 获取地图Y坐标最小值 | 
| InitLogFile | void InitLogFile(string a, string b) | 如果给定文件不存在,用给定内容创建它;如果存在则不做任何动作 | 
| IsClient | bool IsClient() | Returns true if this is lua running from the client.dll. | 
| IsDedicatedServer | bool IsDedicatedServer() | 如果服务器开放返回true | 
| IsMarkedForDeletion | bool IsMarkedForDeletion(handle a) | 如果实体有效并被标记为删除返回true | 
| IsServer | bool IsServer()  | 当Lua代码是从Server.dll中被运行的时候,返回True。 | 
| IsValidEntity | bool IsValidEntity(handle a) | 检查给定hScript是否为有效实体 | 
| IsInToolsMode | bool IsInToolsMode()  | 当此Lua脚本在Dota2创意工坊工具模式下运行时返回true。 | 
| LimitPathingSearchDepth | void LimitPathingSearchDepth(float float_1) | 设置寻路系统的搜索范围(应该是对于深度) | 
| LinkLuaModifier | void LinkLuaModifier(string modifier_name, string file_path, int motion_controller_type) | 将一个Lua定义的Modifier和与其相关的类联系起来。如果这个Modifier的定义在Vscript根目录下,那么第二个argument (file_path) 可能会被忽略。 | 
| ListenToGameEvent | int ListenToGameEvent(string EventName, handle functionNameToCall, handle context) | 从脚本给游戏事件注册一个listner,Tip:另外,为listenstandard engine events,你也可以创建自己的事件,把它们放置在/scripts/custom_events.txt. | 
| LoadKeyValues | table LoadKeyValues(string a) | 用给定的关键字文件创建table | 
| LoadKeyValuesFromString | table LoadKeyValuesFromString(string a) | 用给定的关键字string创建table | 
| MakeStringToken | int MakeStringToken(string a) | 检查给定的hScript是否是有效实体(?) | 
| MinimapEvent | void MinimapEvent(int int_1, handle handle_2, int int_3, int int_4, int int_5, int int_6) | 设置一个小地图事件。 (nTeamID, hEntity, nXCoord, nYCoord, nEventType, nEventDuration). | 
| Msg | void Msg(string a) | 输出信息 | 
| PauseGame | void PauseGame(bool a) | 暂停/开始游戏 | 
| PlayerInstanceFromIndex | handle PlayerInstanceFromIndex(int a) | 通过索引获取玩家的脚本实例 | 
| PrecacheEntityFromTable | void PrecacheEntityFromTable(string a, handle b, handle c) | 用关键字从table中预缓存一个实体 | 
| PrecacheEntityListFromTable | void PrecacheEntityListFromTable(handle a, handle b) | 预缓存一个实体关键字列表 | 
| PrecacheItemByNameAsync | void PrecacheItemByNameAsync(string a, handle b) | 用DOTA物品的dota_npc_items.txt名称异步预缓存它,结束时提供回调 | 
| PrecacheItemByNameSync | void PrecacheItemByNameSync(string a, handle b) | 用DOTA物品的dota_npc_items.txt名称预缓存它 | 
| PrecacheModel | void PrecacheModel(string a, handle b)( modelName, context ) -  | 手动预缓存一个单一模型 | 
| PrecacheResource | void PrecacheResource(string precacheMode, string resource, handle context) | 手动预缓存一个单一资源 | 
| PrecacheUnitByNameAsync | void PrecacheUnitByNameAsync(string a, handle b) | 用DOTA单位的dota_npc_units.txt名称异步预缓存它,结束时提供回调 | 
| PrecacheUnitByNameSync | void PrecacheUnitByNameSync(string a, handle b) | 用DOTA单位的dota_npc_units.txt名称预缓存它 | 
| PrintLinkedConsoleMessage | void PrintLinkedConsoleMessage(string a, string b) | Print a console message with a linked console command | 
| RandomFloat | float RandomFloat(float a, float b) | 获取范围内随机float | 
| RandomInt | int RandomInt(int a, int b) | 获取范围内随机int | 
| RandomVector | Vector RandomVector(float maxLength) | 获取随机二维矢量 | 
| RegisterSpawnGroupFilterProxy | void RegisterSpawnGroupFilterProxy(string a) | 为一个脚本基础的生成单位过滤器创建一个C代理 | 
| ReloadMOTD | void ReloadMOTD() | 重载MotD文件 | 
| RemoveSpawnGroupFilterProxy | void RemoveSpawnGroupFilterProxy(string a) | 为一个脚本基础的生成单位过滤器删除一个C代理 | 
| ResolveNPCPositions | void ResolveNPCPositions(Vector Vector_1, float float_2) | Check and fix units that have been assigned a position inside collision radius of other NPCs. 检查并固定一个被分配到其他NPC的碰撞半径内的某位置的单位。 | 
| RollPercentage | bool RollPercentage(int a) | 随机生成1-100内的数,小于等于给定数则返回true | 
| RotateOrientation | QAngle RotateOrientation(QAngle a, QAngle b) | 旋转一个QAngle,用另一个QAngle | 
| RotateQuaternionByAxisAngle | Quaternion RotateQuaternionByAxisAngle(Quaternion a, Vector b, float c) | 围绕给定vector轴线旋转一个四元数 | 
| RotationDelta | QAngle RotationDelta(QAngle a, QAngle b) | 两个QAngle间的delta值 | 
| rr_AddDecisionRule | bool rr_AddDecisionRule(handle a) | 给决定数据库增加一个规则 | 
| rr_CommitAIResponse | bool rr_CommitAIResponse(handle a, handle b) | 把QueryBestResponse的结果交付给定的实体播放,用参数调用(entity, airesponse) | 
| rr_GetResponseTargets | handle rr_GetResponseTargets() | 获取所有提供的表达者目标的table,格式为{ name : handle, name: handle }. | 
| rr_QueryBestResponse | bool rr_QueryBestResponse(handle a, handle b, handle c) | 参数: ( hEnt, hQuery, hResult ) // 静态 : 对实体的回复系统测试 'query'并返回最佳回复(无回复返回nil) | 
| Say | void Say(handle entity, string message, bool teamOnly) | 让实体说string,是否仅限队友可见 | 
| ScreenShake | void ScreenShake(Vector a, float b, float c, float d, float e, int f, bool g) | 用下列参数开始镜头摇晃:vecCenter, flAmplitude, flFrequency, flDuration, flRadius, eCommand( SHAKE_START = 0, SHAKE_STOP = 1 ), bAirShake | 
| SendFrostivusTimeElapsedToGC | void SendFrostivusTimeElapsedToGC() | No Description Set | 
| SendFrostyPointsMessageToGC | void SendFrostyPointsMessageToGC(handle a) | No Description Set | 
| SendOverheadEventMessage | void SendOverheadEventMessage(handle handle_1, int int_2, handle handle_3, int int_4, handle handle_5) | ( DOTAPlayer sendToPlayer, int iMessageType, Entity targetEntity, int iValue, DOTAPlayer sourcePlayer ) - sendToPlayer和sourcePlayer 允许为nil。 - iMessageType是OVERHEAD_ALERT_分类中的一个。 | 
| SendToConsole | void SendToConsole(string a) | 给控制台发送string作为客户端命令 | 
| SendToServerConsole | void SendToServerConsole(string a) | 给控制台发送string作为服务器命令 | 
| SetOpvarFloatAll | void SetOpvarFloatAll(string a, string b, string c, float d) | 为所有玩家设置opvar值 | 
| SetOpvarFloatPlayer | void SetOpvarFloatPlayer(string a, string b, string c, float d, handle e) | 为单一玩家设置opvar值( szStackName, szOperatorName, szOpvarName, flOpvarValue, hEnt ) | 
| SetQuestName | void SetQuestName(string a) | 设置当前任务名 | 
| SetQuestPhase | void SetQuestPhase(int a) | 设置当前任务阶段 | 
| SetRenderingEnabled | void SetRenderingEnabled(ehandle a, bool b) | 为ehandle设置rendering(渲染)开/关 | 
| SetTeamCustomHealthbarColor | void SetTeamCustomHealthbarColor(int int_1, int int_2, int int_3, int int_4) | ( teamNumber, r, g, b ) | 
| ShowCustomHeaderMessage | void ShowCustomHeaderMessage(string message, int player, int value, float time) | Displays a header message from player | 
| ShowGenericPopup | void ShowGenericPopup(string title, string content, string unknown, string unknown, int containerType) | 对所有玩家显示通用的弹出窗口 | 
| ShowGenericPopupToPlayer | void ShowGenericPopupToPlayer(handle a, string b, string c, string d, string e, int f) | 对给定玩家显示通用的弹出窗口 | 
| ShowMessage | oid ShowMessage(string a) | 在所有客户端显示hud信息 | 
| SpawnEntityFromTableSynchronous | handle SpawnEntityFromTableSynchronous(string a, handle b) | 从table同步生成一个实体 | 
| SpawnEntityGroupFromTable | bool SpawnEntityGroupFromTable(handle groupSpawnTables, bool bAsync, handle hCallback) | 从一系列生成表中分级生成一个实体组 | 
| SpawnEntityListFromTableAsynchronous | int SpawnEntityListFromTableAsynchronous(handle a, handle b) | 从一个生成表列表异步生成一个实体组,生成完成后会触发一次回调 | 
| SpawnEntityListFromTableSynchronous | handle SpawnEntityListFromTableSynchronous(handle a) | 从一个生成表列表同步生成一个实体组. | 
| SplineQuaternions | Quaternion SplineQuaternions(Quaternion a, Quaternion b, float c) | (quaternion,quaternion,float)非常基础的v0到v1差值,t属于[0,1]为参数 | 
| SplineVectors | Vector SplineVectors(Vector a, Vector b, float c) | (vector,vector,float)非常基础的v0到v1差值,t属于[0,1]为参数 | 
| StartSoundEvent | void StartSoundEvent(string a, handle b) | 开始音效事件 | 
| StartSoundEventFromPosition | void StartSoundEventFromPosition(string string_1, Vector Vector_2) | 在某个位置开始音效事件。 | 
| StartSoundEventFromPositionReliable | void StartSoundEventFromPositionReliable(string string_1, Vector Vector_2)  | 通过可靠的传递,在某个位置开始音效事件。 | 
| StartSoundEventFromPositionUnreliable | void StartSoundEventFromPositionUnreliable(string string_1, Vector Vector_2) | 通过随意的传递,在某个位置开始音效事件。 | 
| StartSoundEventReliable | void StartSoundEventReliable(string string_1, handle handle_2) | 通过可靠的传递,开始音效事件。 | 
| StartSoundEventUnreliable | void StartSoundEventUnreliable(string string_1, handle handle_2) | 通过随意的传递,开始音效事件。 | 
| StopEffect | void StopEffect(handle a, string b) | (hEntity, szEffectName) | 
| StopListeningToAllGameEvents | void StopListeningToAllGameEvents(handle a) | 停止listen在给定内容内的所有游戏事件 | 
| StopListeningToGameEvent | bool StopListeningToGameEvent(int a) | 停止listen特定的游戏事件 | 
| StopSoundEvent | void StopSoundEvent(string a, handle b) | 停止音效事件 | 
| StopSoundOn | void StopSoundOn(string soundName, handle playingEntity) | 停止实体上的命名音效 | 
| StringToFile | bool StringToFile(string a, string b)  | 目录遍历似乎无效,字符'.','/'和'\\'被忽略,文件名不能为空,也不能包含忽略字符,否则函数无效并返回false,一次只能保存一个字符串,每次调用文件都被覆盖,文件以一个NUL字符结尾,文件被保存在C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\dota_ugc\game\dota\ems,函数用途与FileToString相反 | 
| Time | float Time() | 获取当前服务器时间 | 
| TraceCollideable | bool TraceCollideable(handle a) | 传递table - 输入: start, end, ent, (可选 mins, maxs) -- 输出: pos, fraction, hit, startsolid, normal | 
| TraceHull | bool TraceHull(handle a) | 传递table - 输入: start, end, min, max, mask, ignore -- 输出: pos, fraction, hit, enthit, startsolid | 
| TraceLine | bool TraceLine(handle a) | 传递table - 输入: startpos, endpos, mask, ignore -- 输出: pos, fraction, hit, enthit, startsolid | 
| UnitFilter | int UnitFilter(handle handle_1, int int_2, int int_3, int int_4, int int_5) | 当一个单位通过一系列过滤器时进行检查。 (hNPC, nTargetTeam, nTargetType, nTargetFlags, nTeam | 
| UnloadSpawnGroup | void UnloadSpawnGroup(string a) | 通过名称去除生成组 | 
| UnloadSpawnGroupByHandle | void UnloadSpawnGroupByHandle(int a) | 通过handle去除生成组 | 
| UpdateEventPoints | void UpdateEventPoints(handle a) | No Description Set | 
| UTIL_MessageText | void UTIL_MessageText(int playerId, string message, int r, int g, int b, int a) | 对特定的玩家显示信息。 | 
| UTIL_MessageText_WithContext | void UTIL_MessageText_WithContext(int playerId, string message, int r, int g, int b, int a, table context) | Sends a message to a specific player in the message box with a context table | 
| UTIL_MessageTextAll | void UTIL_MessageTextAll(string message, int r, int g, int b, int a) | 在文本框内对所有玩家显示信息。 | 
| UTIL_MessageTextAll_WithContext | void UTIL_MessageTextAll_WithContext(string message, int r, int g, int b, int a, table context) | Sends a message to everyone in the message box with a context table | 
| UTIL_Remove | void UTIL_Remove(handle a) | 删除给定实体 | 
| UTIL_RemoveImmediate | void UTIL_RemoveImmediate(handle a) | 立即删除给定实体 | 
| UTIL_ResetMessageText | void UTIL_ResetMessageText(int playerId) | 对某个玩家重新设置信息文本。 | 
| UTIL_ResetMessageTextAll | void UTIL_ResetMessageTextAll() | 对所有玩家重新设置信息文本。 | 
| VectorToAngles | QAngle VectorToAngles(Vector a) | 为Vector获取Qangle(没有滚动) | 
| Warning | void Warning(string a)  | 输出警告 | 
CBaseEntity
The base class for stuff
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| ApplyAbsVelocityImpulse | void ApplyAbsVelocityImpulse(Vector a)  | 添加一个速度冲击 | 
| ApplyLocalAngularVelocityImpulse | void ApplyLocalAngularVelocityImpulse(Vector a)  | 添加一个角速度的冲击 | 
| EmitSound | void EmitSound(string soundName)  | |
| EmitSoundParams | void EmitSoundParams(string soundName, int pitch, float volume, float soundTime)  | 播放/修改这个实体的声音.当音调,音量或播放时间大于零时改变声音 | 
| EyeAngles | QAngle EyeAngles()  | 获得这个实体的视角qangles | 
| EyePosition | Vector EyePosition()  | 获得指向视角位置的矢量,位置为绝对坐标 | 
| FirstMoveChild | handle FirstMoveChild()  | No Description Set | 
| GatherCriteria | void GatherCriteria(handle a)  | 返回一个表包含用在这个实体的判定的标准.这个表等同于传入脚本方法的调用. | 
| GetAbsOrigin | Vector GetAbsOrigin()  | No Description Set | 
| GetAngles | QAngle GetAngles()  | No Description Set | 
| GetAnglesAsVector | Vector GetAnglesAsVector()  | 获得实体的颠簸,偏航,摇晃的矢量 | 
| GetAngularVelocity | Vector GetAngularVelocity()  | 获得当前角速度,返回颠簸,偏航,摇晃的矢量 | 
| GetBaseVelocity | Vector GetBaseVelocity()  | 获得基础速度 | 
| GetBoundingMaxs | Vector GetBoundingMaxs()  | 获得一个包含最大范围,以物体为中心的矢量 | 
| GetBoundingMins | Vector GetBoundingMins()  | 获得一个包含最小范围,以物体为中心的矢量 | 
| GetBounds | table GetBounds()  | 获得一个以物体为中心,包含“Mins”和“Maxs”矢量的表 | 
| GetCenter | Vector GetCenter()  | 获得指向物体中心的矢量,以绝对坐标的形式 | 
| GetChildren | handle GetChildren()  | 获得继承这个实体的实体 | 
| GetContext | table GetContext(string a)  | GetContext( name ):检查一个对象的状态然后返回对象是否可用.可能返回string,float,或nil(如果对象没有找到) | 
| GetForwardVector | Vector GetForwardVector()  | 获得这个实体的前进矢量 | 
| GetHealth | int GetHealth()  | No Description Set | 
| GetLocalAngularVelocity | QAngle GetLocalAngularVelocity()  | 可能为当前角速度 | 
| GetLocalVelocity | Vector GetLocalVelocity()  | 获得实体相对速度 | 
| GetMaxHealth | int GetMaxHealth()  | No Description Set | 
| GetModelName | string GetModelName()  | 获得模型的名字 | 
| GetMoveParent | handle GetMoveParent()  | 如果在有继承对象,恢复实体所继承的对象 | 
| GetOrigin | Vector GetOrigin()  | No Description Set | 
| GetOwner | handle GetOwner()  | 获得实体的所有者 | 
| GetOwnerEntity | handle GetOwnerEntity()  | 获得拥有者的实体,如果有的话 | 
| GetRightVector | Vector GetRightVector()  | 获得实体的右方矢量 | 
| GetRootMoveParent | handle GetRootMoveParent()  | 如果在继承关系里,在继承关系中寻找所继承的根源对象 | 
| GetSoundDuration | float GetSoundDuration(string soundName, string actormodelname)  | 返回声音的播放时间.传入声音名字和可选的应用模型名字. | 
| GetTeam | int GetTeam()  | No Description Set | 
| GetUpVector | Vector GetUpVector()  | 获得实体的上方矢量 | 
| GetVelocity | Vector GetVelocity()  | No Description Set | 
| IsAlive | bool IsAlive()  | No Description Set. | 
| IsPlayer | bool IsPlayer()  | 是否为玩家的实体 | 
| IsNull | bool IsNull()  | 检查实体是否被C++删除了。 | 
| Kill | void Kill()  | No Description Set | 
| NextMovePeer | handle NextMovePeer()  | No Description Set | 
| OverrideFriction | void OverrideFriction(float a, float b)  | 暂时重设阻力的持续时间和值 | 
| PrecacheScriptSound | void PrecacheScriptSound(string a)  | 预载声音文件 | 
| SetAbsOrigin | void SetAbsOrigin(Vector origin)  | 设置绝对来源 | 
| SetAngles | void SetAngles(float pitch, float yaw, float roll)  | 设置实体的颠簸,偏航,摇晃 | 
| SetAngularVelocity | void SetAngularVelocity(float pitch, float yaw, float roll)  | 设置当前角速度,使用实数颠簸,偏航,摇晃速度 | 
| SetContext | void SetContext(string a, string b, float c)  | SetContext( 名字 , 值, 持续时间 ):存储任何在实体对话内容里的配对值.值是一个字符串.持续一段时间.(0代表永久) | 
| SetContextNum | void SetContextNum(string a, float b, float c)  | SetContext( 名字 , 值, 持续时间 ):存储任何在实体对话内容里的配对值.值是一个数字(int或者float).持续一段时间.(0代表永久) | 
| SetContextThink | void SetContextThink(string a, handle b, float c)  | 在这个实体上设置一个计时器( a:标示字符,b:执行函数 c:延迟执行的时间 ) | 
| SetForwardVector | void SetForwardVector(Vector forwardVec)  | 设置实体的方向为前进矢量 | 
| SetFriction | void SetFriction(float a)  | 设置玩家阻力,无视物体 | 
| SetGravity | void SetGravity(float a)  | 设置玩家引力,无视物体 | 
| SetHealth | void SetHealth(int hp)  | No Description Set | 
| SetMaxHealth | void SetMaxHealth(int maxHP)  | No Description Set | 
| SetModel | void SetModel(string modelName)  | No Description Set | 
| SetOrigin | void SetOrigin(Vector origin)  | No Description Set | 
| SetOwner | void SetOwner(handle owningEntity)  | 设定实体的所有者 | 
| SetParent | void SetParent(handle a, string b)  | 设定这个实体的所继承的父实体 | 
| SetRenderColor | void SetRenderColor(int a, int b, int c)  | SetRenderColor( r, g, b ):设定实体的渲染颜色 | 
| SetSize | void SetSize(Vector a, Vector b)  | No Description Set | 
| SetTeam | void SetTeam(int team)  | No Description Set | 
| SetVelocity | void SetVelocity(Vector a)  | No Description Set | 
| StopSound | void StopSound(string soundName)  | 停止播放这个实体的特定的声音 | 
| Trigger | void Trigger()  | 触发这个实体的触发器 | 
CEntities
No Description Set
Global accessor variable: Entities
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| CreateByClassname | handle CreateByClassname(string className)  | 用类名来创建一个实体 | 
| FindAllByClassname | table FindAllByClassname(string a)  | 通过类名来寻找所有实体.返回被找到实体的数组或表. | 
| FindAllByClassnameWithin | table FindAllByClassnameWithin(string a, Vector b, float c)  | 在一个半径范围内通过类名寻找实体. | 
| FindAllByModel | table FindAllByModel(string modelName)  | 通过模型名字来找到对象. | 
| FindAllByName | table FindAllByName(string name)  | 通过名字来寻找所有实体.返回被找到实体的数组或表. | 
| FindAllByNameWithin | table FindAllByNameWithin(string name, Vector origin, float maxRadius)  | 在半径范围内通过名字来寻找实体. | 
| FindAllByTarget | table FindAllByTarget(string targetName)  | 通过目标名字来寻找实体 | 
| FindAllInSphere | table FindAllInSphere(Vector origin, float maxRadius)  | 在(球形)范围内寻找实体 | 
| FindByClassname | handle FindByClassname(handle startFrom, string className)  | 通过类名寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 | 
| FindByClassnameNearest | handle FindByClassnameNearest(string className, Vector origin, float maxRadius)  | 在最近一个点通过类名寻找实体 | 
| FindByClassnameWithin | handle FindByClassnameWithin(handle startFrom, string className, Vector origin, float maxRadius)  | 在半径范围内通过类名寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 | 
| FindByModel | handle FindByModel(handle startFrom, string modelName)  | 通过模型名字寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 | 
| FindByModelWithin | handle FindByModelWithin(handle startFrom, string modelName, Vector origin, float maxRadius)  | 在半径范围内通过模型名字寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 | 
| FindByName | handle FindByName(handle lastEnt, string searchString)  | 通过名字寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 | 
| FindByNameNearest | handle FindByNameNearest(string name, Vector origin, float maxRadius)  | 通过名字寻找最近原点的实体 | 
| FindByNameWithin | handle FindByNameWithin(handle startFrom, string name, Vector origin, float maxRadius)  | 在半径范围内通过名字寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 | 
| FindByTarget | handle FindByTarget(handle startFrom, string targetName)  | 通过目标名字寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 | 
| FindInSphere | handle FindInSphere(handle startFrom, Vector origin, float maxRadius)  | 在半径范围内寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 | 
| First | handle First()  | 在实体数组或表中开始一个迭代程序 | 
| Next | handle Next(handle startFrom)  | 从指定列表中的实体开始迭代 | 
CEntityInstance
- extends CBaseEntity
 
 
 
 
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| ConnectOutput | void ConnectOutput(string a, string b)  | 添加一个I/O链接,这可以当特定输出触发时,在这个实体调用方法 | 
| Destroy | void Destroy()  | No Description Set | 
| DisconnectOutput | void DisconnectOutput(string a, string b)  | 从这个实体的I/O事件移除已连接的脚本方法 | 
| DisconnectRedirectedOutput | void DisconnectRedirectedOutput(string a, string b, handle c)  | 从传入实体的I/O事件移除已连接的脚本方法 | 
| entindex | int entindex()  | No Description Set | 
| FireOutput | void FireOutput(string outputName, handle activator, handle caller, table args, float delay)  | 触发实体的输出 | 
| GetClassname | string GetClassname()  | No Description Set | 
| GetDebugName | string GetDebugName()  | 如果没有定义的话获得实体名字的帮助 | 
| GetEntityHandle | ehandle GetEntityHandle()  | 获得这个实体的EHANDLE | 
| GetEntityIndex | int GetEntityIndex()  | No Description Set | 
| GetIntAttr | int GetIntAttr(string a)  | 获得整型属性 | 
| GetName | string GetName()  | No Description Set | 
| GetOrCreatePrivateScriptScope | handle GetOrCreatePrivateScriptScope()  | 恢复实体相关的每个实例私有的脚本数据,必要时会创建 | 
| GetOrCreatePublicScriptScope | handle GetOrCreatePublicScriptScope()  | 恢复实体相关的公用脚本数据,必要时会创建 | 
| GetPrivateScriptScope | handle GetPrivateScriptScope()  | 恢复实体相关的每个实例私有的脚本数据 | 
| GetPublicScriptScope | handle GetPublicScriptScope()  | 恢复实体相关的公用脚本数据 | 
| RedirectOutput | void RedirectOutput(string a, string b, handle c)  | 添加一个I/O链接,这可以当特定输出触发时,在这个实体调用方法 | 
| RemoveSelf | void RemoveSelf()  | 删除这个实体 | 
| SetIntAttr | void SetIntAttr(string a, int b)  | 设置整型属性 | 
CDOTABaseAbility
- extends CBaseEntity
 
 
 
 
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| CastAbility | void CastAbility()  | No Description Set | 
| ContinueCasting | bool ContinueCasting()  | No Description Set | 
| CreateVisibilityNode | void CreateVisibilityNode(Vector a, float b, float c)  | No Description Set | 
| DecrementModifierRefCount | void DecrementModifierRefCount()  | No Description Set | 
| EndChannel | void EndChannel(bool a)  | 参数: bool bInterrupted | 
| EndCooldown | void EndCooldown()  | 刷新这个技能 | 
| GetAbilityDamage | int GetAbilityDamage()  | No Description Set | 
| GetAbilityDamageType | int GetAbilityDamageType()  | No Description Set | 
| GetAbilityIndex | int GetAbilityIndex()  | No Description Set | 
| GetAbilityName | string GetAbilityName()  | No Description Set | 
| GetAbilityKeyValues | table GetAbilityKeyValues()  | No Description Set | 
| GetAbilityTargetFlags | int GetAbilityTargetFlags()  | No Description Set | 
| GetAbilityTargetTeam | int GetAbilityTargetTeam()  | No Description Set | 
| GetAbilityTargetType | int GetAbilityTargetType()  | No Description Set | 
| GetAbilityType | int GetAbilityType()  | No Description Set | 
| GetAnimationIgnoresModelScale | bool GetAnimationIgnoresModelScale()  | No Description Set | 
| GetAssociatedPrimaryAbilities | string GetAssociatedPrimaryAbilities()  | No Description Set | 
| GetAssociatedSecondaryAbilities | string GetAssociatedSecondaryAbilities()  | No Description Set | 
| GetAutoCastState | bool GetAutoCastState()  | No Description Set | 
| GetBackswingTime | float GetBackswingTime()  | No Description Set | 
| GetBehavior | int GetBehavior()  | No Description Set | 
| GetCaster | handle GetCaster()  | No Description Set | 
| GetCastPoint | float GetCastPoint()  | Returns the cast point of this ability. | 
| GetCastRange | int GetCastRange(Vector vLocation, handle hTarget)  | Returns the cast range of this ability. | 
| GetChannelledManaCostPerSecond | int GetChannelledManaCostPerSecond(int a)  | Returns the channeled mana cost per second of this ability if it's a channeling ability. | 
| GetChannelStartTime | float GetChannelStartTime()  | No Description Set | 
| GetChannelTime | float GetChannelTime()  | No Description Set | 
| GetCloneSource | handle GetCloneSource()  | No Description Set | 
| GetConceptRecipientType | int GetConceptRecipientType()  | No Description Set | 
| GetCooldown | float GetCooldown(int a)  | 获得技能在给出的等级设定上的冷却时间,而不是目前的剩余的冷却时间 | 
| GetCooldownTime | float GetCooldownTime()  | No Description Set | 
| GetCooldownTimeRemaining | float GetCooldownTimeRemaining()  | No Description Set | 
| GetCursorPosition | Vector GetCursorPosition()  | Returns the target point vector from the last cast of this point-targeting ability . | 
| GetCursorTarget | handle GetCursorTarget()  | Returns the target unit from the last cast of this unit-targeting ability. | 
| GetCursorTargetingNothing | bool GetCursorTargetingNothing()  | No Description Set | 
| GetDuration | float GetDuration()  | No Description Set | 
| GetGoldCost | int GetGoldCost(int a)  | No Description Set | 
| GetGoldCostForUpgrade | int GetGoldCostForUpgrade(int a)  | No Description Set | 
| GetHeroLevelRequiredToUpgrade | int GetHeroLevelRequiredToUpgrade()  | No Description Set | 
| GetIntrinsicModifierName | string GetIntrinsicModifierName()  | No Description Set | 
| GetLevel | int GetLevel()  | 获得技能目前的等级 | 
| GetLevelSpecialValueFor | table GetLevelSpecialValueFor(string a, int b)  | No Description Set | 
| GetManaCost | int GetManaCost(int a)  | No Description Set | 
| GetMaxLevel | int GetMaxLevel()  | No Description Set | 
| GetModifierValue | float GetModifierValue()  | No Description Set | 
| GetModifierValueBonus | float GetModifierValueBonus()  | No Description Set | 
| GetPlaybackRateOverride | float GetPlaybackRateOverride()  | No Description Set | 
| GetSharedCooldownName | string GetSharedCooldownName()  | No Description Set | 
| GetSpecialValueFor | table GetSpecialValueFor(string a)  | No Description Set | 
| GetStolenActivityModifier | string GetStolenActivityModifier()  | No Description Set | 
| GetToggleState | bool GetToggleState()  | No Description Set | 
| HeroXPChange | bool HeroXPChange(float a)  | No Description Set | 
| IncrementModifierRefCount | void IncrementModifierRefCount()  | No Description Set | 
| IsActivated | bool IsActivated()  | No Description Set | 
| IsAttributeBonus | bool IsAttributeBonus()  | No Description Set | 
| IsChanneling | bool IsChanneling()  | 返回目前技能是否在施法状态 | 
| IsCooldownReady | bool IsCooldownReady()  | No Description Set | 
| IsCosmetic | bool IsCosmetic(handle hEntity)  | No Description Set | 
| IsFullyCastable | bool IsFullyCastable()  | 返回技能能否被释放 | 
| IsHidden | bool IsHidden()  | No Description Set | 
| IsHiddenWhenStolen | bool IsHiddenWhenStolen()  | No Description Set | 
| IsInAbilityPhase | bool IsInAbilityPhase()  | 返回技能目前是否在被释放 | 
| IsItem | bool IsItem()  | Returns whether this is an ability attached to an item. | 
| IsOwnersGoldEnough | bool IsOwnersGoldEnough(int a)  | No Description Set | 
| IsOwnersGoldEnoughForUpgrade | bool IsOwnersGoldEnoughForUpgrade()  | No Description Set | 
| IsOwnersManaEnough | bool IsOwnersManaEnough()  | No Description Set | 
| IsPassive | bool IsPassive()  | Returns whether this is a passive ability. | 
| IsSharedWithTeammates | bool IsSharedWithTeammates()  | No Description Set | 
| IsStealable | bool IsStealable()  | Returns whether this ability can be stealed (by Rubick's ultimate). | 
| IsStolen | bool IsStolen()  | Returns whether this ability has been stolen. | 
| IsToggle | bool IsToggle()  | No Description Set | 
| IsTrained | bool IsTrained()  | No Description Set | 
| MarkAbilityButtonDirty | void MarkAbilityButtonDirty()  | 标记这个技能图标表示需要刷新 | 
| NumModifiersUsingAbility | int NumModifiersUsingAbility()  | No Description Set | 
| OnAbilityPhaseInterrupted | void OnAbilityPhaseInterrupted()  | No Description Set | 
| OnAbilityPhaseStart | bool OnAbilityPhaseStart()  | No Description Set | 
| OnAbilityPinged | void OnAbilityPinged()  | No Description Set | 
| OnChannelFinish | void OnChannelFinish(bool a)  | No Description Set | 
| OnChannelThink | void OnChannelThink(float a)  | No Description Set | 
| OnHeroCalculateStatBonus | void OnHeroCalculateStatBonus()  | No Description Set | 
| OnHeroLevelUp | void OnHeroLevelUp()  | No Description Set | 
| OnInventoryContentsChanged | void OnInventoryContentsChanged()  | No Description Set | 
| OnOwnerDied | void OnOwnerDied()  | No Description Set | 
| OnOwnerSpawned | void OnOwnerSpawned()  | No Description Set | 
| OnSpellStart | void OnSpellStart()  | No Description Set | 
| OnToggle | void OnToggle()  | No Description Set | 
| OnUpgrade | void OnUpgrade()  | No Description Set | 
| PayGoldCost | void PayGoldCost()  | No Description Set | 
| PayGoldCostForUpgrade | void PayGoldCostForUpgrade()  | No Description Set | 
| PayManaCost | void PayManaCost()  | No Description Set | 
| PlaysDefaultAnimWhenStolen | bool PlaysDefaultAnimWhenStolen()  | No Description Set | 
| ProcsMagicStick | bool ProcsMagicStick()  | Returns whether this ability procs magic stick. | 
| RefCountsModifiers | bool RefCountsModifiers()  | No Description Set | 
| RefundManaCost | void RefundManaCost()  | No Description Set | 
| ResetToggleOnRespawn | bool ResetToggleOnRespawn()  | No Description Set | 
| SetAbilityIndex | void SetAbilityIndex(int a)  | No Description Set | 
| SetActivated | void SetActivated(bool a)  | No Description Set | 
| SetChanneling | void SetChanneling(bool a)  | No Description Set | 
| SetHidden | void SetHidden(bool a)  | No Description Set | 
| SetInAbilityPhase | void SetInAbilityPhase(bool a)  | No Description Set | 
| SetLevel | void SetLevel(int a)  | 设置这个技能的等级 | 
| SetOverrideCastPoint | void SetOverrideCastPoint(float a)  | No Description Set | 
| SetRefCountsModifiers | void SetRefCountsModifiers(bool a)  | No Description Set | 
| SetStolen | void SetStolen(bool a)  | No Description Set | 
| ShouldUseResources | bool ShouldUseResources()  | No Description Set | 
| SpeakAbilityConcept | void SpeakAbilityConcept(int a)  | No Description Set | 
| SpeakTrigger | bool SpeakTrigger()  | No Description Set | 
| StartCooldown | void StartCooldown(float a)  | 参数:fl冷却时间? | 
| ToggleAbility | void ToggleAbility()  | No Description Set | 
| ToggleAutoCast | void ToggleAutoCast()  | No Description Set | 
| UpgradeAbility | void UpgradeAbility()  | No Description Set | 
| UseResources | void UseResources(bool a, bool b, bool c)  | No Description Set | 
CDOTA_Ability_Animation_Attack
- extends CDOTABaseAbility
 
 
 
 
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| SetPlaybackRate | void SetPlaybackRate(float a)  | 重写播放速率 | 
CDOTA_Ability_Animation_TailSpin
- extends CDOTABaseAbility
 
 
 
 
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| SetPlaybackRate | void SetPlaybackRate(float a)  | Override playbackrate | 
CDOTA_Ability_Nian_Leap
- extends CDOTABaseAbility
 
 
 
 
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| SetPlaybackRate | void SetPlaybackRate(float a)  | Override playbackrate | 
CDOTA_Ability_Nian_Dive
- extends CDOTABaseAbility
 
 
 
 
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| SetPlaybackRate | void SetPlaybackRate(float a)  | Override playbackrate | 
CDOTA_Ability_Nian_Roar
- extends CDOTABaseAbility
 
 
 
 
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| GetCastCount | int GetCastCount()  | 年兽使用了咆哮的次数 | 
CDOTA_Item
- extends CDOTABaseAbility
 
 
 
 
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| GetContainer | handle GetContainer() | 获得物品所有者 | 
| GetCost | int GetCost() | No Description Set | 
| GetCurrentCharges | int GetCurrentCharges() | 获得物品的目前充能 | 
| GetInitialCharges | int GetInitialCharges() | 获得物品的初始充能 | 
| GetPurchaser | handle GetPurchaser() | 获得物品的购买者 | 
| GetPurchaseTime | float GetPurchaseTime() | 获得物品的购买时间 | 
| GetShareability | int GetShareability() | No Description Set | 
| IsAlertableItem | bool IsAlertableItem()  | |
| IsPermanent | bool IsPermanent() | 判断物品是否非消耗品 | 
| IsCastOnPickup | bool IsCastOnPickup() | 判断物品是否可以被捡起。 | 
| IsCombinable | bool IsCombinable() | 判断物品是否可以合成。 | 
| IsDisassemblable | bool IsDisassemblable() | 判断物品是否可以被拆分。 | 
| IsDroppable | bool IsDroppable()  | 判断物品是否可以被丢弃。 | 
| IsItem | bool IsItem() | 判断是否是物品。 | 
| IsKillable | bool IsKillable() | 判断是否可以被击杀。 | 
| IsMuted | bool IsMuted() | 判断是否可以被禁用(?) | 
| IsPermanent | bool IsPermanent() | 判断物品是否是永久性的 | 
| IsPurchasable | bool IsPurchasable() | 判断物品是否可以被购买。 | 
| IsRecipe | bool IsRecipe() | 判断物品是否是卷轴。 | 
| IsRecipeGenerated | bool IsRecipeGenerated() | 判断物品是否是由卷轴合成的。 | 
| IsSellable | bool IsSellable() | 判断物品是否可以被出售。 | 
| IsStackable | bool IsStackable() | 判断物品是否可以叠加。 | 
| LaunchLoot | void LaunchLoot(bool useOnContact, float height, float flDuration, Vector destination) | 当物品掉落在地面时,将物品发射出去,使其落在某个地点。 | 
| LaunchLootInitialHeight | void LaunchLootInitialHeight(bool bAutoUse, float flInitialHeight, float flLaunchHeight, float flDuration, Vector vEndPoint) | 设置发射物品时的初始高度。 | 
| RequiresCharges | bool RequiresCharges()  | 判断物品是否需要充能。 | 
| SetCurrentCharges | void SetCurrentCharges(int a) | 设置物品的充能数 | 
| SetPurchaser | void SetPurchaser(handle a) | 设置物品的购买者 | 
| SetPurchaseTime | void SetPurchaseTime(float a) | 设置物品的购买时间 | 
| SetStacksWithOtherOwners | void SetStacksWithOtherOwners(bool a) | No Description Set | 
| StacksWithOtherOwners | bool StacksWithOtherOwners() | No Description Set | 
| Think | void Think() | 判断此物品 | 
CDOTA_Item_Physical
- extends CBaseAnimating
 
 
 
 
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| GetContainedItem | handle GetContainedItem()  | 返回禁用的物品? | 
| GetCreationTime | float GetCreationTime()  | 返回物品第一次出现在地图上的时间 | 
| SetContainedItem | void SetContainedItem(handle a)  | 设置禁用的物品? | 
CDOTA_Item_DataDriven
- extends CDOTA_Item
 
 
 
 
'
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| ApplyDataDrivenModifier | void ApplyDataDrivenModifier(handle source, handle target, string modifier_name, handle modifierArgs)  | 应用一个数据驱动的Mordifier。 | 
| ApplyDataDrivenThinker | handle ApplyDataDrivenThinker(handle hCaster, Vector vLocation, string pszModifierName, handle hModifierTable)  | 应用一个数据驱动的计时器到指定地点。 | 
CDOTA_Unit_Nian
- extends CDOTA_BaseNPC_Creature
 
 
 
 
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| GetHorn | handle GetHorn()  | 获取年兽角 | 
| GetTail | handle GetTail()  | 获取年兽尾巴 | 
| IsHornAlive | bool IsHornAlive()  | 年兽的角巴是否损坏? | 
| IsTailAlive | bool IsTailAlive()  | 年兽的尾巴是否损坏? | 
CBasePlayer
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| GetHMDAvatar | handle GetHMDAvatar() | Returns the HMD Avatar entity for this player if it exists. | 
| IsNoclipping | bool IsNoclipping() | 玩家处于穿墙模式(noclip mode)下返回true | 
| IsSteamControllerButtonPressed | bool IsSteamControllerButtonPressed(int nControllerNumber, int nButton) | 当Steam控制按钮被按下时,返回True。 | 
| IsUsePressed | bool IsUsePressed() | 当使用按钮被按下时,返回True。 | 
| IsVRControllerButtonPressed | bool IsVRControllerButtonPressed(int nButton) | 当VR控制按钮被按下时,返回True。 | 
| Quit | void Quit() | 从脚本中退出游戏。 | 
CDOTAPlayer
- extends CBaseAnimating
 
 
 
 
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| GetAssignedHero | handle GetAssignedHero()  | 获取该玩家的英雄 | 
| GetControlledRPGUnit | handle GetControlledRPGUnit()  | 获取该玩家控制的RPG单位 | 
| GetPlayerID | int GetPlayerID()  | 获取该玩家的官方玩家ID(PlayerID)玩家不在队伍中时返回-1 | 
| MakeRandomHeroSelection | void MakeRandomHeroSelection()  | 随机该玩家的英雄 | 
| SetKillCamUnit | void SetKillCamUnit(handle a)  | 设置英雄的击杀镜头单位(kill cam unit) | 
| SetMusicStatus | void SetMusicStatus(int nMusicStatus, float flIntensity)  | 设置玩家的音乐状态,注意这只有在dota_music_battle_enable为off时才会有效 | 
CDOTA_PlayerResource
- extends CBaseEntity
 
 
 
 
No Description Set
Global accessor variable: PlayerResource
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| AddAegisPickup | void AddAegisPickup(int a)  | No Description Set | 
| AddClaimedFarm | void AddClaimedFarm(int a, float b)  | No Description Set | 
| AddGoldSpentOnSupport | void AddGoldSpentOnSupport(int a, int b)  | No Description Set | 
| AddRunePickup | void AddRunePickup(int a)  | No Description Set | 
| AreUnitsSharedWithPlayerID | bool AreUnitsSharedWithPlayerID(int a, int b)  | No Description Set | 
| ClearKillsMatrix | void ClearKillsMatrix(int a)  | No Description Set | 
| ClearLastHitMultikill | void ClearLastHitMultikill(int a)  | No Description Set | 
| ClearLastHitStreak | void ClearLastHitStreak(int a)  | No Description Set | 
| ClearRawPlayerDamageMatrix | void ClearRawPlayerDamageMatrix(int a)  | No Description Set | 
| ClearStreak | void ClearStreak(int a)  | No Description Set | 
| GetAegisPickups | int GetAegisPickups(int a)  | No Description Set | 
| GetAssists | int GetAssists(int a)  | No Description Set | 
| GetBroadcasterChannel | unsigned GetBroadcasterChannel(int a)  | No Description Set | 
| GetBroadcasterChannelSlot | unsigned GetBroadcasterChannelSlot(int a)  | No Description Set | 
| GetClaimedDenies | int GetClaimedDenies(int a)  | No Description Set | 
| GetClaimedFarm | float GetClaimedFarm(int a)  | No Description Set | 
| GetClaimedMisses | int GetClaimedMisses(int a)  | No Description Set | 
| GetConnectionState | int GetConnectionState(int iPlayerID)  | 返回一个指示玩家连接状态的数字。 0 - 无连接. 1 - 机器人连入. 2 - 玩家连入. 3 机器人/玩家断线. | 
| GetCreepDamageTaken | int GetCreepDamageTaken(int a)  | No Description Set | 
| GetCustomBuybackCooldown | float GetCustomBuybackCooldown(int a)  | No Description Set | 
| GetCustomBuybackCost | int GetCustomBuybackCost(int a)  | No Description Set | 
| GetCustomTeamAssignment | int GetCustomTeamAssignment(int playerIndex)  | 返回玩家要加入的队伍编号 | 
| GetDamageDoneToHero | int GetDamageDoneToHero(int a, int b)  | No Description Set | 
| GetDeaths | int GetDeaths(int a)  | No Description Set | 
| GetDenies | int GetDenies(int a)  | No Description Set | 
| GetEventPointsForPlayerID | int GetEventPointsForPlayerID(int a)  | No Description Set | 
| GetEventPremiumPointsGranted | int GetEventPremiumPointsGranted(int a)  | No Description Set | 
| GetEventRankGranted | int GetEventRankGranted(int a)  | No Description Set | 
| GetGold | int GetGold(int playerID)  | 返回指定玩家现有金钱量 | 
| GetGoldBagsCollected | int GetGoldBagsCollected(int a)  | No Description Set | 
| GetGoldLostToDeath | int GetGoldLostToDeath(int a)  | No Description Set | 
| GetGoldPerMin | float GetGoldPerMin(int a)  | No Description Set | 
| GetGoldSpentOnBuybacks | int GetGoldSpentOnBuybacks(int a)  | No Description Set | 
| GetGoldSpentOnConsumables | int GetGoldSpentOnConsumables(int a)  | No Description Set | 
| GetGoldSpentOnItems | int GetGoldSpentOnItems(int a)  | No Description Set | 
| GetGoldSpentOnSupport | int GetGoldSpentOnSupport(int a)  | No Description Set | 
| GetHealing | float GetHealing(int a)  | No Description Set | 
| GetHeroDamageTaken | int GetHeroDamageTaken(int a)  | No Description Set | 
| GetKills | int GetKills(int playerID)  | 返回指定玩家击杀次数 | 
| GetKillsDoneToHero | int GetKillsDoneToHero(int attackerPlayerID, int victimPlayerID)  | 返回攻击者(第一个参数)杀死指定受害者(第二个参数)的次数 | 
| GetLastHitMultikill | int GetLastHitMultikill(int a)  | No Description Set | 
| GetLastHits | int GetLastHits(int playerID)  | No Description Set | 
| GetLastHitStreak | int GetLastHitStreak(int a)  | No Description Set | 
| GetLevel | int GetLevel(int playerID)  | No Description Set | 
| GetMisses | int GetMisses(int a)  | No Description Set | 
| GetNearbyCreepDeaths | int GetNearbyCreepDeaths(int a)  | No Description Set | 
| GetNthCourierForTeam | handle GetNthCourierForTeam(int a, int b)  | No Description Set | 
| GetNthPlayerIDOnTeam | int GetNthPlayerIDOnTeam(int a, int b)  | No Description Set | 
| GetNumConsumablesPurchased | int GetNumConsumablesPurchased(int a)  | No Description Set | 
| GetNumCouriersForTeam | int GetNumCouriersForTeam(int a)  | No Description Set | 
| GetNumItemsPurchased | int GetNumItemsPurchased(int a)  | No Description Set | 
| GetOriginalLobbyTeam | int GetOriginalLobbyTeam(int iPlayerID)  | 获取玩家在房间中所属的初始队伍。 当没有房间信息时,返回DOTA_TEAM_NOTEAM。 | 
| GetPlayer | handle GetPlayer(int playerID)  | No Description Set | 
| GetPlayerCount | int GetPlayerCount()  | 获取未加入队伍的观战者和玩家数量。 | 
| GetPlayerCountForTeam | int GetPlayerCountForTeam(int iTeam)  | 获取队伍中的玩家数量。 | 
| GetPlayerLoadedCompletely | bool GetPlayerLoadedCompletely(int a)  | No Description Set | 
| GetPlayerName | string GetPlayerName(int a)  | No Description Set | 
| GetPlayerReservedState | bool GetPlayerReservedState(int a)  | No Description Set | 
| GetRawPlayerDamage | int GetRawPlayerDamage(int a)  | No Description Set | 
| GetReliableGold | int GetReliableGold(int playerID)  | 返回指定玩家现有可靠金钱量 | 
| GetRespawnSeconds | int GetRespawnSeconds(int a)  | No Description Set | 
| GetRoshanKills | int GetRoshanKills(int a)  | No Description Set | 
| GetRunePickups | int GetRunePickups(int a)  | No Description Set | 
| GetSelectedHeroEntity | handle GetSelectedHeroEntity(int a)  | No Description Set | 
| GetSelectedHeroID | int GetSelectedHeroID(int a)  | No Description Set | 
| GetSelectedHeroName | string GetSelectedHeroName(int a)  | No Description Set | 
| GetSteamAccountID | <> GetSteamAccountID(int a)  | 获取32位SteamID | 
| GetSteamID | unsigned GetSteamID(int iPlayerID)  | 获取64位SteamID | 
| GetStreak | int GetStreak(int a)  | No Description Set | 
| GetStuns | float GetStuns(int a)  | No Description Set | 
| GetTeam | int GetTeam(int a)  | No Description Set | 
| GetTeamKills | int GetTeamKills(int a)  | No Description Set | 
| GetTeamPlayerCount | int GetTeamPlayerCount()  | 获取处于有效队伍(天辉,夜魇,或者自定义队伍)的玩家数量。 | 
| GetTimeOfLastConsumablePurchase | float GetTimeOfLastConsumablePurchase(int a)  | No Description Set | 
| GetTimeOfLastDeath | float GetTimeOfLastDeath(int a)  | No Description Set | 
| GetTimeOfLastItemPurchase | float GetTimeOfLastItemPurchase(int a)  | No Description Set | 
| GetTotalEarnedGold | int GetTotalEarnedGold(int a)  | No Description Set | 
| GetTotalEarnedXP | int GetTotalEarnedXP(int a)  | No Description Set | 
| GetTotalGoldSpent | int GetTotalGoldSpent(int a)  | No Description Set | 
| GetTowerDamageTaken | int GetTowerDamageTaken(int a)  | No Description Set | 
| GetTowerKills | int GetTowerKills(int a)  | No Description Set | 
| GetUnitShareMaskForPlayer | int GetUnitShareMaskForPlayer(int a, int b)  | No Description Set | 
| GetUnreliableGold | int GetUnreliableGold(int playerID)  | 返回指定玩家现有不可靠金钱量 | 
| GetXPPerMin | float GetXPPerMin(int a)  | No Description Set | 
| HasCustomGameTicketForPlayerID | bool HasCustomGameTicketForPlayerID(int iPlayerID)  | 当玩家拥有通行证时返回true | 
| HasRandomed | bool HasRandomed(int a)  | No Description Set | 
| HasRepicked | bool HasRepicked(int playerID)  | No Description Set | 
| HasSelectedHero | bool HasSelectedHero(int a)  | No Description Set | 
| HaveAllPlayersJoined | bool HaveAllPlayersJoined()  | No Description Set | 
| HeroLevelUp | void HeroLevelUp(int a)  | No Description Set | 
| IncrementAssists | void IncrementAssists(int playerID)  | No Description Set | 
| IncrementClaimedDenies | void IncrementClaimedDenies(int a)  | No Description Set | 
| IncrementClaimedMisses | void IncrementClaimedMisses(int a)  | No Description Set | 
| IncrementDeaths | void IncrementDeaths(int playerID)  | No Description Set | 
| IncrementDenies | void IncrementDenies(int a)  | No Description Set | 
| IncrementGoldBagsCollected | void IncrementGoldBagsCollected(int a)  | No Description Set | 
| IncrementKills | void IncrementKills(int playerID, int kills)  | No Description Set | 
| IncrementLastHitMultikill | void IncrementLastHitMultikill(int a)  | No Description Set | 
| IncrementLastHits | void IncrementLastHits(int a)  | No Description Set | 
| IncrementLastHitStreak | void IncrementLastHitStreak(int a)  | No Description Set | 
| IncrementMisses | void IncrementMisses(int a)  | No Description Set | 
| IncrementNearbyCreepDeaths | void IncrementNearbyCreepDeaths(int a)  | No Description Set | 
| IncrementStreak | void IncrementStreak(int a)  | No Description Set | 
| IncrementTotalEarnedXP | void IncrementTotalEarnedXP(int a, int b)  | No Description Set | 
| IsBroadcaster | bool IsBroadcaster(int a)  | No Description Set | 
| IsDisableHelpSetForPlayerID | bool IsDisableHelpSetForPlayerID(int a, int b)  | No Description Set | 
| IsFakeClient | bool IsFakeClient(int a)  | No Description Set | 
| IsHeroSelected | bool IsHeroSelected(string a)  | No Description Set | 
| IsHeroSharedWithPlayerID | bool IsHeroSharedWithPlayerID(int a, int b)  | No Description Set | 
| IsValidPlayer | bool IsValidPlayer(int playerID)  | No Description Set | 
| IsValidPlayerID | bool IsValidPlayerID(int playerID)  | No Description Set | 
| IsValidTeamPlayer | bool IsValidTeamPlayer(int playerID)  | No Description Set | 
| IsValidTeamPlayerID | bool IsValidTeamPlayerID(int playerID)  | No Description Set | 
| ModifyGold | int ModifyGold(int playerID, int goldAmmt, bool reliable, int d)  | No Description Set | 
| ReplaceHeroWith | handle ReplaceHeroWith(int a, string b, int c, int d)  | (玩家ID,英雄职业名,金钱,经验值) - 将玩家的英雄替换成指定的英雄、金钱和经验值 | 
| ResetBuybackCostTime | void ResetBuybackCostTime(int a)  | No Description Set | 
| ResetTotalEarnedGold | void ResetTotalEarnedGold(int a)  | No Description Set | 
| SetBuybackCooldownTime | void SetBuybackCooldownTime(int a, float b)  | No Description Set | 
| SetBuybackGoldLimitTime | void SetBuybackGoldLimitTime(int a, float b)  | No Description Set | 
| SetCameraTarget | void SetCameraTarget(int a, handle b)  | (玩家ID,实体) - 强制玩家镜头跟随目标实体 | 
| SetCustomBuybackCooldown | void SetCustomBuybackCooldown(int a, float b)  | 设置玩家买活冷却时间 | 
| SetCustomBuybackCost | void SetCustomBuybackCost(int a, int b)  | 设置玩家买活花费 | 
| SetCustomPlayerColor | void SetCustomPlayerColor(int iPlayerID, int r, int g, int b)  | 为玩家设定自定义颜色(将显示在小地图,计分板等)。 | 
| SetCustomTeamAssignment | void SetCustomTeamAssignment(int playerIndex, int teamToJoin)  | 设置玩家要加入的队伍 | 
| SetGold | void SetGold(int playerID, int amount, bool reliableGold)  | 设置玩家的可靠/不可靠金钱数 | 
| SetHasRandomed | void SetHasRandomed(int playerID)  | No Description Set | 
| SetHasRepicked | void SetHasRepicked(int playerID)  | No Description Set | 
| SetLastBuybackTime | void SetLastBuybackTime(int a, int b)  | No Description Set | 
| SetOverrideSelectionEntity | void SetOverrideSelectionEntity(int nPlayerID, handle hEntity)    | 强制玩家选择实体。 | 
| SetPlayerReservedState | void SetPlayerReservedState(int a, bool b)  | No Description Set | 
| SetUnitShareMaskForPlayer | void SetUnitShareMaskForPlayer(int a, int b, int c, bool d)  | No Description Set | 
| SpendGold | void SpendGold(int playerID, int amount, int reason)  | No Description Set | 
| UpdateTeamSlot | void UpdateTeamSlot(int a, int b)  | No Description Set | 
| WhoSelectedHero | int WhoSelectedHero(string a)  | No Description Set | 
CDOTA_BaseNPC
- extends CBaseFlex
 
 
 
 
'
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| AddAbility | handle AddAbility(string a) | 以技能名称为该单位新增技能,并且返回该技能句柄。 | 
| AddItem | handle AddItem(handle a)v | 增加物品到该单位的库存 。 | 
| AddItemByName | handle AddItemByName(string pszItemName) | 向玩家的库存添加一个物品。 | 
| AddNewModifier | handle AddNewModifier(handle caster, handle optionalSourceAbility, string modifierName, handle modifierData) | 为该单位增加修改器。 | 
| AddNoDraw | void AddNoDraw() | 为单位添加No Draw的flag。 | 
| AddSpeechBubble | void AddSpeechBubble(int iBubble, string pszSpeech, float flDuration, unsigned unOffsetX, unsigned unOffsetY) | 为单位添加一个会话气泡(可同时存在1-4个)。 | 
| AlertNearbyUnits | void AlertNearbyUnits(handle hAttacker, handle hAbility) | No Description Set | 
| AngerNearbyUnits | void AngerNearbyUnits() | No Description Set | 
| AttackNoEarlierThan | void AttackNoEarlierThan(float a) | No Description Set | 
| AttackReady | bool AttackReady() | No Description Set | 
| BoundingRadius2D | float BoundingRadius2D() | No Description Set | 
| CanEntityBeSeenByMyTeam | bool CanEntityBeSeenByMyTeam(handle a) | Check FoW to see if an entity is visible. | 
| CanSellItems | bool CanSellItems() | Query if this unit can sell items. | 
| CastAbilityImmediately | void CastAbilityImmediately(handle ability, int playerIndex) | 技能立即施法。 | 
| CastAbilityNoTarget | void  CastAbilityNoTarget(handle ability, int playerIndex) | 无目标的施放技能 ( hAbility, iPlayerIndex ) 。 | 
| CastAbilityOnPosition | void CastAbilityOnPosition(Vector a, handle b, int c) | 对一地点施放技能。 | 
| CastAbilityOnTarget | void CastAbilityOnTarget(handle target, handle ability, int playerIndex) | 对一实体施放技能。 | 
| CastAbilityToggle | void CastAbilityToggle(handle a, int b) | 切换技能 ( hAbility, iPlayerIndex ) 。 | 
| DestroyAllSpeechBubbles | void DestroyAllSpeechBubbles() | |
| DisassembleItem | void DisassembleItem(handle a) | 拆解该单位库存中过时的物品 | 
| DropItemAtPosition | void DropItemAtPosition(Vector a, handle b) | 将物品扔在指定地点。 | 
| DropItemAtPositionImmediate | void DropItemAtPositionImmediate(handle a, Vector b) | 立即将物品扔在指定地点。 | 
| EjectItemFromStash | void EjectItemFromStash(handle a) | 自库存栏丢落指定的物品。 | 
| FindAbilityByName | handle FindAbilityByName(string a) | 以名称寻找技能。 | 
| FindAllModifiers | table FindAllModifiers()  | 以table形式返回该单位所具有的所有Modifier。 | 
| FindAllModifiersByName | table FindAllModifiersByName(string pszScriptName) | 根据Modifier的名字,以table形式返回该单位所具有的modifier。 | 
| FindModifierByName | handle FindModifierByName(string pszScriptName) | 根据给定的名称,返回modifier的句柄。如果没有找到该名称,将返回nil。 | 
| FindModifierByNameAndCaster | handle FindModifierByNameAndCaster(string pszScriptName, handle hCaster) | 根据给定的名称,返回某施法者所具有modifier的句柄。如果没有找到该名称,将返回nil。 | 
| ForceKill | void ForceKill(bool a) | 强制击杀该单位。 | 
| GetAbilityByIndex | handle GetAbilityByIndex(int a) | 以下标值检索该单位的技能。0是第一个技能 | 
| GetAbilityCount | int GetAbilityCount() | 获取拥有的技能数量。 | 
| GetAcquisitionRange | float GetAcquisitionRange() | 获取单位的自动收集距离。 | 
| GetAdditionalBattleMusicWeight | float GetAdditionalBattleMusicWeight() | 获取当与该单位战斗时将会计算的战斗音乐权重。 | 
| GetAggroTarget | handle GetAggroTarget()Returns this unit's aggro target.  | 获取该单位的仇恨目标。 | 
| GetAttackAnimationPoint | float GetAttackAnimationPoint() | No Description Set | 
| GetAttackCapability | int GetAttackCapability()  | 获取单位的攻击力。 | 
| GetAttackDamage | int GetAttackDamage() | 获取该单位伤害最大值与最小值之间的随机整数。 | 
| GetAttackRange | float GetAttackRange() | 获取单位当前的攻击距离。 | 
| GetAttackRangeBuffer | float GetAttackRangeBuffer() | 获取状态增加的攻击距离。 | 
| GetAttackSpeed | float GetAttackSpeed() | 获取该单位的攻速。 | 
| GetAttacksPerSecond | float GetAttacksPerSecond() | 获取APS值(每秒能够打几下)。 | 
| GetAttackTarget | handle GetAttackTarget() | 返回该单位的攻击目标。 | 
| GetAverageTrueAttackDamage | int GetAverageTrueAttackDamage() | 获取该单位最大伤害值与最小伤害值的平均数。 | 
| GetBaseAttackRange | int GetBaseAttackRange() | 获取单位的基础攻击距离(修改器不列入计算)。 | 
| GetBaseAttackTime | float GetBaseAttackTime() | No Description Set | 
| GetBaseDamageMax | int GetBaseDamageMax() | 获取最大伤害值。 | 
| GetBaseDamageMin | int GetBaseDamageMin() | 获取最小伤害值。 | 
| GetBaseDayTimeVisionRange | int GetBaseDayTimeVisionRange() | 获取单位的基础日间视野距离(修改器不列入计算)。 | 
| GetBaseHealthRegen | float GetBaseHealthRegen() | 获取单位的基础血量恢复值。 | 
| GetBaseMagicalResistanceValue | float GetBaseMagicalResistanceValue() | 获取单位的基础魔法抗性值。 | 
| GetBaseMaxHealth | float GetBaseMaxHealth() | 获取基础血量值。 | 
| GetBaseMoveSpeed | float GetBaseMoveSpeed() | 获取基础跑速。 | 
| GetBaseNightTimeVisionRange | int GetBaseNightTimeVisionRange() | 获取单位基础的夜间视野距离(修改器不列入计算)。 | 
| GetCastPoint | float GetCastPoint(bool a) | Parameter: bAttack | 
| GetCloneSource | handle GetCloneSource() | 获取米波的主身(如果这个单位是米波)。 | 
| GetCollisionPadding | float GetCollisionPadding() | 返回该单位的碰撞体积。 | 
| GetConstantBasedManaRegen | float GetConstantBasedManaRegen() | 获取基础的魔力恢复值常数。 | 
| GetCreationTime | float GetCreationTime() | No Description Set | 
| GetCurrentActiveAbility | handle GetCurrentActiveAbility() | 获取该单位正在使用中的法术。 | 
| GetCurrentVisionRange | int GetCurrentVisionRange() | 获取当前的视野距离。 | 
| GetCursorCastTarget | handle GetCursorCastTarget() | 获取鼠标指定的施法目标。 | 
| GetCursorPosition | Vector GetCursorPosition() | 获取鼠标位置。 | 
| GetCursorTargetingNothing | bool GetCursorTargetingNothing() | No Description Set | 
| GetDayTimeVisionRange | int GetDayTimeVisionRange() | 获取该单位的日间视野(将修改器并入计算)。 | 
| GetDeathXP | int GetDeathXP() | 获取该单位的击杀经验值奖赏。 | 
| GetForceAttackTarget | handle GetForceAttackTarget() | No Description Set | 
| GetGoldBounty | int GetGoldBounty() | 获取该单位的击杀金钱奖赏。 | 
| GetHasteFactor | float GetHasteFactor() | No Description Set | 
| GetHealth | int GetHealth() | 获取该单位的血量。 | 
| GetHealthDeficit | int GetHealthDeficit() | 返回损失的血量 (最大血量 - 当前血量)。 | 
| GetHealthPercent | int GetHealthPercent() | 获取该单位当前的血量百分比。 | 
| GetHealthRegen | float GetHealthRegen() | 获取该单位当前的血量恢复值。 | 
| GetHullRadius | float GetHullRadius() | 获取该单位的碰撞体积半径。 | 
| GetIdealSpeed | float GetIdealSpeed() | 获取该单位的跑速(将修改器并入计算)。 | 
| GetIncreasedAttackSpeed | float GetIncreasedAttackSpeed() | No Description Set | 
| GetInitialGoalEntity | handle GetInitialGoalEntity() | 返回该单位初始的路径点。 | 
| GetItemInSlot | handle GetItemInSlot(int a) | 以下标值获取物品栏中的物品。 | 
| GetLastIdleChangeTime | float GetLastIdleChangeTime() | 获取该单位最后 进入/离开 闲置状态的时间。 | 
| GetLevel | int GetLevel() | 返回该单位当前的等级。 | 
| GetMagicalArmorValue | float GetMagicalArmorValue() | 返回该单位当前的魔法抗性值。 | 
| GetMainControllingPlayer | int GetMainControllingPlayer() | 返回控制该单位的玩家ID。 | 
| GetMana | float GetMana() | 获取该单位的魔力值。 | 
| GetManaPercent | int GetManaPercent() | 获取该单位的剩余魔力值百分比。 | 
| GetManaRegen | float GetManaRegen() | 获取该单位的魔力恢复值。 | 
| GetMaxHealth | int GetMaxHealth() | 获取该单位的最大血量。 | 
| GetMaxMana | float GetMaxMana() | 获取该单位的最大魔力。 | 
| GetMaximumGoldBounty | int GetMaximumGoldBounty() | 获取击杀该单位所得的最大金钱。 | 
| GetMaxMana | float GetMaxMana() | 获取单位的最大法力值。 | 
| GetMinimumGoldBounty | int GetMinimumGoldBounty() | 获取击杀该单位所得的最小金钱。 | 
| GetModelRadius | float GetModelRadius() | 获取模型大小半径。 | 
| GetModifierCount | int GetModifierCount() | 返回该单位所拥有的修改器数量。 | 
| GetModifierNameByIndex | string GetModifierNameByIndex(int a) | 以下标值索引修改器,并返回修改器名称字符串。 | 
| GetModifierStackCount | int GetModifierStackCount(string modifierName, handle b) | Gets the stack count of a given modifier. | 
| GetMoveSpeedModifier | float GetMoveSpeedModifier(float a) | No Description Set | 
| GetMustReachEachGoalEntity | bool GetMustReachEachGoalEntity() | 该单位是否被要求走访每个路径点? | 
| GetNightTimeVisionRange | int GetNightTimeVisionRange() | 返回夜间视野距离(将修改器并入计算)。 | 
| GetOpposingTeamNumber | int GetOpposingTeamNumber() | No Description Set | 
| GetPaddedCollisionRadius | float GetPaddedCollisionRadius() | 获取单位碰撞体积半径。 | 
| GetPercentageBasedManaRegen | float GetPercentageBasedManaRegen() | 获取基础魔力恢复值百分比。 | 
| GetPhysicalArmorBaseValue | float GetPhysicalArmorBaseValue() | 返回基础护甲值。 | 
| GetPhysicalArmorValue | float GetPhysicalArmorValue() | 返回当前的护甲值。 | 
| GetPlayerOwner | handle GetPlayerOwner() | 获取拥有此单位的玩家实体。 | 
| GetPlayerOwnerID | int GetPlayerOwnerID() | 获取拥有此单位的玩家ID。 | 
| GetProjectileSpeed | int GetProjectileSpeed() | No Description Set | 
| GetRangeToUnit | float GetRangeToUnit(handle a) | No Description Set | 
| GetSecondsPerAttack | float GetSecondsPerAttack() | No Description Set | 
| GetStatsBasedManaRegen | float GetStatsBasedManaRegen() | 获取因智慧而增加的魔法恢复值。 | 
| GetTeamNumber | int GetTeamNumber() | 获取该单位所属的队伍ID。 | 
| GetTotalPurchasedUpgradeGoldCost | int GetTotalPurchasedUpgradeGoldCost() | 获取用在升级的金钱。 | 
| GetUnitLabel | string GetUnitLabel() | No Description Set | 
| GetUnitName | string GetUnitName() | 获取单位名称。 | 
| GiveMana | void GiveMana(float a) | 给予此单位指定的魔法值。(Giff me mana!) | 
| HasAbility | bool HasAbility(string a) | 以技能名称搜寻该单位是否拥有此技能。 | 
| HasAttackCapability | bool HasAttackCapability() | No Description Set | 
| HasFlyingVision | bool HasFlyingVision() | No Description Set | 
| HasFlyMovementCapability | bool HasFlyMovementCapability() | No Description Set | 
| HasGroundMovementCapability | bool HasGroundMovementCapability() | No Description Set | 
| HasInventory | bool HasInventory() | No Description Set | 
| HasItemInInventory | bool HasItemInInventory(string a) | 以物品名称搜寻该单位是否拥有此物品。 | 
| HasModifier | bool HasModifier(string a) | 以修改器名称搜寻该单位是否拥有此修改器。 | 
| HasMovementCapability | bool HasMovementCapability() | No Description Set | 
| HasScepter | bool HasScepter() | No Description Set | 
| Heal | void Heal(float amount, handle source) | 治疗该单位。 | 
| Hold | void Hold() | 命令单位在原地待命。 | 
| Interrupt | void Interrupt() | No Description Set | 
| InterruptChannel | void InterruptChannel() | No Description Set | 
| InterruptMotionControllers | void InterruptMotionControllers(bool a) | Parameter boolean determines finding clear space. | 
| IsAlive | bool IsAlive() | 此单位是否还活着? | 
| IsAncient | bool IsAncient() | 该生物是否为远古野怪? | 
| IsAttackImmune | bool IsAttackImmune() | No Description Set | 
| IsAttacking | bool IsAttacking() | No Description Set | 
| IsAttackingEntity | bool IsAttackingEntity(handle a) | No Description Set | 
| IsBlind | bool IsBlind() | No Description Set | 
| IsBlockDisabled | bool IsBlockDisabled() | No Description Set | 
| IsCommandRestricted | bool IsCommandRestricted() | No Description Set | 
| IsControllableByAnyPlayer | bool IsControllableByAnyPlayer() | 该单位是否为非Bot玩家所控制? | 
| IsCreature | bool IsCreature() | 此单位是否为怪物类型单位? | 
| IsDeniable | bool IsDeniable() | No Description Set | 
| IsDisarmed | bool IsDisarmed() | No Description Set | 
| IsDominated | bool IsDominated() | No Description Set | 
| IsEvadeDisabled | bool IsEvadeDisabled() | No Description Set | 
| IsFrozen | bool IsFrozen() | No Description Set | 
| IsHardDisarmed | bool IsHardDisarmed() | No Description Set | 
| IsHero | bool IsHero() | 此单位是否为英雄或英雄幻象? | 
| IsHexed | bool IsHexed() | No Description Set | 
| IsIdle | bool IsIdle() | 该生物是否处于闲置状态? | 
| IsIllusion | bool IsIllusion() | 该单位是否为幻象单位? | 
| IsInvisible | bool IsInvisible() | No Description Set | 
| IsInvulnerable | bool IsInvulnerable() | No Description Set | 
| IsLowAttackPriority | bool IsLowAttackPriority() | No Description Set | 
| IsMagicImmune | bool IsMagicImmune() | 该单位是否魔法免疫? | 
| IsMechanical | bool IsMechanical() | 该单位是否为机械单位? | 
| IsMovementImpaired | bool IsMovementImpaired() | No Description Set | 
| IsMuted | bool IsMuted() | No Description Set | 
| IsNeutralUnitType | bool IsNeutralUnitType() | 该单位是否为野怪? | 
| IsNightmared | bool IsNightmared() | No Description Set | 
| IsOpposingTeam | bool IsOpposingTeam(int a) | No Description Set | 
| IsOutOfGame | bool IsOutOfGame() | No Description Set | 
| IsOwnedByAnyPlayer | bool IsOwnedByAnyPlayer() | 该单位是否为非Bot之玩家所有? | 
| IsPhantom | bool IsPhantom() | 该单位是否为幻象单位? | 
| IsPhantomBlocker | bool IsPhantomBlocker() | No Description Set | 
| IsPhased | bool IsPhased() | 是否在相位状态? | 
| IsPositionInRange | bool IsPositionInRange(Vector a, float b) | 是否在某点的范围内 | 
| IsRangedAttacker | bool IsRangedAttacker() | 该单位攻击类型是否为远程攻击? | 
| IsRealHero | bool IsRealHero() | 返回该单位是否为真正的英雄单位,而非小兵或是幻象。 | 
| IsRooted | bool IsRooted() | No Description Set | 
| IsSilenced | bool IsSilenced() | 该单位是否被沉默? | 
| IsSoftDisarmed | bool IsSoftDisarmed() | No Description Set | 
| IsSpeciallyDeniable | bool IsSpeciallyDeniable() | No Description Set | 
| IsStunned | bool IsStunned() | 该单位是否被晕眩了? | 
| IsSummoned | bool IsSummoned() | 此单位是否为召唤物? | 
| IsTower | bool IsTower() | 此单位是否为塔? | 
| IsUnableToMiss | bool IsUnableToMiss() | No Description Set | 
| IsUnselectable | bool IsUnselectable() | No Description Set | 
| Kill | void Kill(handle a, handle b) | 杀死一个单位,参数为使用的技能与攻击者。 | 
| MakeIllusion | void MakeIllusion() | No Description Set | 
| MakePhantomBlocker | void MakePhantomBlocker() | No Description Set | 
| MakeVisibleDueToAttack | void MakeVisibleDueToAttack(int a) | No Description Set | 
| MakeVisibleToTeam | void MakeVisibleToTeam(int a, float b) | No Description Set | 
| ManageModelChanges | void ManageModelChanges() | |
| ModifyHealth | void ModifyHealth(int a, handle b, bool c, int d) | 设置血量为所指定的值 | 
| MoveToNPC | void MoveToNPC(handle a) | 移动至指定的单位。 | 
| MoveToNPCToGiveItem | void MoveToNPCToGiveItem(handle npc, handle item) | 将身上的物品丢给指定的单位。 | 
| MoveToPosition | void MoveToPosition(Vector a) | 移动到指定的位置。 | 
| MoveToPositionAggressive | void MoveToPositionAggressive(Vector a) | 移动到指定的位置。 | 
| MoveToTargetToAttack | void MoveToTargetToAttack(handle a) | 移动至指定的单位,并且发动攻击。 | 
| NoHealthBar | bool NoHealthBar() | No Description Set | 
| NoTeamMoveTo | bool NoTeamMoveTo() | No Description Set | 
| NoTeamSelect | bool NoTeamSelect() | No Description Set | 
| NotifyWearablesOfModelChange | void NotifyWearablesOfModelChange(bool bOriginalModel)  | 通知模型的可穿戴性发生了改变。 | 
| NotOnMinimap | bool NotOnMinimap() | No Description Set | 
| NotOnMinimapForEnemies | bool NotOnMinimapForEnemies() | No Description Set | 
| NoUnitCollision | bool NoUnitCollision() | No Description Set | 
| PassivesDisabled | bool PassivesDisabled() | No Description Set | 
| PerformAttack | void PerformAttack(handle hTarget, bool bUseCastAttackOrb, bool bProcessProcs, bool bSkipCooldown, bool bIgnoreInvis, bool bUseProjectile) | 对一单位执行攻击。 | 
| PickupDroppedItem | void PickupDroppedItem(handle a) | 捡起掉落的物品。 | 
| PickupRune | void PickupRune(handle a) | 捡起神符。 | 
| ProvidesVision | bool ProvidesVision() | No Description Set | 
| Purge | void Purge(bool bRemovePositiveBuffs, bool bRemoveDebuffs, bool bFrameOnly, bool bRemoveStuns, bool bRemoveExceptions) | (bool RemovePositiveBuffs, bool RemoveDebuffs, bool BuffsCreatedThisFrameOnly, bool RemoveStuns, bool RemoveExceptions 根据增益、减益等一系列条件,清除单位的BUFF。 | 
| ReduceMana | void ReduceMana(float a) | 移除单位的魔力,不过是用在该单位非自愿失去魔力,而非用在使用技能消耗魔力的情况。 | 
| RemoveAbility | void RemoveAbility(string a) | 以技能名称移除该单位相应的技能。 | 
| RemoveGesture | void RemoveGesture(int nActivity)   | 移除某个动作。 | 
| RemoveHorizontalMotionController | void RemoveHorizontalMotionController(handle hBuff)  | 移除水平方向上的运动控制器。 | 
| RemoveItem | void RemoveItem(handle a) | 将该单位库存中的过期物品移除。 | 
| RemoveModifierByName | void RemoveModifierByName(string a) | 以名称移除修改器。 | 
| RemoveModifierByNameAndCaster | void RemoveModifierByNameAndCaster(string a, handle b) | 以施法者与修改器名称移除修改器。 | 
| RemoveNoDraw | void RemoveNoDraw() | Remove the no draw flag. | 
| RemoveVerticalMotionController | void RemoveVerticalMotionController(handle hBuff) | 移除垂直方向上的运动控制器。 | 
| RespawnUnit | void RespawnUnit() | 复活该单位。 | 
| TakeItem | void TakeItem(handle hItem)  | 隐藏物品 | 
| SellItem | void SellItem(handle a) | 卖出该单位的物品。 | 
| SetAbilityByIndex | void SetAbilityByIndex(handle hAbility, int iIndex)  | 改变技能Index | 
| SetAcquisitionRange | void SetAcquisitionRange(float a) | Sets acquisition range | 
| SetAdditionalBattleMusicWeight | void SetAdditionalBattleMusicWeight(float a) | 获取当与该单位战斗时将会计算的战斗音乐权重。 | 
| SetAggroTarget | void SetAggroTarget(handle hAggroTarget) | 将这个单位的仇恨目标设为某个单位。 | 
| SetAttackCapability | void SetAttackCapability(int a) | No Description Set | 
| SetAttacking | void SetAttacking(handle a) | No Description Set | 
| SetBaseAttackTime | void SetBaseAttackTime(float a) | No Description Set | 
| SetBaseDamageMax | void SetBaseDamageMax(int a) | 设置基础最大攻击力。 | 
| SetBaseDamageMin | void SetBaseDamageMin(int a) | 设置基础最小攻击力。 | 
| SetBaseHealthRegen | void SetBaseHealthRegen(float a) | No Description Set | 
| SetBaseMagicalResistanceValue | void SetBaseMagicalResistanceValue(float a) | 设置基础魔法抗性值。 | 
| SetBaseManaRegen | void SetBaseManaRegen(float a) | 设置基础魔力恢复值。 | 
| SetBaseMaxHealth | void SetBaseMaxHealth(float a) | 设置基础最大血量。 | 
| SetBaseMoveSpeed | void SetBaseMoveSpeed(int a) | 设置基础跑速。 | 
| SetCanSellItems | void SetCanSellItems(bool bCanSell) | 设置这个单位是否能出售物品。 | 
| SetControllableByPlayer | void SetControllableByPlayer(int a, bool b) | 以玩家ID设置该单位的控制权。 | 
| SetCursorCastTarget | void SetCursorCastTarget(handle a) | No Description Set | 
| SetCursorPosition | void SetCursorPosition(Vector a) | No Description Set | 
| SetCursorTargetingNothing | void SetCursorTargetingNothing(bool a) | No Description Set | 
| SetDayTimeVisionRange | void SetDayTimeVisionRange(int a) | 设置基础的视间视野距离。 | 
| SetDeathXP | void SetDeathXP(int a) | 设置该单位的击杀经验值奖赏。 | 
| SetDeathXP | void SetDeathXP(int iXPBounty) | Set the XP bounty on this unit | 
| SetForceAttackTarget | void SetForceAttackTarget(handle a) | No Description Set | 
| SetHasInventory | void SetHasInventory(bool a) | No Description Set | 
| SetHullRadius | void SetHullRadius(float a) | 设置该单位的碰撞半径。 | 
| SetIdleAcquire | void SetIdleAcquire(bool a) | No Description Set | 
| SetInitialGoalEntity | void SetInitialGoalEntity(handle a) | 设置该单位的初始路径点。 | 
| SetMana | void SetMana(float a) | 设置该单位的魔力值。 | 
| SetMaximumGoldBounty | void SetMaximumGoldBounty(int a) | 设置该单位的最高赏金。 | 
| SetMinimumGoldBounty | void SetMinimumGoldBounty(int a) | 设置该单位的最低赏金。 | 
| SetModifierStackCount | void SetModifierStackCount(string modifierName, handle b, int modifierCount) | Sets the stack count of a given modifier. | 
| SetMoveCapability | void SetMoveCapability(int a) | No Description Set | 
| SetMustReachEachGoalEntity | void SetMustReachEachGoalEntity(bool a) | 设置该单位是否要走访每个路径点。 | 
| SetNeverMoveToClearSpace | void SetNeverMoveToClearSpace(bool a) | 如果设置为True,则不会将该单位移动到净空的地方。 | 
| SetNightTimeVisionRange | void SetNightTimeVisionRange(int a) | 设置基础夜间视野距离。 | 
| SetOrigin | void SetOrigin(Vector vLocation) | 设置单位位置。 | 
| SetOriginalModel | void SetOriginalModel(string originalModel) | 设置单位原模型。 | 
| SetPhysicalArmorBaseValue | void SetPhysicalArmorBaseValue(float a) | 设置基础护甲值。 | 
| SetRangedProjectileName | void SetRangedProjectileName(string a) | No Description Set | 
| SetRenderAlpha | void SetRenderAlpha( int alpha )  | No Description Set | 
| SetStolenScepter | void SetStolenScepter(bool a) | No Description Set | 
| SetUnitName | void SetUnitName(string a) | No Description Set | 
| ShouldIdleAcquire | bool ShouldIdleAcquire() | No Description Set | 
| SpendMana | void SpendMana(float a, handle b) | 消耗魔力,可以用在技能消耗或使用物品。 | 
| StartGesture | void StartGesture(int nActivity) | 向单位添加给定的动作。 | 
| StartGestureWithPlaybackRate | void StartGestureWithPlaybackRate(int nActivity, float flRate )  | 向单位添加给定的动作,带有自定义的动作速度。 | 
| Stop | void Stop() | 使该单位暂停当前动作。 | 
| SwapAbilities | void SwapAbilities(string a, string b, bool c, bool d) | 交换两个技能的字段,并设置其是否生效。 | 
| SwapItems | void SwapItems(int nSlot1, int nSlot2) | 交换两个物品的位置。 | 
| TimeUntilNextAttack | float TimeUntilNextAttack() | No Description Set | 
| TriggerModifierDodge | bool TriggerModifierDodge() | No Description Set | 
| TriggerSpellAbsorb | bool TriggerSpellAbsorb(handle a) | 判断传递的技能是否会触发该单位的技能吸收 | 
| TriggerSpellReflect | void TriggerSpellReflect(handle hAbility) | 触发类似于清莲宝珠一样的效果。 | 
| UnitCanRespawn | bool UnitCanRespawn() | No Description Set | 
CDOTA_BaseNPC_Hero
- extends CDOTA_BaseNPC
 
 
 
 
'
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| AddExperience | bool AddExperience(float amount, bool applyBotDifficultyScaling) | 给单位增加经验值 | 
| Buyback | void Buyback() | 花费金钱并买活英雄 | 
| CalculateStatBonus | void CalculateStatBonus() | 英雄返回属性后,重新计算全部属性 | 
| CanEarnGold | bool CanEarnGold() | 返回布尔值,买活返回金钱限制时间是否少于游戏时间(其实就是是否能够正常返回金钱.....) | 
| ClearLastHitMultikill | void ClearLastHitMultikill() | 数值存储在玩家资源(PlayerResource)中 | 
| ClearLastHitStreak | void ClearLastHitStreak() | 数值存储在玩家资源(PlayerResource)中 | 
| ClearStreak | void ClearStreak() | 数值存储在玩家资源(PlayerResource)中 | 
| GetAbilityPoints | int GetAbilityPoints() | 返回未分配的技能点数 | 
| GetAdditionalOwnedUnits | table GetAdditionalOwnedUnits() | 返回玩家拥有的额外单位 | 
| GetAgility | float GetAgility() | 返回敏捷值 | 
| GetAgilityGain | float GetAgilityGain() | 返回敏捷成长 | 
| GetAssists | int GetAssists() | 返回助攻数,数值存储在玩家资源(PlayerResource)中 | 
| GetAttacker | int GetAttacker(int a) | No Description Set | 
| GetBaseAgility | float GetBaseAgility() | 返回基础敏捷 | 
| GetBaseDamageMax | int GetBaseDamageMax() | 返回基础攻击伤害最大值,英雄的基础攻击伤害也会受到属性影响 | 
| GetBaseDamageMin | int GetBaseDamageMin() | 返回基础攻击伤害最小值,英雄的基础攻击伤害也会受到属性影响 | 
| GetBaseIntellect | float GetBaseIntellect() | 返回基础智力 | 
| GetBaseStrength | float GetBaseStrength() | 返回基础力量 | 
| GetBonusDamageFromPrimaryStat | int GetBonusDamageFromPrimaryStat() | 返回来自主属性奖励的攻击伤害值 | 
| GetBuybackCooldownTime | float GetBuybackCooldownTime() | 返回该英雄买活CD的剩余时间 | 
| GetBuybackCost | int GetBuybackCost() | 返回买活所需金钱 | 
| GetBuybackGoldLimitTime | float GetBuybackGoldLimitTime() | 返回买活所带来的金钱惩罚剩余时间 | 
| GetCurrentXP | int GetCurrentXP() | 返回当前经验值 | 
| GetDeathGoldCost | int GetDeathGoldCost() | 返回死亡损失金钱 | 
| GetDeaths | int GetDeaths() | 返回死亡次数 | 
| GetDenies | int GetDenies() | 返回反补次数 | 
| GetGold | int GetGold() | 返回该英雄拥有者所有的金钱数量 | 
| GetGoldBounty | int GetGoldBounty() | No Description Set | 
| GetHealthRegen | float GetHealthRegen() | 返回每秒生命回复,英雄生命回复受到属性影响 | 
| GetIncreasedAttackSpeed | float GetIncreasedAttackSpeed() | 返回攻击速度增加值(IAS),英雄攻击速度受到敏捷影响 | 
| GetIntellect | float GetIntellect() | 返回智力值 | 
| GetIntellectGain | float GetIntellectGain() | 返回智力成长 | 
| GetKills | int GetKills() | 返回击杀数,数值存储在玩家资源(PlayerResource)中 | 
| GetLastHits | int GetLastHits() | 返回正补数,数值存储在玩家资源(PlayerResource)中 | 
| GetManaRegen | float GetManaRegen() | 返回每秒魔法回复,英雄魔法回复受到属性影响 | 
| GetMostRecentDamageTime | float GetMostRecentDamageTime() | 返回最近一次伤害时间 | 
| GetMultipleKillCount | int GetMultipleKillCount() | 返回多杀计数 | 
| GetNumAttackers | int GetNumAttackers() | No Description Set | 
| GetNumItemsInInventory | int GetNumItemsInInventory() | 返回玩家拥有的物品数量。 | 
| GetNumItemsInStash | int GetNumItemsInStash() | 返回玩家储藏处内 | 
| GetPhysicalArmorValue | float GetPhysicalArmorValue() | 返回护甲值,英雄护甲受到属性影响 | 
| GetPlayerID | int GetPlayerID() | 返回英雄拥有者的ID | 
| GetPrimaryAttribute | int GetPrimaryAttribute() | 返回英雄主要属性,0 = 力量, 1 = 敏捷, 2 = 智力. | 
| GetPrimaryStatValue | float GetPrimaryStatValue() | 返回主属性值 | 
| GetRespawnsDisabled | bool GetRespawnsDisabled() | 返回该英雄是否被禁止复活。 | 
| GetRespawnTime | float GetRespawnTime() | 返回复活时间 | 
| GetStatsBasedManaRegen | float GetStatsBasedManaRegen() | 返回属性提供的魔法回复 | 
| GetStreak | int GetStreak() | 返回连杀数 | 
| GetStrength | float GetStrength() | 返回力量值 | 
| GetStrengthGain | float GetStrengthGain() | 返回力量成长 | 
| GetTimeUntilRespawn | float GetTimeUntilRespawn() | 返回复活所需的时间 | 
| GetTogglableWearable | handle GetTogglableWearable(int nSlotType) | 返回物品栏中可佩带(可切换)的物品。 | 
| HasAnyAvailableInventorySpace | bool HasAnyAvailableInventorySpace() | 返回是否有可用物品栏空间 | 
| HasFlyingVision | bool HasFlyingVision() | 返回是否拥有空中视野 | 
| HasOwnerAbandoned | bool HasOwnerAbandoned() | No Description Set | 
| HasRoomForItem | int HasRoomForItem(string a, bool b, bool c) | 参数: const char pItemName, bool bIncludeStashCombines, bool bAllowSelling | 
| HeroLevelUp | void HeroLevelUp(bool a) | 升级英雄, 参数决定是否播放升级效果. | 
| IncrementAssists | void IncrementAssists() | 数值存储在玩家资源(PlayerResource)中 | 
| IncrementDeaths | void IncrementDeaths() | 数值存储在玩家资源(PlayerResource)中 | 
| IncrementDenies | void IncrementDenies() | 数值存储在玩家资源(PlayerResource)中 | 
| IncrementKills | void IncrementKills(int kills) | 增加击杀数,击杀者为当前英雄,传入ID为受害者ID。数值存储在玩家资源(PlayerResource)中 | 
| IncrementLastHitMultikill | void IncrementLastHitMultikill() | 数值存储在玩家资源(PlayerResource)中 | 
| IncrementLastHits | void IncrementLastHits() | 数值存储在玩家资源(PlayerResource)中 | 
| IncrementLastHitStreak | void IncrementLastHitStreak() | 数值存储在玩家资源(PlayerResource)中 | 
| IncrementNearbyCreepDeaths | void IncrementNearbyCreepDeaths() | 数值存储在玩家资源(PlayerResource)中 | 
| IncrementStreak | void IncrementStreak() | 数值存储在玩家资源(PlayerResource)中 | 
| IsBuybackDisabledByReapersScythe | bool IsBuybackDisabledByReapersScythe() | 是否被死神镰刀禁止买活 | 
| IsReincarnating | bool IsReincarnating() | 是否处于重生中 | 
| KilledHero | void KilledHero(handle a, handle b) | 参数: 英雄, 加害者 | 
| ModifyAgility | void ModifyAgility(float a) | 增加指定值到英雄基础敏捷,随后调用CalculateStatBonus | 
| ModifyGold | int ModifyGold(int goldAmmt, bool reliable, int reason) | 给予英雄金钱。参数: int 金钱数, bool 是否为可靠金钱, int 原因 | 
| ModifyIntellect | void ModifyIntellect(float a) | 增加指定值到英雄基础智力,随后调用CalculateStatBonus | 
| ModifyStrength | void ModifyStrength(float a) | 增加指定值到英雄基础力量,随后调用CalculateStatBonus | 
| PerformTaunt | void PerformTaunt() | No Description Set | 
| RecordLastHit | void RecordLastHit() | No Description Set | 
| RespawnHero | void RespawnHero(bool buyback, bool IsActuallyBeingSpawnedForTheFirstTime, bool RespawnPenalty) | |
| SetAbilityPoints | void SetAbilityPoints(int a) | 设置当前可用技能点 | 
| SetBaseAgility | void SetBaseAgility(float a) | 设置基础敏捷 | 
| SetBaseIntellect | void SetBaseIntellect(float a) | 设置基础智力 | 
| SetBaseStrength | void SetBaseStrength(float a) | 设置基础力量 | 
| SetBotDifficulty | void SetBotDifficulty(int nDifficulty) | 设置人机对战的难度。 | 
| SetBuybackCooldownTime | void SetBuybackCooldownTime(float a) | 设置买活冷却时间 | 
| SetBuyBackDisabledByReapersScythe | void SetBuyBackDisabledByReapersScythe(bool a) | 设置是否被死神镰刀禁止买活 | 
| SetBuybackGoldLimitTime | void SetBuybackGoldLimitTime(float a) | 设置买活后金钱惩罚时间 | 
| SetCustomDeathXP | void SetCustomDeathXP(int a) | GameRules boolean must be set for this to work!}} | 
| SetGold | void SetGold(int amount, bool reliableGold) | 设置英雄拥有者的金钱 | 
| SetPlayerID | void SetPlayerID(int a) | No Description Set | 
| SetPrimaryAttribute | void SetPrimaryAttribute(int nPrimaryAttribute) | 设置英雄的主属性值。 | 
| SetRespawnPosition | void SetRespawnPosition(Vector a) | No Description Set | 
| SetRespawnsDisabled | void SetRespawnsDisabled(bool bDisableRespawns) | 禁止英雄复活。 | 
| SetTimeUntilRespawn | void SetTimeUntilRespawn(float a) | No Description Set | 
| ShouldDoFlyHeightVisual | bool ShouldDoFlyHeightVisual() | No Description Set | 
| SpendGold | void SpendGold(int amount, int reason) | 参数: int 金钱, int 原因 | 
| UnitCanRespawn | bool UnitCanRespawn() | No Description Set | 
| UpgradeAbility | void UpgradeAbility(handle a) | 升级指定技能,需要英雄拥有该技能和技能点 | 
| WillReincarnate | bool WillReincarnate() | No Description Set | 
CDOTA_BaseNPC_Creature
- extends CDOTA_BaseNPC
 
 
 
 
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| AddItemDrop | void AddItemDrop(handle a)  | 为该生物添加特别的道具掉落 | 
| CreatureLevelUp | void CreatureLevelUp(int a)  | 升级目标生物指定级别 | 
| IsChampion | bool IsChampion()  | 是否为冠军生物 | 
| SetArmorGain | void SetArmorGain(float a)  | 设置该生物每级增加的护甲 | 
| SetAttackTimeGain | void SetAttackTimeGain(float a)  | 设置该生物每级增加的攻击速度 | 
| SetBountyGain | void SetBountyGain(int a)  | 设置该生物每级增加的奖励金币 | 
| SetChampion | void SetChampion(bool a)  | 将该生物标记为冠军生物 | 
| SetDamageGain | void SetDamageGain(int a)  | 设置该生物每级增加的攻击伤害 | 
| SetDisableResistanceGain | void SetDisableResistanceGain(float a)  | 设置该生物每级增加的控制抗性 | 
| SetHPGain | void SetHPGain(int a)  | 设置该生物每级增加的生命值 | 
| SetHPRegenGain | void SetHPRegenGain(float a)  | 设置该生物每级增加的生命回复 | 
| SetMagicResistanceGain | void SetMagicResistanceGain(float a)  | 设置该生物每级增加的魔法抗性 | 
| SetManaGain | void SetManaGain(int a)  | 设置该生物每级增加的魔法值 | 
| SetManaRegenGain | void SetManaRegenGain(float a)  | 设置该生物每级增加的魔法回复 | 
| SetMoveSpeedGain | void SetMoveSpeedGain(int a)  | 设置该生物每级增加的移动速度 | 
| SetXPGain | void SetXPGain(int a)  | 设置该生物每级增加的经验值 | 
CDOTA_BaseNPC_Building
- extends CDOTA_BaseNPC
 
 
 
 
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| GetInvulnCount | int GetInvulnCount()  | 返回建筑无敌计数 | 
| SetInvulnCount | void SetInvulnCount(int a)  | 设置建筑无敌计数 | 
CRPG_Unit
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| ActionState | handle ActionState()  | 返回该单位的ActionState物体 | 
| ClearMovementTarget | void ClearMovementTarget()  | 清除移动目标实体或点 | 
| FindSensedEnemies | table FindSensedEnemies()  | 返回该单位视野锥或感应球体内所有敌方单位列表 | 
| GetMaxSpeed | float GetMaxSpeed()  | 返回最大移动速度 | 
| GetMaxStamina | float GetMaxStamina()  | 返回最大耐力值 | 
| GetMovementTargetEntity | handle GetMovementTargetEntity()  | 返回移动目标实体,如果已经设置移动目标实体 | 
| GetSensingSphereRange | float GetSensingSphereRange()  | 返回单位的360度感应球体范围 | 
| GetSightConeAngle | float GetSightConeAngle()  | 返回单位视野锥的夹角 | 
| GetSightConeRange | float GetSightConeRange()  | 返回单位视野锥的范围 | 
| GetStamina | float GetStamina()  | 返回当前耐力值 | 
| GetTurnRate | float GetTurnRate()  | 返回单位转身速度,单位为度每秒 | 
| GetUnitName | string GetUnitName()  | 返回单位名字 | 
| GrantItem | void GrantItem(string a, bool b)  | 授予单位物品 | 
| IsBlocking | bool IsBlocking()  | 单位是否正在格挡(不确定) | 
| IsFacing | bool IsFacing(Vector a, float b)  | 参数为(Vector目标点,float允许角度差)如果单位朝向目标角度低于角度差则返还true | 
| SetBlocking | void SetBlocking(bool a)  | 设置单位格挡状态(不确定) | 
| SetMaxSpeed | void SetMaxSpeed(float a)  | 设置单位最大速度 | 
| SetMovementTargetEntity | void SetMovementTargetEntity(handle a, float b)  | 参数为(目标实体,跟随范围)单位向目标实体移动直到抵达指定范围内 | 
| SetMovementTargetPosition | void SetMovementTargetPosition(Vector a, float b)  | 参数为(目标点,跟随范围)单位向目标点移动直到抵达指定范围内 | 
| SetSensingSphereRange | void SetSensingSphereRange(float a)  | 设置单位的360度感应球体范围 | 
| SetSightConeAngle | void SetSightConeAngle(float a)  | 设置单位的视野锥夹角 | 
| SetSightConeRange | void SetSightConeRange(float a)  | 设置单位的视野锥范围 | 
| SetTurnRate | void SetTurnRate(float a)  | 设置单位转向速率(度每秒) | 
CDOTABaseGameMode
- extends CBaseEntity
 
 
 
 
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| ClearAbilityTuningValueFilter | void ClearAbilityTuningValueFilter() | 清除脚本过滤器--有关技能中所用到的调整值的 | 
| ClearBountyRunePickupFilter | void ClearBountyRunePickupFilter() | 清除脚本过滤器--控制触发赏金符时的行为的 | 
| ClearDamageFilter | void ClearDamageFilter() | 清除脚本过滤器--控制单位造成伤害 | 
| ClearExecuteOrderFilter | void ClearExecuteOrderFilter() | 清除脚本过滤器--在单位捡起物品时生效的 | 
| ClearItemAddedToInventoryFilter | void ClearItemAddedToInventoryFilter()  | 清除脚本过滤器--在物品放入物品栏时生效的 | 
| ClearModifierGainedFilter | void ClearModifierGainedFilter() | 清除脚本过滤器--控制Modifier控制器的 | 
| ClearModifyExperienceFilter | void ClearModifyExperienceFilter() | 清除脚本过滤器--控制单位的经验机制的 | 
| ClearModifyGoldFilter | void ClearModifyGoldFilter() | 清除脚本过滤器--控制英雄金钱机制的 | 
| ClearRuneSpawnFilter | void ClearRuneSpawnFilter() | 清除脚本过滤器--控制神符刷新的 | 
| ClearTrackingProjectileFilter | void ClearTrackingProjectileFilter() | 清除脚本过滤器--控制追踪投射物的 | 
| ClientLoadGridNav | void ClientLoadGridNav() | 通知客户端需要载入网格信息,可用于允许客户端确定允许建筑的区域等 | 
| GetAlwaysShowPlayerNames | bool GetAlwaysShowPlayerNames()  | No Description Set | 
| GetAlwaysShowPlayerInventory | bool GetAlwaysShowPlayerInventory() | 返回是否不论任何单位被选中,始终在HUD上显示英雄的物品库存 | 
| GetAnnouncerDisabled | bool GetAnnouncerDisabled() | 返回游戏内播音员是否被禁用 | 
| GetCameraDistanceOverride | float GetCameraDistanceOverride() | 返回是否设置摄像机距离Dota内的默认值为1134 | 
| GetCustomBuybackCooldownEnabled | bool GetCustomBuybackCooldownEnabled() | 返回是否允许自定义的买活CD | 
| GetCustomBuybackCostEnabled | bool GetCustomBuybackCostEnabled() | 返回是否允许自定义的买活金钱 | 
| GetCustomHeroMaxLevel | int GetCustomHeroMaxLevel() | 返回是否允许改变英雄的最高等级(默认25) | 
| GetFixedRespawnTime | float GetFixedRespawnTime()  | 返回是否返回固定的复活时间 | 
| GetFogOfWarDisabled | bool GetFogOfWarDisabled() | 返回是否关闭/开启战争迷雾 | 
| GetGoldSoundDisabled | bool GetGoldSoundDisabled() | 返回是否开启/关闭获得金钱时的音效 | 
| GetMaximumAttackSpeed | int GetMaximumAttackSpeed() | 获取单位的最大攻击速度 | 
| GetMinimumAttackSpeed | int GetMinimumAttackSpeed() | 获取单位的最小攻击速度 | 
| GetRecommendedItemsDisabled | bool GetRecommendedItemsDisabled() | 返回是否开启/关闭推荐出装在商店中的显示 | 
| GetStashPurchasingDisabled | bool GetStashPurchasingDisabled() | 返回是否关闭/开启储藏处购买功能。如果该功能被关闭,英雄必须在商店范围内购买物品 | 
| GetStickyItemDisabled | bool GetStickyItemDisabled() | 返回是否隐藏快速购买处的物品 | 
| GetTopBarTeamValuesOverride | bool GetTopBarTeamValuesOverride() | 返回是否覆盖游戏界面顶部的队伍比分 | 
| GetTopBarTeamValuesVisible | bool GetTopBarTeamValuesVisible() | 返回是否关闭/开启游戏界面顶部的队伍比分 | 
| GetTowerBackdoorProtectionEnabled | bool GetTowerBackdoorProtectionEnabled() | 返回是否启用/禁用偷塔保护 | 
| GetUseCustomHeroLevels | bool GetUseCustomHeroLevels() | 返回自定义经验机制是否被使用 | 
| IsBuybackEnabled | bool IsBuybackEnabled() | 返回是否启用/禁用买活 | 
| SetAbilityTuningValueFilter | void SetAbilityTuningValueFilter(handle hFunction, handle hContext) | 设置一个过滤器,用来控制技能所用到的调整值(修改数据table并返回True来使用新值,, 返回False来使用旧值) | 
| SetAlwaysShowPlayerNames | void SetAlwaysShowPlayerNames(bool bShow)  | No Description Set | 
| SetAlwaysShowPlayerInventory | void SetAlwaysShowPlayerInventory(bool bAlwaysShow) | 不论任何单位被选中,始终在HUD上显示英雄的物品库存 | 
| SetAnnouncerDisabled | void SetAnnouncerDisabled(bool enabled) | 禁用播音员 | 
| SetBotsAlwaysPushWithHuman | void SetBotsAlwaysPushWithHuman(bool bAlwaysPush) | 设置Bot玩家是否总是跟从人类玩家进行推进 | 
| SetBotsInLateGame | void SetBotsInLateGame(bool bLateGame) | Set if bots should enable their late game behavior. | 
| SetBotsMaxPushTier | void SetBotsMaxPushTier(int nMaxTier) | 设置Bot玩家将推进到哪一级别的防御塔(-1代表不推进) | 
| SetBotThinkingEnabled | void SetBotThinkingEnabled(bool a) | 允许/禁止机器人思考,需要与Dota PvP高度相似的三路线地图、商店等 | 
| SetBountyRunePickupFilter | void SetBountyRunePickupFilter(handle hFunction, handle hContext) | 设置一个过滤器,用来控制触发赏金符时的行为(改变数据表并返回True来使用新值, 返回False来取消事件) | 
| SetBuybackEnabled | void SetBuybackEnabled(bool a) | 完全允许/禁止买活 | 
| SetCameraDistanceOverride | void SetCameraDistanceOverride(float a) | 设置默认的镜头距离Dota默认为1134 | 
| SetCustomBuybackCooldownEnabled | void SetCustomBuybackCooldownEnabled(bool a) | 开启该选项来允许自定义买活冷却时间 | 
| SetCustomBuybackCostEnabled | void SetCustomBuybackCostEnabled(bool a) | 开启该选项来允许自定义买活花费 | 
| SetCustomGameForceHero | void SetCustomGameForceHero(string pHeroName) | 强制单人游戏英雄的选择 | 
| SetCustomHeroMaxLevel | void SetCustomHeroMaxLevel(int maxLevel) | 定义最大英雄等级(默认为25) | 
| SetCustomXPRequiredToReachNextLevel | void SetCustomXPRequiredToReachNextLevel(handle a) | 定义英雄经验值表(table) | 
| SetDamageFilter | void SetDamageFilter(handle hFunction, handle hContext) | 设置一个过滤器,用来控制单位受到伤害时的行为 (改变数据表并返回True来使用新值, 返回False来取消事件) | 
| SetExecuteOrderFilter | void SetExecuteOrderFilter(handle hFunction, handle hContext) | 设置一个过滤器,用来控制单位捡起物品时的行为 (改变数据表并返回True来使用新值, 返回False来取消事件) | 
| SetFixedRespawnTime | void SetFixedRespawnTime(float time) | Sets the dota respawn time. -1 for default behavior | 
| SetFogOfWarDisabled | void SetFogOfWarDisabled(bool a) | 开关战争迷雾 | 
| SetFountainConstantManaRegen | void SetFountainConstantManaRegen(float flConstantManaRegen) | 设定泉水给予的固定魔法的恢复速率(默认为-1) | 
| SetFountainPercentageHealthRegen | void SetFountainPercentageHealthRegen(float flPercentageHealthRegen) | 设定泉水给予的的百分比生命恢复速率(默认为-1) | 
| SetFountainPercentageManaRegen | void SetFountainPercentageManaRegen(float flPercentageManaRegen) | 设定泉水给予的百分比魔法恢复速率(默认为-1) | 
| SetGoldSoundDisabled | void SetGoldSoundDisabled(bool a) | 是否禁止获取金钱时的声音提示 | 
| SetHUDVisible | void SetHUDVisible(int iHUDElement, bool bVisible) | 设置HUD元素是否可见 | 
| SetItemAddedToInventoryFilter | void SetItemAddedToInventoryFilter(handle hFunction, handle hContext)  | 设置一个过滤器,用来控制物品被放入物品栏时的行为。 | 
| SetLoseGoldOnDeath | void SetLoseGoldOnDeath(bool bEnabled) | 设置禁用死亡时损失金钱 | 
| SetMaximumAttackSpeed | void SetMaximumAttackSpeed(int nMaxSpeed) | 设置单位的最大攻击速度 | 
| SetMinimumAttackSpeed | void SetMinimumAttackSpeed(int nMinSpeed) | 设置单位的最小攻击速度 | 
| SetModifierGainedFilter | void SetModifierGainedFilter(handle hFunction, handle hContext) | 设置一个过滤器,用来控制Modifier的获得, 返回Flase来删除Modifier | 
| SetModifyExperienceFilter | void SetModifyExperienceFilter(handle hFunction, handle hContext) | 设置一个过滤器,用来控制英雄经验值被改变时的行为(改变数据表并返回True来使用新值, 返回False来取消事件) | 
| SetModifyGoldFilter | void SetModifyGoldFilter(handle hFunction, handle hContext) | 设置一个过滤器,用来控制英雄的金钱被改变时的行为(改变数据表并返回True来使用新值, 返回False来取消事件) | 
| SetOverrideSelectionEntity | void SetOverrideSelectionEntity(handle unit) | 覆盖默认选择实体,替代所有玩家的英雄 | 
| SetRecommendedItemsDisabled | void SetRecommendedItemsDisabled(bool a) | 是否禁止显示商店中的推荐购买物品 | 
| SetRemoveIllusionsOnDeath | void SetRemoveIllusionsOnDeath(bool a) | 使幻象死亡时立即消失,而不是延迟数秒 | 
| SetRuneEnabled | void SetRuneEnabled(int nRune, bool bEnabled) | 设定某种神符是否启用 | 
| SetRuneSpawnFilter | void SetRuneSpawnFilter(handle hFunction, handle hContext) | 设置一个过滤器,用来控制神符的刷新(改变数据表并返回True来使用新值, 返回False来取消事件) | 
| SetStashPurchasingDisabled | void SetStashPurchasingDisabled(bool bDisabled)  | 是否关闭/开启储藏处购买功能。如果该功能被关闭,英雄必须在商店范围内购买物品 | 
| SetStickyItemDisabled | void SetStickyItemDisabled(bool bDisabled) | 隐藏快速购买处的物品 | 
| SetTopBarTeamValue | void SetTopBarTeamValue(int a, int b) | 设置顶端的队伍数值 | 
| SetTopBarTeamValuesOverride | void SetTopBarTeamValuesOverride(bool a) | 是否覆盖顶端的队伍数值 | 
| SetTopBarTeamValuesVisible | void SetTopBarTeamValuesVisible(bool a) | 开关顶端的队伍数值 | 
| SetTowerBackdoorProtectionEnabled | void SetTowerBackdoorProtectionEnabled(bool a) | 开关偷塔保护 | 
| SetTrackingProjectileFilter | void SetTrackingProjectileFilter(handle hFunction, handle hContext) | 设置一个过滤器,用来控制追踪投射物(改变数据表并返回True来使用新值, 返回False来取消事件) | 
| SetUnseenFogOfWarEnabled | void SetUnseenFogOfWarEnabled(bool bEnabled) | 启用/禁用战争迷雾。启用时,玩家从未探测过的区域将会完全被战争迷雾掩盖 | 
| SetUseCustomHeroLevels | void SetUseCustomHeroLevels(bool a) | 开关自定义英雄英雄经验表,该表必须提前被定义 | 
CDotaQuest
- extends CBaseEntity
 
 
 
 
A quest, as seen in the Tutorial and Frostivus
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| AddSubquest | void AddSubquest(handle a)  | 为该任务添加子任务 | 
| CompleteQuest | void CompleteQuest()  | 标记该任务完成 | 
| GetSubquest | handle GetSubquest(int a)  | 用索引号找到该任务的子任务 | 
| GetSubquestByName | handle GetSubquestByName(string a)  | 用任务名称找到该任务的子任务 | 
| RemoveSubquest | void RemoveSubquest(handle a)  | 从该任务移除一个子任务 | 
| SetTextReplaceString | void SetTextReplaceString(string a)  | 设置该任务的文本取代字符串 | 
| SetTextReplaceValue | void SetTextReplaceValue(int a, int b)  | 设置任务数值 | 
CDotaSubquestBase
- extends CDotaQuest
 
 
 
 
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| CompleteSubquest | void CompleteSubquest()  | 完成子任务 | 
| SetTextReplaceString | void SetTextReplaceString(string a)  | 设置该子任务的文本取代字符串 | 
| SetTextReplaceValue | void SetTextReplaceValue(int a, int b)  | 设置子任务数值 | 
CPhysicsComponent
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| ExpensiveInstantRayCast | bool ExpensiveInstantRayCast(Vector a, Vector b, handle c)  | 进行一个立即(即阻挡)的光线投射,稍后会有handle/queue版本,并不计划实际使用这个! | 
CPointTemplate
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| DeleteCreatedSpawnGroups | void DeleteCreatedSpawnGroups()  | 删除任何该点模板的刷新组。提示:并不删除点模板 | 
| ForceSpawn | void ForceSpawn()  | 强制刷新该点模板指向的全部实体 | 
| GetSpawnedEntities | handle GetSpawnedEntities()  | 获取最近被刷新的实体 | 
| SetSpawnCallback | void SetSpawnCallback(handle a, handle b)  | 设置刷新回调(hCallbackFunc, hCallbackScope, hCallbackData ),当模板产生实体时回调。被刷新的实体作为数组被传入 | 
CBodyComponent
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| AddImpulseAtPosition | void AddImpulseAtPosition(Vector a, Vector b)  | 在指定的世界位置施加一个物理推动 | 
| AddVelocity | void AddVelocity(Vector a, Vector b)  | 为物理物件增加一个线速度或角速度 | 
| DetachFromParent | void DetachFromParent()  | 从其父项(parent)中分离 | 
| GetSequence | <unknown> GetSequence()  | 返回激活的序列(sequence) | 
| IsAttachedToParent | bool IsAttachedToParent()  | 是否依附父项(parent) | 
| LookupSequence | <unknown> LookupSequence(string a)  | 输入名字返回序列(sequence)ID | 
| SequenceDuration | float SequenceDuration(string a)  | 按秒数返回指定序列(sequence)的持续时间 | 
| SetAngularVelocity | void SetAngularVelocity(Vector a)  | No Description Set | 
| SetAnimation | void SetAnimation(string a)  | 输入动画名称播放动作,需要模型拥有该动画 | 
| SetBodyGroup | void SetBodyGroup(string a)  | No Description Set | 
| SetMaterialGroup | void SetMaterialGroup(utlstringtoken a)  | No Description Set | 
| SetVelocity | void SetVelocity(Vector velocity)  | No Description Set | 
CBaseAnimating
- extends CBaseEntity
 
 
 
 
A class containing functions involved in animations
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| GetAttachmentAngles | Vector GetAttachmentAngles(int a)  | 获得指定ID附件的角度,返回vector(p,y,r) | 
| GetAttachmentOrigin | Vector GetAttachmentOrigin(int a)  | 获得指定ID附件的源vector | 
| GetModelScale | float GetModelScale()  | 获取实体的模型比例。 | 
| IsSequenceFinished | bool IsSequenceFinished()  | 查询主序列是否播放结束 | 
| ScriptLookupAttachment | int ScriptLookupAttachment(string a)  | 获得指定名序列的ID | 
| SetBodygroup | void SetBodygroup(int a, int b)  | 设置一个bodygroup | 
| SetModelScale | void SetModelScale(float scale)  | 设置模型放大率。如果模型缩放为1,使用SetModelScale(10.0)将放大率设置成10.0. | 
| SetPoseParameter | float SetPoseParameter(string a, float b)  | 将指定的位置参数(pose parameter)设定为指定值 | 
CBaseCombatCharacter
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| GetEquippedWeapons | table GetEquippedWeapons()  | GetEquippedWeapons(): 获取一个装备武器的数组 | 
| GetWeaponCount | int GetWeaponCount()  | GetWeaponCount(): 获取当前装备的武器数量 | 
ProjectileManager
The projectile manager, it manages projectiles.
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| CreateLinearProjectile | int CreateLinearProjectile(table infoTable)  | 创建一个线性投射物并返回其ID | 
| CreateTrackingProjectile | void CreateTrackingProjectile(handle a)  | 创建一个追踪投射物 | 
| DestroyLinearProjectile | void DestroyLinearProjectile(int a)  | 摧毁指定ID的线性投射物 | 
| GetLinearProjectileVelocity | Vector GetLinearProjectileVelocity(int int_1)  | 返回一个表示当前投射物速度的向量。 | 
| ProjectileDodge | void ProjectileDodge(handle a)  | 使得特定单位躲避投射物 | 
CBaseTrigger
- extends CBaseEntity
 
 
 
 
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| Disable | void Disable()  | 禁止触发器 | 
| Enable | void Enable()  | 允许触发器 | 
| IsTouching | bool IsTouching(handle a)  | 检查指定实体是否正在接触触发器 | 
CEnvEntityMaker
- extends CBaseEntity
 
 
 
 
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| SpawnEntity | void SpawnEntity()  | 在生成器的位置创建一个实体 | 
| SpawnEntityAtEntityOrigin | void SpawnEntityAtEntityOrigin(handle a)  | 在指定实体的位置立刻创建一个实体 | 
| SpawnEntityAtLocation | void SpawnEntityAtLocation(Vector a, Vector b)  | 在指定位置和方向创建一个实体,方向是角度制欧拉角(pitch, yaw, roll) | 
| SpawnEntityAtNamedEntityOrigin | void SpawnEntityAtNamedEntityOrigin(string a)  | 在指定名字实体的位置创建一个实体 | 
CDOTAVoteSystem
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| StartVote | void StartVote(handle a)  | 开始投票,详细由传入的table制定 | 
CMarkupVolumeTagged
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| HasTag | bool HasTag(string a)  | 查询该卷是否带有指定标签 | 
CScriptPrecacheContext
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| AddResource | void AddResource(string a)  | 预缓存指定资源 | 
| GetValue | table GetValue(string a)  | 读取一个键值(spawn key) | 
CScriptKeyValues
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| GetValue | table GetValue(string a)  | Reads a spawn key | 
CScriptParticleManager
No Description Set
Global accessor variable: ParticleManager
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| CreateParticle | int CreateParticle(string particleName, int particleAttach, handle owningEntity) | 创建一个新的粒子特效 | 
| CreateParticleForPlayer | int CreateParticleForPlayer(string particleName, int particleAttach, handle owningEntity, handle owningPlayer) | 创建一个只对指定玩家播放的粒子特效 | 
| CreateParticleForTeam | int CreateParticleForTeam(string string_1, int int_2, handle handle_3, int int_4)  | 创建一个仅为某方队伍播放的粒子特效。 | 
| DestroyParticle | void DestroyParticle(int particleID, bool immediately) | 清除粒子。 | 
| GetParticleReplacement | string GetParticleReplacement(string a, handle b) | No Description Set | 
| ReleaseParticleIndex | void ReleaseParticleIndex(int particleId) | 施放指定粒子特效索引号 | 
| SetParticleAlwaysSimulate | void SetParticleAlwaysSimulate(int a) | No Description Set | 
| SetParticleControl | void SetParticleControl(int particleId, int controlIndex, Vector controlData) | 设置控制粒子特效的控制点数据 | 
| SetParticleControlEnt | void SetParticleControlEnt(int a, int b, handle c, int d, string e, Vector f, bool g) | No Description Set | 
| SetParticleControlForward | void SetParticleControlForward(int int_1, int int_2, Vector Vector_3)(int nFXIndex, int nPoint, vForward)  | 设置粒子的前进运动 | 
| SetParticleControlOrientation | void SetParticleControlOrientation(int int_1, int int_2, Vector Vector_3, Vector Vector_4, Vector Vector_5)(int nFXIndex, int nPoint, vForward, vRight, vUp)  | 设置粒子的三向运动。 | 
CScriptHeroList
No Description Set
Global accessor variable: HeroList
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| GetAllHeroes | table GetAllHeroes()  | 返回当前世界全部英雄 | 
| GetHero | handle GetHero(int heroId)  | 获取英雄列表中第N位英雄 | 
| GetHeroCount | int GetHeroCount()  | 返回当前世界英雄数目 | 
CNativeOutputs
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| AddOutput | void AddOutput(string a, string b)  | 增加一个输出 | 
| Init | void Init(int a)  | 初始化输出 | 
CEnvProjectedTexture
- extends CBaseEntity
 
 
 
 
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| SetFarRange | void SetFarRange(float a)  | 设置光照最大距离 | 
| SetLinearAttenuation | void SetLinearAttenuation(float a)  | 设置光照线性淡化值 | 
| SetNearRange | void SetNearRange(float a)  | 设置光照最小距离 | 
| SetQuadraticAttenuation | void SetQuadraticAttenuation(float a)  | 设置光照二次项淡化值 | 
| SetVolumetrics | void SetVolumetrics(bool a, float b, float c, int d, float e)  | 开关体积光参数: bool bOn, float flIntensity, float flNoise, int nPlanes, float flPlaneOffset | 
CInfoData
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| QueryColor | Vector QueryColor(utlstringtoken a, Vector b)  | 查询该键值颜色数据 | 
| QueryFloat | float QueryFloat(utlstringtoken a, float b)  | 查询该键值浮点(float)数据 | 
| QueryInt | int QueryInt(utlstringtoken a, int b)  | 查询该键值整型(int)数据 | 
| QueryNumber | float QueryNumber(utlstringtoken a, float b)  | 查询该键值数值数据 | 
| QueryString | string QueryString(utlstringtoken a, string b)  | 查询该键值字符串(string)数据 | 
| QueryVector | Vector QueryVector(utlstringtoken a, Vector b)  | 查询该键值矢量(vector)数据 | 
CPhysicsProp
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| DisableMotion | void DisableMotion()  | 禁止该元件运动 | 
| EnableMotion | void EnableMotion()  | 允许该元件运动 | 
CDOTAGamerules
'
Global accessor variable: GameRules
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| AddMinimapDebugPoint | void AddMinimapDebugPoint(int int_1, Vector Vector_2, int int_3, int int_4, int int_5, int int_6, float float_7) | 在小地图上增加一个点。 | 
| AddMinimapDebugPointForTeam | void AddMinimapDebugPointForTeam(int int_1, Vector Vector_2, int int_3, int int_4, int int_5, int int_6, float float_7, int int_8) | 向某方队伍在小地图上增加一个点。 | 
| Defeated | void Defeated() | 摧毁遗迹等 | 
| DidMatchSignoutTimeOut | bool DidMatchSignoutTimeOut() | 当游戏结束,等待弹窗时为真 | 
| EnableCustomGameSetupAutoLaunch | void EnableCustomGameSetupAutoLaunch(bool bool_1) | 启用 (true)或禁用 (false) 自定义游戏的自动设置。 | 
| FinishCustomGameSetup | void FinishCustomGameSetup() | 提示自定义游戏的设置阶段已经完成,并应用到游戏中。 | 
| GetCustomGameDifficulty | int GetCustomGameDifficulty() | 返回自定义游戏难度。 | 
| GetCustomGameDifficulty | int GetCustomGameDifficulty() | 返回自定义游戏模式难度 | 
| GetDifficulty | int GetDifficulty() | 返回游戏难度 | 
| GetDOTATime | float GetDOTATime(bool bool_1, bool bool_2)(b IncludePregameTime b IncludeNegativeTime)  | 返回Dota游戏内的时间。(是否包含赛前时间或负时间)。 | 
| GetDroppedItem | handle GetDroppedItem(int dropIndex) | 获得第X个掉落物品 | 
| GetGameModeEntity | handle GetGameModeEntity() | 设置游戏模式实体 | 
| GetGameSessionConfigValue | string GetGameSessionConfigValue(string string_1, string string_2) | 从会话配置中获取字符串 (地图选项)。 | 
| GetGameTime | float GetGameTime() | 返回游戏开始后经过的秒数,暂停时间不计算在内 | 
| GetMatchSignoutComplete | bool GetMatchSignoutComplete() | 是否已经接受包含回报信息的弹窗 | 
| GetNianFightStartTime | float GetNianFightStartTime() | 获得年兽大战开始时间 | 
| GetNianTotalDamageTaken | int GetNianTotalDamageTaken() | 芳晓活动,获得年兽受到的总伤害 | 
| GetPlayerCustomGameAccountRecord | table GetPlayerCustomGameAccountRecord(int int_1)(Preview/Unreleased)  | Gets the player's custom game account record, as it looked at the start of this session | 
| GetTimeOfDay | float GetTimeOfDay() | 获取一天中的时间(游戏时间) | 
| IsDaytime | bool IsDaytime() | 是否是白天 | 
| IsGamePaused | bool IsGamePaused() | 返回游戏是否被暂停了。 | 
| IsCheatMode | bool IsCheatMode()  | 检测房间是否被设置为允许作弊或 sv_cheats 1. | 
| LockCustomGameSetupTeamAssignment | void LockCustomGameSetupTeamAssignment(bool bool_1) | 锁定(true)或解锁(false)队伍分配.。如果队伍分配被锁定,玩家将不再能修改队伍。 | 
| MakeTeamLose | void MakeTeamLose(int team) | 使指定队伍失败 | 
| NumDroppedItems | int NumDroppedItems() | 返回当前掉落在地面的物品数量 | 
| PlayerHasCustomGameHostPrivileges | bool PlayerHasCustomGameHostPrivileges(handle handle_1) | 返回玩家是否具有主机特权 (洗牌等)。 | 
| Playtesting_UpdateAddOnKeyValues | void Playtesting_UpdateAddOnKeyValues() | 从磁盘数据中更新自定义英雄、单位、技能的键值 | 
| ResetDefeated | void ResetDefeated() | 遗迹摧毁后重新开始 | 
| ResetToHeroSelection | void ResetToHeroSelection() | 重新开始时选择英雄 | 
| SendCustomMessage | void SendCustomMessage(string message, int teamID, int unknown(1?)) | 在左侧文本框显示一行文本,通常用来提示死亡、反补队友、买活等信息。使用严格HTML格式(>;br<;,>;u<;,>;font<;) | 
| SendCustomMessageToTeam | void SendCustomMessageToTeam(string string_1, int int_2, int int_3, int int_4) | 代表一个玩家向某个队伍发送信息。 | 
| SetCreepMinimapIconScale | void SetCreepMinimapIconScale(float scale) | 在小地图上缩放中立生物图标 | 
| SetCustomGameAccountRecordSaveFunction | void SetCustomGameAccountRecordSaveFunction(handle handle_1, handle handle_2)(Preview/Unreleased)  | 向句柄设置一个回调来保存玩家的账户信息。 (回调传递了玩家的ID,并应该返回一个简单的table)。 | 
| SetCustomGameDifficulty | void SetCustomGameDifficulty(int a) | 设置自定义游戏模式难度等级 | 
| SetCustomGameEndDelay | void SetCustomGameEndDelay(float delay) | 设置游戏完全结束前的等待时间。 | 
| SetCustomGameSetupAutoLaunchDelay | void SetCustomGameSetupAutoLaunchDelay(float float_1) | 设置自动开始前的等待时间。 | 
| SetCustomGameSetupRemainingTime | void SetCustomGameSetupRemainingTime(float float_1) | 设置游戏的设置时间,0 = 立即开始 -1 = 等待直到设置完毕。 | 
| SetCustomGameSetupTimeout | void SetCustomGameSetupTimeout(float float_1) | 设置设置(赛前)阶段的超时。 0 = 立即开始, -1 = 永远 (直到FinishCustomGameSetup 被调用) | 
| SetCustomGameTeamMaxPlayers | void SetCustomGameTeamMaxPlayers(int int_1, int int_2) | 在设置阶段,设置某方队伍是否还能被选择加入 | 
| SetCustomVictoryMessage | void SetCustomVictoryMessage(string string_1) | 设置胜利信息。 | 
| SetCustomVictoryMessageDuration | void SetCustomVictoryMessageDuration(float duration) | 设置自订胜利信息将会持续多长时间。 | 
| SetFirstBloodActive | void SetFirstBloodActive(bool a) | 设置第一滴血是否已经产生 | 
| SetGameWinner | void SetGameWinner(int team) | 使指定队伍胜利 | 
| SetGoldPerTick | void SetGoldPerTick(int a) | 设置每个时间间隔获得的金币 | 
| SetGoldTickTime | void SetGoldTickTime(float a) | 设置获得金币的时间周期 | 
| SetHeroMinimapIconScale | void SetHeroMinimapIconScale(int iconSize) | 设置小地图英雄图标尺寸 | 
| SetHeroRespawnEnabled | void SetHeroRespawnEnabled(bool canRespawn) | 设置是否使用默认英雄复活规则 | 
| SetHeroSelectionTime | void SetHeroSelectionTime(float time) | 设置选择英雄的时间 | 
| SetHideKillMessageHeaders | void SetHideKillMessageHeaders(bool hide) | 设置是否隐藏击杀提示。 | 
| SetNianFightStartTime | void SetNianFightStartTime(float a) | 设置年兽大战开始时间 | 
| SetOverlayHealthBarUnit | void SetOverlayHealthBarUnit(handle unit, int style) | 在前端蒙版生命条上显示单位生命值 | 
| SetPostGameTime | void SetPostGameTime(float time) | 设置在结束游戏后服务器与玩家断线前的时间 | 
| SetPreGameTime | void SetPreGameTime(float time) | 设置选择英雄与开始游戏之间的时间 | 
| SetRuneMinimapIconScale | void SetRuneMinimapIconScale(float scale) | 缩放小地图神符图标 | 
| SetRuneSpawnTime | void SetRuneSpawnTime(float time) | 设置神符刷新时间 | 
| SetSafeToLeave | void SetSafeToLeave(bool safeToLeave) | 标记游戏可安全离开 | 
| SetSameHeroSelectionEnabled | void SetSameHeroSelectionEnabled(bool enabled) | 允许选择重复英雄 | 
| SetStartingGold | void SetStartingGold(int int_1) | 设置初始金钱。 | 
| SetTimeOfDay | void SetTimeOfDay(float time) | 设置一天中的时间(游戏时间) | 
| SetTreeRegrowTime | void SetTreeRegrowTime(float time) | 设置树重新生长的时间(秒) | 
| SetUseBaseGoldBountyOnHeroes | void SetUseBaseGoldBountyOnHeroes(bool a) | 英雄将使用基础NPC规则来决定赏金,而不是DOTA指定规则 | 
| SetUseCustomHeroXPValues | void SetUseCustomHeroXPValues(bool a) | 允许英雄提供指定数目的经验值(必须先设置) | 
| SetUseUniversalShopMode | void SetUseUniversalShopMode(bool enabled) | 为真时,所有物品当处于任意商店范围内时都能购买到,包括秘密商店物品 | 
| State_Get | <> State_Get() | 获取当前游戏规则状态 | 
CToneMapControllerComponent
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| GetBloomScale | float GetBloomScale()  | 获取该光泽贴图控制器(tonemap controller)的泛光缩放(bloomscale) | 
| GetMaxExposure | float GetMaxExposure()  | 获取该光泽贴图控制器(tonemap controller)的最大曝光(max exposure) | 
| GetMinExposure | float GetMinExposure()  | 获取该光泽贴图控制器(tonemap controller)的最小曝光(min exposure) | 
| SetBloomScale | void SetBloomScale(float a)  | 设置该光泽贴图控制器(tonemap controller)的泛光缩放(bloomscale) | 
| SetMaxExposure | void SetMaxExposure(float a)  | 设置该光泽贴图控制器(tonemap controller)的最大曝光(max exposure) | 
| SetMinExposure | void SetMinExposure(float a)  | 设置该光泽贴图控制器(tonemap controller)的最小曝光(min exposure) | 
CDebugOverlayScriptHelper
No Description Set
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| Axis | void Axis(Vector a, Quaternion b, float c, bool d, float e)  | 绘制一个轴线。在世界空间中指定出发点和方向 | 
| Box | void Box(Vector a, Vector b, int c, int d, int e, int f, bool g, float h)  | 绘制一个世界空间轴向盒。在世界空间中指定边界 | 
| BoxAngles | void BoxAngles(Vector a, Vector b, Vector c, Quaternion d, int e, int f, int g, int h, bool i, float j)  | 在出发点绘制一个定向盒。在世界空间中指定边界 | 
| Capsule | void Capsule(Vector a, Quaternion b, float c, float d, int e, int f, int g, int h, bool i, float j)  | 绘制一个胶囊体。在世界空间中指定基部 | 
| Circle | void Circle(Vector a, Quaternion b, float c, int d, int e, int f, int g, bool h, float i)  | 绘制一个圆。在世界空间中指定中心 | 
| CircleScreenOriented | void CircleScreenOriented(Vector a, float b, int c, int d, int e, int f, bool g, float h)  | 绘制一个指向屏幕的圆。在世界空间中指定中心 | 
| Cone | void Cone(Vector a, Vector b, float c, float d, int e, int f, int g, int h, bool i, float j)  | 绘制一个线框锥形。在世界空间中指定结束点和方向 | 
| Cross | void Cross(Vector a, float b, int c, int d, int e, int f, bool g, float h)  | 绘制一个对齐屏幕的十字。在世界空间中指定出发点 | 
| Cross3D | void Cross3D(Vector a, float b, int c, int d, int e, int f, bool g, float h)  | 绘制一个对齐世界的十字。在世界空间中指定出发点 | 
| Cross3DOriented | void Cross3DOriented(Vector a, Quaternion b, float c, int d, int e, int f, int g, bool h, float i)  | 绘制一个指向的十字。在世界空间中指定出发点 | 
| DrawTickMarkedLine | void DrawTickMarkedLine(Vector a, Vector b, float c, int d, int e, int f, int g, int h, bool i, float j)  | 绘制一个短划线。在世界空间中指定结束点 | 
| EntityAttachments | void EntityAttachments(ehandle ehandle_1, float float_2, float float_3)  | 绘制实体附件 | 
| EntityAxis | void EntityAxis(ehandle a, float b, bool c, float d)  | 绘制实体源坐标轴 | 
| EntityBounds | void EntityBounds(ehandle a, int b, int c, int d, int e, bool f, float g)  | 绘制实体边界 | 
| EntitySkeleton | void EntitySkeleton(ehandle a, float b)  | 绘制实体骨架 | 
| EntityText | void EntityText(ehandle a, int b, string c, int d, int e, int f, int g, float h)  | 在实体上绘制文本 | 
| FilledRect2D | void FilledRect2D(Vector2D a, Vector2D b, int c, int d, int e, int f, float g)  | 绘制一个2D矩形填充的屏幕空间。按照像素对齐 | 
| HorzArrow | void HorzArrow(Vector a, Vector b, float c, int d, int e, int f, int g, bool h, float i)  | 绘制一个水平箭头。在世界空间中指定结束点 | 
| Line | void Line(Vector a, Vector b, int c, int d, int e, int f, bool g, float h)  | 绘制一个两点间连线 | 
| Line2D | void Line2D(Vector2D a, Vector2D b, int c, int d, int e, int f, float g)  | 绘制一个屏幕空间中亮点间连线 | 
| PopDebugOverlayScope | void PopDebugOverlayScope()  | 弹出蒙版分组用的标记,被标记的蒙版可被成批删除 | 
| PushAndClearDebugOverlayScope | void PushAndClearDebugOverlayScope(utlstringtoken a)  | 推入一个蒙版分组用的标记。删除所有使用该蒙版ID的蒙版 | 
| PushDebugOverlayScope | void PushDebugOverlayScope(utlstringtoken a)  | 推入一个蒙版分组用的标记。被标记的蒙版可被成批删除 | 
| RemoveAllInScope | void RemoveAllInScope(utlstringtoken a)  | 移除指定标记的全部蒙版,无视其生命周期 | 
| SolidCone | void SolidCone(Vector a, Vector b, float c, float d, int e, int f, int g, int h, bool i, float j)  | 绘制一个固体锥。在世界空间中指定出发点和方向 | 
| Sphere | void Sphere(Vector a, float b, int c, int d, int e, int f, bool g, float h)  | 绘制一个线框球体。在世界空间中指定中心 | 
| SweptBox | void SweptBox(Vector a, Vector b, Vector c, Vector d, Quaternion e, int f, int g, int h, int i, float j)  | 绘制一个扫描盒。在世界空间中指定结束点并在本地空间中指定边界 | 
| Text | void Text(Vector a, int b, string c, float d, int e, int f, int g, int h, float i)  | 绘制2D文本。在世界空间中指定出发点 | 
| Texture | void Texture(string a, Vector2D b, Vector2D c, int d, int e, int f, int g, Vector2D h, Vector2D i, float j)  | 绘制一个屏幕空间纹理。按照像素对齐 | 
| Triangle | void Triangle(Vector a, Vector b, Vector c, int d, int e, int f, int g, bool h, float i)  | 绘制一个填充三角形。在世界空间中指定顶部 | 
| UnitTestCycleOverlayRenderType | void UnitTestCycleOverlayRenderType()  | 转换蒙版混合类型, 用于单位测试 | 
| VectorText3D | void VectorText3D(Vector a, Quaternion b, string c, int d, int e, int f, int g, bool h, float i)  | 绘制3D文本。在世界空间中指定出发点和方向 | 
| VertArrow | void VertArrow(Vector a, Vector b, float c, int d, int e, int f, int g, bool h, float i)  | 绘制一个垂直箭头。在世界空间中指定结束点 | 
| YawArrow | void YawArrow(Vector a, float b, float c, float d, int e, int f, int g, int h, bool i, float j)  | 绘制一个指定偏航角的箭头。在世界空间中指定结束点 | 
CBaseFlex
- extends CBaseAnimating
 
 
 
 
Animated characters who have vertex flex capability (Hi hex6)
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| GetCurrentScene | handle GetCurrentScene()  | 返回最早激活的场景实体的实例(如果存在的话) | 
| GetSceneByIndex | handle GetSceneByIndex(int a)  | 返回指定索引号的场景实体的实例 | 
CSceneEntity
- extends CBaseEntity
 
 
 
 
Choreographed scene which controls animation and/or dialog on one or more actors.
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| AddBroadcastTeamTarget | void AddBroadcastTeamTarget(int a)  | 在记分板列表上增加一个组(使用索引号) | 
| Cancel | void Cancel()  | 取消场景重播 | 
| EstimateLength | float EstimateLength()  | 返回场景长度(秒) | 
| FindCamera | handle FindCamera()  | 获取镜头 | 
| FindNamedEntity | handle FindNamedEntity(string a)  | 通过一个实体参照,比如!target,获取场景物体中的实际实体 | 
| IsPaused | bool IsPaused()  | 场景是否被暂停 | 
| IsPlayingBack | bool IsPlayingBack()  | 场景是否正播放 | 
| LoadSceneFromString | bool LoadSceneFromString(string a, string b)  | 输入虚拟场景名和VCD字符串,载入场景 | 
| RemoveBroadcastTeamTarget | void RemoveBroadcastTeamTarget(int a)  | 从记分板列表上移除一个组(使用索引号) | 
| Start | void Start(handle a)  | 开始场景重播,参数为激活者实体(activatorEntity) | 
A class that can communicate with the gridnav, useful for seeing if stuff should be able to move
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| CanFindPath | bool CanFindPath(Vector Vector_1, Vector Vector_2) | 判断是否能从某个起始点移动到某个终点。(vStart, vEnd) | 
| DestroyTreesAroundPoint | void DestroyTreesAroundPoint(Vector Vector_1, float float_2, bool bool_3) | 砍掉区域内所有的树。(vPosition, flRadius, bFullCollision | 
| FindPathLength | float FindPathLength(Vector Vector_1, Vector Vector_2) | 找到两点间可通过的路径,并返回路径长度。如果寻路失败,将返回-1。 float (vStart, vEnd ) | 
| GetAllTreesAroundPoint | table GetAllTreesAroundPoint(Vector Vector_1, float float_2, bool bool_3) | 以table形式返回附近所有的树木。 HSCRIPTS (vPosition, flRadius, bFullCollision). | 
| GridPosToWorldCenterX | float GridPosToWorldCenterX(int a)  | 获取指定X索引号的世界中心X位置(网格到世界) | 
| GridPosToWorldCenterY | float GridPosToWorldCenterY(int a)  | 获取指定Y索引号的世界中心Y位置(网格到世界) | 
| IsBlocked | bool IsBlocked(Vector a)  | 检查给定位置是否被阻挡 | 
| IsNearbyTree | bool IsNearbyTree(Vector position, float radius, bool c)  | |
| IsTraversable | bool IsTraversable(Vector a)  | 检查给予维持是否可通过 | 
| RegrowAllTrees | void RegrowAllTrees()  | |
| WorldToGridPosX | int WorldToGridPosX(float a)  | 获取指定世界X位置的X索引(世界到网格) | 
| WorldToGridPosY | int WorldToGridPosY(float a)  | 获取指定世界Y位置的Y索引(世界到网格) | 
Convars
No Description Set
Global accessor variable: ConVars
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| GetBool | table GetBool(string variableName)  | GetBool(name) : 将指定的控制台变量(convar)作为boolean返回. | 
| GetCommandClient | handle GetCommandClient()  | GetCommandClient() : 返回输入该控制台指令的玩家 | 
| GetDOTACommandClient | handle GetDOTACommandClient()  | GetDOTACommandClient() : 返回输入该控制台智力的DOTA玩家 | 
| GetFloat | table GetFloat(string name)  | GetFloat(name) : 将指定的控制台变量(convar)作为float返回. 不存在时返回nil | 
| GetInt | table GetInt(string a)  | GetInt(name) : 将指定的控制台变量(convar)作为int返回. 不存在时返回nil | 
| GetStr | table GetStr(string variableName)  | GetStr(name) : 将指定的控制台变量(convar)作为string返回. 不存在时返回nil | 
| RegisterCommand | void RegisterCommand(string variableName, handle function, string helpText, int flags)  | RegisterCommand(name, fn, helpString, flags) : 注册一个控制台指令. | 
| RegisterConvar | void RegisterConvar(string name, string defaultValue, string helpText, int flags)  | RegisterConvar(name, defaultValue, helpString, flags): 注册一个新的控制台变量. | 
| SetBool | void SetBool(string variableName, bool value)  | SetBool(name,val) : 将指定控制台变量(convar)设置为指定bool. | 
| SetFloat | void SetFloat(string variableName, float value)  | SetFloat(name,val) : 将指定控制台变量(convar)设置为指定float. | 
| SetInt | void SetInt(string a, int b)  | SetInt(name,val) : 将指定控制台变量(convar)设置为指定int. | 
| SetStr | void SetStr(string a, string b)  | SetStr(name,val) : 将指定控制台变量(convar)设置为指定string. | 
Vector
Vector class
Global accessor variable: Vector(x,y,z)
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| __add | Vector __add(Vector a, Vector b)  | 重载+.矢量加运算 | 
| __div | Vector __div(Vector a, Vector b)  | 重载/.矢量除运算 | 
| __eq | bool __eq(Vector a, Vector b)  | 重载==.矢量比较运算 | 
| __len | float __len()  | 重载#返回矢量长度 | 
| __mul | Vector __mul(Vector a, Vector b)  | 重载*返回矢量乘运算 | 
| __sub | Vector __sub(Vector a, Vector b)  | 重载-.矢量减运算 | 
| __tostring | string __tostring()  | 重载..转换矢量为字符串 | 
| __unm | Vector __unm()  | 重载- operator | 
| Cross | Vector Cross(Vector a, Vector b)  | 矢量叉积 | 
| Dot | float Dot(Vector a, Vector b)  | 矢量点积 | 
| Length | float Length()  | 矢量长度(模) | 
| Length2D | float Length2D()  | 矢量XY平面上长度(模) | 
| Normalized | Vector Normalized()  | 返回单位矢量 | 
CDOTA_MapTree
- extends CBaseEntity
 
 
 
 
A tree on the map
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| CutDown | void CutDown(int TeamNumberKnownTo )  | 砍掉这棵树 | 
| CutDownRegrowAfter | void CutDownRegrowAfter(float RegrowAfter, int TeamNumberKnownTo )  | 砍掉这棵树,一段时间后再生 | 
| GrowBack | void GrowBack()  | 再生一棵被砍掉的树 | 
| IsStanding | bool IsStanding()  | 如果树站立着返回true,如果被砍掉返回false | 
CDOTA_SimpleObstruction
- extends CBaseEntity
 
 
 
 
An obstruction on the map that effects the gridnav
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| IsEnabled | bool IsEnabled()  | Returns whether the obstruction is currently active | 
| SetEnabled | void SetEnabled(bool enabled, bool b)  | Enable or disable the obstruction | 
CDOTA_Unit_Courier
- extends CDOTA_BaseNPC
 
 
 
 
信使类。
| 函数名 | 函数原型 | 解释 | 
|---|---|---|
| UpgradeToFlyingCourier | bool UpgradeToFlyingCourier() | 升级为飞行信使。 | 
CDOTA_Ability_DataDriven
No Description Set
Global accessor variable: Unknown
| 函数 | 函数原型 | 解释 | 
|---|---|---|
| ApplyDataDrivenModifier | handle ApplyDataDrivenModifier(handle hCaster, handle hTarget, string pszModifierName, handle hModifierTable)  | 获取单位的攻击力。 | 
| ApplyDataDrivenThinker | handle ApplyDataDrivenThinker(handle hCaster, Vector vLocation, string pszModifierName, handle hModifierTable)  | 在指定地点应用一个数据驱动thinker。 | 
CBaseModelEntity
No Description Set
Global accessor variable: Unknown
| Function | Signature | Description | 
|---|---|---|
| SetLightGroup | void SetLightGroup(string pLightGroup)  | SetLightGroup( string ): 设置实体所属的光照组。 | 
| SetModel | void SetModel(string pModelName)  | 设置模型 | 
| SetRenderColor | void SetRenderColor(int r, int g, int b)  | SetRenderColor( r, g, b ): 设置实体的渲染颜色。 | 
| SetRenderMode | void SetRenderMode(int nMode)  | SetRenderMode( int ): 设置实体的渲染模式。 | 
| SetSize | void SetSize(Vector mins, Vector maxs)  | 设置尺寸。 | 
CCustomGameEventManager
No Description Set
全局变量: CustomGameEventManager
| Function | Signature | Description | 
|---|---|---|
| RegisterListener | int RegisterListener(string string_1, handle handle_2)  | ( string EventName, func CallbackFunction ) - 监听指定自定义事件,注册一个回调函数,在指定事件触发时被调用。返回一个监听者ID用来在以后取消监听。 | 
| Send_ServerToAllClients | void Send_ServerToAllClients(string string_1, handle handle_2)  | ( string EventName, table EventData ) | 
| Send_ServerToPlayer | void Send_ServerToPlayer(handle handle_1, string string_2, handle handle_3)  | ( Entity Player, string EventName, table EventData ) | 
| Send_ServerToTeam | void Send_ServerToTeam(int int_1, string string_2, handle handle_3)  | ( int TeamNumber, string EventName, table EventData ) | 
| UnregisterListener | void UnregisterListener(int int_1)  | ( int ListnerID ) - 对指定的监听者取消监听。 | 
CCustomNetTableManager
No Description Set
Global accessor variable: CustomNetTables
| Function | Signature | Description | 
|---|---|---|
| GetTableValue | handle GetTableValue(string string_1, string string_2)  | ( string TableName, string KeyName ) | 
| SetTableValue | bool SetTableValue(string string_1, string string_2, handle handle_3)  | ( string TableName, string KeyName, script_table Value ) | 
CDOTATutorial
No description Set
Global accessor variable: Unknown
| 函数 | 函数原型 | 解释 | 
|---|---|---|
| AddBot | bool AddBot(string string_1, string string_2, string string_3, bool bool_4) | 添加一个由电脑控制的机器人。 | 
| AddQuest | void AddQuest(string string_1, int int_2, string string_3, string string_4) | 向任务日志中添加一个任务。 | 
| AddShopWhitelistItem | void AddShopWhitelistItem(string string_1) | 向商店白名单中添加一个物品。 | 
| CompleteQuest | void CompleteQuest(string string_1) | 完成一个任务。 | 
| CreateLocationTask | void CreateLocationTask(Vector Vector_1) | 增加一个移动到指定地点的任务。 | 
| EnableCreepAggroViz | void EnableCreepAggroViz(bool bool_1) | 当小兵对英雄产生仇恨时提醒玩家。 | 
| EnablePlayerOffscreenTip | void EnablePlayerOffscreenTip(bool bool_1)  | 启用提醒玩家找到其英雄的提示。 | 
| EnableTowerAggroViz | void EnableTowerAggroViz(bool bool_1) | 当防御塔对英雄产生仇恨时提醒玩家。 | 
| FinishTutorial | void FinishTutorial() | 结束教程。 | 
| ForceGameStart | void ForceGameStart() | 强制开始游戏。 | 
| GetTimeFrozen | bool GetTimeFrozen() | 返回时间是否停止。 | 
| IsItemInWhiteList | bool IsItemInWhiteList(string string_1) | 返回物品是否在白名单中。 | 
| RemoveShopWhitelistItem | void RemoveShopWhitelistItem(string string_1) | 从白名单中移除一个物品。 | 
| SelectHero | void SelectHero(string string_1) | 为本地玩家选取一个英雄。 | 
| SelectPlayerTeam | void SelectPlayerTeam(string string_1) | 为本地玩家选取一个队伍。 | 
| SetItemGuide | void SetItemGuide(string string_1)  | 设置当前的物品指南。 | 
| SetOrModifyPlayerGold | void SetOrModifyPlayerGold(int int_1, bool bool_2) | 为教学中的玩家设置金钱数目(设置或修改), (int) GoldAmount, (bool) true=进行设置, false=进行修改。 | 
| SetQuickBuy | void SetQuickBuy(string string_1) | 设置快速购买。 | 
| SetShopOpen | void SetShopOpen(bool bool_1) | 设置打开/关闭商店。 | 
| SetTimeFrozen | void SetTimeFrozen(bool bool_1) | 设置是否停止时间。 | 
| SetTutorialConvar | void SetTutorialConvar(string string_1, string string_2) | Set a tutorial convar | 
| SetTutorialUI | void SetTutorialUI(int int_1) | 设置教学UI,以简化界面并突出一些元素。 | 
| SetWhiteListEnabled | void SetWhiteListEnabled(bool bool_1) | 设置是否将商店物品加入白名单。 | 
| StartTutorialMode | void StartTutorialMode()  | 初始化教学模式。 | 
| UpgradePlayerAbility | void UpgradePlayerAbility(string string_1) | 为本地英雄升级某个技能。 | 
CDOTA_Ability_Lua
No Description Set
Global accessor variable: Unknown
| 函数 | 函数原型 | 解释 | 
|---|---|---|
| CastFilterResult | int CastFilterResult() | 判断一个无目标的命令是否有效 | 
| CastFilterResultLocation | int CastFilterResultLocation(Vector vLocation) | (Vector vLocation)判断一个作用于某个地点的命令是否有效 | 
| CastFilterResultTarget | int CastFilterResultTarget(handle hTarget) | (HSCRIPT hTarget) 判断一个作用于某个单位的命令是否有效 | 
| GetAssociatedPrimaryAbilities | string GetAssociatedPrimaryAbilities() | 获取相互关联的技能Returns abilities that are stolen simultaneously, or otherwise related in functionality. | 
| GetAssociatedSecondaryAbilities | string GetAssociatedSecondaryAbilities() | Returns other abilities that are stolen simultaneously, or otherwise related in functionality. Generally hidden abilities. | 
| GetBehavior | int GetBehavior() | 返回技能的施法动作类型 | 
| GetCastAnimation | int GetCastAnimation() | 返回技能的施法动画 | 
| GetCastRange | int GetCastRange(Vector vLocation, handle hTarget) | 返回技能的施法范围 | 
| GetChannelAnimation | int GetChannelAnimation() | 返回技能的持续施法动画 | 
| GetChannelledManaCostPerSecond | int GetChannelledManaCostPerSecond(int iLevel) | 返回当前等级下,技能持续施法时的每秒魔法消耗 (当前为-1) | 
| GetChannelTime | float GetChannelTime() | 返回技能的持续施法时间 | 
| GetConceptRecipientType | int GetConceptRecipientType() | 返回该技能被释放时将听到语音的单位 | 
| GetCooldown | float GetCooldown(int iLevel) | 返回技能的CD | 
| GetCustomCastError | string GetCustomCastError() | 返回一条失效的无目标命令的错误信息 | 
| GetCustomCastErrorLocation | string GetCustomCastErrorLocation(Vector vLocation) | (Vector vLocation) 返回一条失效的作用于地点的命令的错误信息 | 
| GetCustomCastErrorTarget | string GetCustomCastErrorTarget(handle hTarget) | (HSCRIPT hTarget) 返回一条失效的指向目标的命令的错误信息 | 
| GetGoldCost | int GetGoldCost(int iLevel) | 返回某等级的金钱花费(当前为-1) | 
| GetIntrinsicModifierName | string GetIntrinsicModifierName() | 返回被该技能被动施加的Mordifier | 
| GetManaCost | int GetManaCost(int iLevel) | 返回某等级的魔法消耗(当前为-1) | 
| GetPlaybackRateOverride | float GetPlaybackRateOverride() | 返回施法动画的播放速度 | 
| IsHiddenAbilityCastable | bool IsHiddenAbilityCastable() | 返回当该技能不在动作面板上时是否能使用 | 
| IsHiddenWhenStolen | bool IsHiddenWhenStolen() | 返回该技能被技能窃取后是否是隐藏的 | 
| IsRefreshable | bool IsRefreshable() | 返回该技能是否能被刷新球刷新 | 
| IsStealable | bool IsStealable() | 返回该技能是否能被窃取 | 
| OnAbilityPhaseInterrupted | void OnAbilityPhaseInterrupted() | 施法被打断 | 
| OnAbilityPhaseStart | bool OnAbilityPhaseStart() | 施法开始(施法成功时返回True) | 
| OnChannelFinish | void OnChannelFinish(bool bInterrupted) | (bool bInterrupted) 持续施法完成 | 
| OnChannelThink | void OnChannelThink(float flInterval) | (float flInterval) 持续施法开始 | 
| OnHeroCalculateStatBonus | void OnHeroCalculateStatBonus() | 施法者(仅限英雄)升级,得到技能加点, 或 received a new stat bonus. | 
| OnHeroDiedNearby | void OnHeroDiedNearby(handle unit, handle attacker, handle table) | 一个英雄在附近死亡 (比如说骨灰盒的效果)时, 获取参数表 | 
| OnHeroLevelUp | void OnHeroLevelUp() | 施法者升级 | 
| OnInventoryContentsChanged | void OnInventoryContentsChanged() | 施法者物品库存发生变化 | 
| OnItemEquipped | void OnItemEquipped(handle hItem) | ( HSCRIPT hItem ) 施法者装备了物品 | 
| OnOwnerDied | void OnOwnerDied() | 施法者死亡 | 
| OnOwnerSpawned | void OnOwnerSpawned() | 施法者第一次出生或重生 | 
| OnProjectileHit | bool OnProjectileHit(handle hTarget, Vector vLocation) | (HSCRIPT hTarget, Vector vLocation) 投射物撞击到某目标或者到达指定位置 (目标不可用) | 
| OnProjectileHit_ExtraData | bool OnProjectileHit_ExtraData(handle hTarget, Vector vLocation, handle table) | (HSCRIPT hTarget, Vector vLocation, table kv) 投射物撞击到某目标或者到达指定位置 (目标不可用) | 
| OnProjectileThink | void OnProjectileThink(Vector vLocation) | (Vector vLocation) 投射物正在运动 | 
| OnProjectileThink_ExtraData | void OnProjectileThink_ExtraData(Vector vLocation, handle table) | (Vector vLocation, table kv ) 投射物正在运动 | 
| OnSpellStart | void OnSpellStart() | 施法前摇结束,技能效果开始 | 
| OnStolen | void OnStolen(handle hSourceAbility) | ( HSCRIPT hAbility ) 当技能被窃取时,进行的某特殊行为 | 
| OnToggle | void OnToggle() | Ability is toggled on/off. 技能被开启/关闭 | 
| OnUnStolen | void OnUnStolen() | 当技能未被(成功)窃取时,进行的某特殊行为 | 
| OnUpgrade | void OnUpgrade() | 技能升级 | 
| ProcsMagicStick | bool ProcsMagicStick()  | 返回该技能是否会增加周围单位的魔棒点数 | 
| SpeakTrigger | int SpeakTrigger() | 返回所使用的语音类型 | 
CDOTA_CustomUIManager
No Description Set
Global accessor variable: Unknown
| 函数 | 函数原型 | 解释 | 
|---|---|---|
| DynamicHud_Create | void DynamicHud_Create(int int_1, string string_2, string string_3, handle handle_4) | 为某玩家建立一个新的自定义用户界面元素。 ( int PlayerID /*-1 means everyone*/, string ElementID /* should be unique */, string LayoutFileName, table DialogVariables /* can be nil */ ) | 
| DynamicHud_Destroy | void DynamicHud_Destroy(int int_1, string string_2) | 删除一个自定义用户界面元素。 ( int PlayerID /*-1 means everyone*/, string ElementID ) | 
| DynamicHud_SetDialogVariables | void DynamicHud_SetDialogVariables(int int_1, string string_2, handle handle_3) | 为已有的用户界面元素添加/修改一个会话变量。( int PlayerID /*-1 means everyone*/, string ElementID, table DialogVariables ) | 
| DynamicHud_SetVisible | void DynamicHud_SetVisible(int int_1, string string_2, bool bool_3) | 切换已有的用户见面元素的可见性。 ( int PlayerID /*-1 means everyone*/, string ElementID, bool Visible ) | 
CPropHMDAvatar
No Description Set
Global accessor variable: Unknown
| 函数 | 函数原型 | 解释 | 
|---|---|---|
| GetVRHand | handle GetVRHand(int nHandID)  | 根据ID获取VR | 
CPropVRHand
No Description Set
Global accessor variable: Unknown
| 函数 | 函数原型 | 解释 | 
|---|---|---|
| GetAttachment | handle GetAttachment()  | 获取这只手上的附件。 | 
| SetAttachment | void SetAttachment(handle hAttachment)  | 设置这只手上的附件。 | 
CDOTA_Buff
No Description Set
Global accessor variable: Unknown
| 函数 | 函数原型 | 解释 | 
|---|---|---|
| AddParticle | void AddParticle(int i, bool bDestroyImmediately, bool bStatusEffect, int iPriority, bool bHeroEffect, bool bOverheadEffect)(index, bDestroyImmediately, bStatusEffect, priority, bHeroEffect, bOverheadEffect)  | 增加粒子。 | 
| DecrementStackCount | void DecrementStackCount() | 将Mordifier的叠加层数-1 | 
| Destroy | void Destroy() | 运行所有相关的移除函数来移除这个Mordifier。 | 
| ForceRefresh | void ForceRefresh() | 运行所有相关的刷新函数,使Mordifier恢复到初始 | 
| GetAbility | handle GetAbility() | 获取产生这个Mordifier的技能。 | 
| GetCaster | handle GetCaster() | 获取产生这个Mordifier的单位。 | 
| GetClass | string GetClass() | 获取这个Mordifier所属的类。 | 
| GetCreationTime | float GetCreationTime() | 获取这个Mordifier的创建时间。 | 
| GetDieTime | float GetDieTime() | 获取这个Mordifier的终止时间。 | 
| GetDuration | float GetDuration() | 获取这个Mordifier的持续时间。 | 
| GetElapsedTime | float GetElapsedTime() | 获取这个Mordifier的消失时间。 | 
| GetName | string GetName() | 获取这个Mordifier的名称。 | 
| GetParent | handle GetParent() | 获取这个Mordifier所继承的单位。 | 
| GetRemainingTime | float GetRemainingTime() | 获取这个Mordifier的剩余时间。 | 
| GetStackCount | int GetStackCount()  | 获取这个Mordifier的叠加层数。 | 
| IncrementStackCount | void IncrementStackCount()Increase this modifier's stack count by 1.  | 使Mordifier的叠加层数+1。 | 
| SetDuration | void SetDuration(float flDuration, bool bInformClient)(flTime, bInformClients)  | 设置持续时间。 | 
| SetStackCount | void SetStackCount(int iCount) | 设置叠加层数。 | 
| StartIntervalThink | void StartIntervalThink(float flInterval) | 开始Mordifier的计时功能 (OnIntervalThink) ,根据给定的间隔 (float)。 值-1将会停止这个功能。 | 
CDOTA_Modifier_Lua
No Description Set
Global accessor variable: Unknown
| 函数 | 函数原型 | 解释 | 
|---|---|---|
| AllowIllusionDuplicate | bool AllowIllusionDuplicate() | 幻象是否继承这个Mordifier | 
| DestroyOnExpire | bool DestroyOnExpire() | Buff是否会在Mordifier到期时被移除 | 
| GetAttributes | int GetAttributes() | 返回被应用到Mordifier上的属性类别 | 
| GetAuraEntityReject | bool GetAuraEntityReject(handle hEntity) | 返回实体是否在某些条件下获得光环 | 
| GetAuraRadius | int GetAuraRadius() | 返回光环半径 | 
| GetAuraSearchFlags | int GetAuraSearchFlags() | 返回光环施加效果时的Flag | 
| GetAuraSearchTeam | int GetAuraSearchTeam() | 返回光环效果将施加的队伍 | 
| GetAuraSearchType | int GetAuraSearchType() | 返回光环效果将施加的单位类型 | 
| GetEffectAttachType | int GetEffectAttachType() | 通过GetEffectName获取将添加的粒子特效类型 | 
| GetEffectName | string GetEffectName() | 返回Mordifier运行时所产生的粒子特效的名称 | 
| GetHeroEffectName | string GetHeroEffectName() | 返回Mordifier运行时所产生的英雄粒子特效的名称 | 
| GetModifierAura | string GetModifierAura() | 返回这个Mordifier将施加的二级Mordifier 名称(如果一级Mordifier是光环) | 
| GetStatusEffectName | string GetStatusEffectName() | 返回Mordifier运行时所产生的状态粒子特效的名称 | 
| GetTexture | string GetTexture() | 返回Mordifier的图标 | 
| HeroEffectPriority | int HeroEffectPriority() | 英雄特效的显示优先级 (更高的数字在Buff栏中被优先显示) | 
| IsAura | bool IsAura() | 这个Mordifier是否是光环 | 
| IsAuraActiveOnDeath | bool IsAuraActiveOnDeath() | 返回携带单位死后其光环是否有效 | 
| IsDebuff | bool IsDebuff() | 返回这个Mordifier是否是Debuff | 
| IsHidden | bool IsHidden() | 返回这个Mordifier是否在状态栏中显示 | 
| IsPurgable | bool IsPurgable() | 返回这个Mordifier是否能被清除 | 
| IsPurgeException | bool IsPurgeException() | 返回这个Mordifier是否能被强力驱散清除 | 
| IsStunDebuff | bool IsStunDebuff() | 返回这个Mordifier是否是眩晕类Debuff | 
| OnCreated | void OnCreated(handle table) | 在Mordifier被创建时运行 | 
| OnDestroy | void OnDestroy() | 在Mordifier清楚时运行 | 
| OnIntervalThink | void OnIntervalThink() | 当计时器间隔开始时 | 
| OnRefresh | void OnRefresh(handle table) | 当Mordifier被刷新时运行 | 
| RemoveOnDeath | bool RemoveOnDeath() | 返回持有者死亡时Mordifier是否被移除 | 
| StatusEffectPriority | int StatusEffectPriority() | 状态特效的显示优先级 (更高的数字在Buff栏中被优先显示) | 
CDOTA_Modifier_Lua_Horizontal_Motion
No Description Set
Global accessor variable: Unknown
| 函数 | 函数原型 | 解释 | 
|---|---|---|
| ApplyHorizontalMotionController | bool ApplyHorizontalMotionController()  | 启动水平运动控制器的特效。启动成功后返回True。 | 
| GetPriority | int GetPriority()  | 获取优先级。 | 
| OnHorizontalMotionInterrupted | void OnHorizontalMotionInterrupted()  | 当运动被打断时进行回调。 | 
| SetPriority | void SetPriority(int nMotionPriority)  | 设置优先级。 | 
| UpdateHorizontalMotion | void UpdateHorizontalMotion(handle me, float dt)  | 根据给定的间隔对NPC施加水平运动 | 
CDOTA_Modifier_Lua_Motion_Both
No Description Set
Global accessor variable: Unknown
| 函数 | 函数原型 | 解释 | 
|---|---|---|
| ApplyHorizontalMotionController | bool ApplyHorizontalMotionController()  | 启动水平运动控制器的特效。启动成功后返回True。 | 
| ApplyVerticalMotionController | bool ApplyVerticalMotionController()  | 启动垂直运动控制器的特效。启动成功后返回True。 | 
| GetPriority | int GetPriority()  | 获取优先级。 | 
| OnHorizontalMotionInterrupted | void OnHorizontalMotionInterrupted()  | 当水平运动被打断时进行回调。 | 
| OnVerticalMotionInterrupted | void OnVerticalMotionInterrupted()  | 当竖直运动被打断时进行回调。 | 
| SetPriority | void SetPriority(int nMotionPriority)  | 设置优先级。 | 
| UpdateHorizontalMotion | void UpdateHorizontalMotion(handle me, float dt)  | 根据给定的间隔对NPC施加水平运动。 | 
| UpdateVerticalMotion | void UpdateVerticalMotion(handle me, float dt)  | 根据给定的间隔对NPC施加竖直运动。 | 
CDOTA_Modifier_Lua_Vertical_Motion
No Description Set
Global accessor variable: Unknown
| 函数 | 函数原型 | 解释 | 
|---|---|---|
| ApplyVerticalMotionController | bool ApplyVerticalMotionController()  | 启动垂直运动控制器的特效。启动成功后返回True。 | 
| GetMotionPriority | int GetMotionPriority()  | 获取优先级。 | 
| OnVerticalMotionInterrupted | void OnVerticalMotionInterrupted()  | 当竖直运动被打断时进行回调 | 
| SetMotionPriority | void SetMotionPriority(int nMotionPriority)  | 设置优先级。 | 
| UpdateVerticalMotion | void UpdateVerticalMotion(handle me, float dt)  | 根据给定的间隔对NPC施加竖直运动。 | 
CDOTA_Item_Lua
No Description Set
Global accessor variable: Unknown
| 函数 | 函数原型 | 解释 | 
|---|---|---|
| CastFilterResult | int CastFilterResult() | 判断一个无目标的命令是否有效 | 
| CastFilterResultLocation | int CastFilterResultLocation(Vector vLocation) | (Vector vLocation)判断一个作用于地点的命令是否有效 | 
| CastFilterResultTarget | int CastFilterResultTarget(handle hTarget) | (HSCRIPT hTarget) 判断一个作用于目标的命令是否有效 | 
| GetAssociatedPrimaryAbilities | string GetAssociatedPrimaryAbilities() | Returns abilities that are stolen simultaneously, or otherwise related in functionality. | 
| GetAssociatedSecondaryAbilities | string GetAssociatedSecondaryAbilities() | Returns other abilities that are stolen simultaneously, or otherwise related in functionality. Generally hidden abilities. | 
| GetBehavior | int GetBehavior() | 返回技能的施法动作类型 | 
| GetCastRange | int GetCastRange(Vector vLocation, handle hTarget) | 返回技能的施法范围 | 
| GetChannelledManaCostPerSecond | int GetChannelledManaCostPerSecond(int iLevel) | 返回当前等级下,技能持续施法时的每秒魔法消耗 (当前为-1) | 
| GetChannelTime | float GetChannelTime() | 返回技能的持续施法时间 | 
| GetConceptRecipientType | int GetConceptRecipientType() | 返回该技能被释放时将听到语音的单位 | 
| GetCooldown | float GetCooldown(int iLevel) | 返回技能的CD | 
| GetCustomCastError | string GetCustomCastError() | 返回一条失效的无目标命令的错误信息 | 
| GetCustomCastErrorLocation | string GetCustomCastErrorLocation(Vector vLocation) | (Vector vLocation) 返回一条失效的作用与地点的命令的错误信息 | 
| GetCustomCastErrorTarget | string GetCustomCastErrorTarget(handle hTarget) | (HSCRIPT hTarget) 返回一条失效的指向目标的命令的错误信息 | 
| GetGoldCost | int GetGoldCost(int iLevel) | 返回某等级的金钱花费(当前为-1) | 
| GetIntrinsicModifierName | string GetIntrinsicModifierName() | 返回被该技能被动地施加的Mordifier | 
| GetManaCost | int GetManaCost(int iLevel) | 返回某等级的魔法消耗(当前为-1) | 
| GetPlaybackRateOverride | float GetPlaybackRateOverride() | 返回施法动画的播放速度 | 
| IsHiddenAbilityCastable | bool IsHiddenAbilityCastable() | 返回当该技能不在动作面板上时是否能使用 | 
| IsHiddenWhenStolen | bool IsHiddenWhenStolen() | 返回该技能被技能窃取后是否是隐藏的 | 
| IsRefreshable | bool IsRefreshable() | 返回该技能是否能被刷新球刷新 | 
| IsStealable | bool IsStealable() | 返回该技能是否能被窃取 | 
| OnAbilityPhaseInterrupted | void OnAbilityPhaseInterrupted() | 施法被打断 | 
| OnAbilityPhaseStart | bool OnAbilityPhaseStart() | 施法开始(施法成功时返回True) | 
| OnChannelFinish | void OnChannelFinish(bool bInterrupted) | (bool bInterrupted) 持续施法完成 | 
| OnChannelThink | void OnChannelThink(float flInterval) | (float flInterval)持续施法开始 | 
| OnHeroCalculateStatBonus | void OnHeroCalculateStatBonus() | Caster (hero only) gained a level, skilled an ability, or received a new stat bonus. | 
| OnHeroDiedNearby | void OnHeroDiedNearby(handle unit, handle attacker, handle table) | 一个英雄在附近死亡 (比如说骨灰盒的效果)时, 获取参数表 | 
| OnHeroLevelUp | void OnHeroLevelUp() | 施法者升级 | 
| OnInventoryContentsChanged | void OnInventoryContentsChanged() | 施法者物品库存发生变化 | 
| OnItemEquipped | void OnItemEquipped(handle hItem) | ( HSCRIPT hItem ) 施法者装备了物品 | 
| OnOwnerDied | void OnOwnerDied() | 施法者死亡 | 
| OnOwnerSpawned | void OnOwnerSpawned() | 施法者第一次出生或重生 | 
| OnProjectileHit | bool OnProjectileHit(handle hTarget, Vector vLocation) | (HSCRIPT hTarget, Vector vLocation) 投射物撞击到某目标或者到达指定位置 (目标不可用) | 
| OnProjectileThink | void OnProjectileThink(Vector vLocation) | (Vector vLocation) 投射物正在运动 | 
| OnSpellStart | void OnSpellStart() | 施法前摇结束,技能效果开始 | 
| OnStolen | void OnStolen(handle hSourceAbility) | ( HSCRIPT hAbility ) 当技能被窃取时,进行的某特殊行为 | 
| OnToggle | void OnToggle() | 技能被开启/关闭 | 
| OnUnStolen | void OnUnStolen() | 当技能未被窃取时,进行的某特殊行为 | 
| OnUpgrade | void OnUpgrade() | 技能升级 | 
| ProcsMagicStick | bool ProcsMagicStick() | 返回该技能是否会增加周围单位的魔棒点数 | 
| SpeakTrigger | int SpeakTrigger() | 返回所使用的语音类型 | 

























