Difference between revisions of "Dota 2 Workshop Tools:zh-cn/Scripting:zh-cn/API:zh-cn"

From Valve Developer Community
Jump to: navigation, search
Line 1,051: Line 1,051:
  
 
| 输出警告
 
| 输出警告
 +
|}
 +
 +
 +
 +
 +
 +
=== CBaseEntity ===
 +
 +
''The base class for stuff''
 +
 +
{| class="standard-table" style="width: 100%;"
 +
 +
! 函数名
 +
 +
! 函数原型
 +
 +
! 解释
 +
 
|-
 
|-
  
Line 1,485: Line 1,503:
  
 
| 触发这个实体的触发器
 
| 触发这个实体的触发器
 +
|}
 +
 +
 +
 +
 +
 +
=== CEntities ===
 +
 +
''No Description Set''
 +
 +
 +
 +
''Global accessor variable:'' <code>Entities</code>
 +
 +
{| class="standard-table" style="width: 100%;"
 +
 +
! 函数名
 +
 +
! 函数原型
 +
 +
! 解释
 +
 
|-
 
|-
  
Line 1,625: Line 1,665:
  
 
| 从指定列表中的实体开始迭代
 
| 从指定列表中的实体开始迭代
 +
|}
 +
 +
 +
 +
 +
 +
=== CEntityInstance ===
 +
 +
:::::extends [[#CBaseEntity| CBaseEntity]]
 +
 +
''No Description Set''
 +
 +
{| class="standard-table" style="width: 100%;"
 +
 +
! 函数名
 +
 +
! 函数原型
 +
 +
! 解释
 +
 
|-
 
|-
  
Line 1,758: Line 1,818:
  
 
| 设置整型属性
 
| 设置整型属性
 +
|}
 +
 +
 +
 +
 +
 +
=== CDOTABaseAbility ===
 +
 +
:::::extends [[#CBaseEntity| CBaseEntity]]
 +
 +
''No Description Set''
 +
 +
{| class="standard-table" style="width: 100%;"
 +
 +
! 函数名
 +
 +
! 函数原型
 +
 +
! 解释
 +
 
|-
 
|-
  
Line 2,535: Line 2,615:
  
 
| 暂无
 
| 暂无
 +
|}
 +
 +
 +
 +
=== CDOTA_Ability_Animation_Attack ===
 +
 +
:::::extends [[#CDOTABaseAbility| CDOTABaseAbility]]
 +
 +
''No Description Set''
 +
 +
{| class="standard-table" style="width: 100%;"
 +
 +
! 函数名
 +
 +
! 函数原型
 +
 +
! 解释
 +
 
|-
 
|-
  
Line 2,542: Line 2,640:
  
 
| 重写播放速率
 
| 重写播放速率
 +
|}
 +
 +
 +
 +
 +
 +
=== CDOTA_Ability_Animation_TailSpin ===
 +
 +
:::::extends [[#CDOTABaseAbility| CDOTABaseAbility]]
 +
 +
''No Description Set''
 +
 +
{| class="standard-table" style="width: 100%;"
 +
 +
! 函数名
 +
 +
! 函数原型
 +
 +
! 解释
 +
 
|-
 
|-
  
Line 2,633: Line 2,751:
  
 
| 年兽使用了咆哮的次数
 
| 年兽使用了咆哮的次数
 +
|}
 +
 +
 +
 +
 +
 +
=== CDOTA_Item ===
 +
 +
:::::extends [[#CDOTABaseAbility| CDOTABaseAbility]]
 +
 +
''No Description Set''
 +
 +
{| class="standard-table" style="width: 100%;"
 +
 +
! 函数名
 +
 +
! 函数原型
 +
 +
! 解释
 +
 
|-
 
|-
  
Line 2,739: Line 2,877:
  
 
| 判断此物品
 
| 判断此物品
 +
|}
 +
 +
 +
 +
 +
 +
=== CDOTA_Item_Physical ===
 +
 +
:::::extends [[#CBaseAnimating| CBaseAnimating]]
 +
 +
''No Description Set''
 +
 +
{| class="standard-table" style="width: 100%;"
 +
 +
! 函数名
 +
 +
! 函数原型
 +
 +
! 解释
 +
 
|-
 
|-
  
Line 2,760: Line 2,918:
  
 
| 设置禁用的物品?
 
| 设置禁用的物品?
|-
+
|}
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_DataDriven.ApplyDataDrivenModifier | ApplyDataDrivenModifier]]
 
  
| <code>void ApplyDataDrivenModifier(handle source, handle target, string modifier_name, handle modifierArgs) </code>
 
  
| 暂无
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTA_Unit_Nian.GetHorn | GetHorn]]
 
  
| <code>handle GetHorn() </code>
+
=== CDOTA_Item_DataDriven ===
  
| Is the Nian horn?
+
:::::extends [[#CDOTA_Item| CDOTA_Item]]
  
|-
+
''''
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTA_Unit_Nian.GetTail | GetTail]]
+
{| class="standard-table" style="width: 100%;"
  
| <code>handle GetTail() </code>
+
! 函数名
  
| Is the Nian's tail broken?
+
! 函数原型
 +
 
 +
! 解释
 +
 
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CDOTA_Item_DataDriven.ApplyDataDrivenModifier | ApplyDataDrivenModifier]]
 +
 
 +
| <code>void ApplyDataDrivenModifier(handle source, handle target, string modifier_name, handle modifierArgs) </code>
 +
 
 +
| 暂无
 +
|}
 +
 
 +
 
 +
 
 +
 
 +
 
 +
=== CDOTA_Unit_Nian ===
 +
 
 +
:::::extends [[#CDOTA_BaseNPC_Creature| CDOTA_BaseNPC_Creature]]
 +
 
 +
''No Description Set''
 +
 
 +
{| class="standard-table" style="width: 100%;"
 +
 
 +
! 函数名
 +
 
 +
! 函数原型
 +
 
 +
! 解释
 +
 
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CDOTA_Unit_Nian.GetHorn | GetHorn]]
 +
 
 +
| <code>handle GetHorn() </code>
 +
 
 +
| Is the Nian horn?
 +
 
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CDOTA_Unit_Nian.GetTail | GetTail]]
 +
 
 +
| <code>handle GetTail() </code>
 +
 
 +
| Is the Nian's tail broken?
  
 
|-
 
|-
Line 5,595: Line 5,793:
  
 
| 暂无
 
| 暂无
|-
+
|}
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.AddExperience | AddExperience]]
 
  
| <code>bool AddExperience(float amount, bool applyBotDifficultyScaling) </code>
 
  
| 给单位增加经验值
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.Buyback | Buyback]]
 
  
| <code>void Buyback() </code>
+
=== CDOTA_BaseNPC_Hero ===
  
| 花费金钱并买活英雄
+
:::::extends [[#CDOTA_BaseNPC| CDOTA_BaseNPC]]
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.CalculateStatBonus | CalculateStatBonus]]
+
''''
 +
 
 +
{| class="standard-table" style="width: 100%;"
 +
 
 +
! 函数名
 +
 
 +
! 函数原型
 +
 
 +
! 解释
 +
 
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.AddExperience | AddExperience]]
 +
 
 +
| <code>bool AddExperience(float amount, bool applyBotDifficultyScaling) </code>
 +
 
 +
| 给单位增加经验值
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.Buyback | Buyback]]
 +
 
 +
| <code>void Buyback() </code>
 +
 
 +
| 花费金钱并买活英雄
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Hero.CalculateStatBonus | CalculateStatBonus]]
  
 
| <code>void CalculateStatBonus() </code>
 
| <code>void CalculateStatBonus() </code>
Line 6,147: Line 6,365:
 
| <code>void SetCustomDeathXP(int a) </code>
 
| <code>void SetCustomDeathXP(int a) </code>
  
| 设置该英雄死亡提供的经验值 Tip:需要设置GameRules!
+
| 设置该英雄死亡提供的经验值 Tip:需要设置GameRules!p|GameRules boolean must be set for this to work!}}
 +
 
 
|-
 
|-
  
Line 6,211: Line 6,430:
  
 
| 暂无
 
| 暂无
 +
|}
 +
 +
 +
 +
 +
 +
=== CDOTA_BaseNPC_Creature ===
 +
 +
:::::extends [[#CDOTA_BaseNPC| CDOTA_BaseNPC]]
 +
 +
''No Description Set''
 +
 +
{| class="standard-table" style="width: 100%;"
 +
 +
! 函数名
 +
 +
! 函数原型
 +
 +
! 解释
 +
 
|-
 
|-
  
Line 6,323: Line 6,562:
  
 
| 设置该生物每级增加的经验值
 
| 设置该生物每级增加的经验值
|-
+
|}
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Building.GetInvulnCount | GetInvulnCount]]
 
  
| <code>int GetInvulnCount() </code>
 
  
| 返回建筑无敌计数
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Building.SetInvulnCount | SetInvulnCount]]
 
  
| <code>void SetInvulnCount(int a) </code>
+
=== CDOTA_BaseNPC_Building ===
  
| 设置建筑无敌计数
+
:::::extends [[#CDOTA_BaseNPC| CDOTA_BaseNPC]]
|-
+
 
 +
''No Description Set''
 +
 
 +
{| class="standard-table" style="width: 100%;"
 +
 
 +
! 函数名
 +
 
 +
! 函数原型
 +
 
 +
! 解释
 +
 
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CDOTA_BaseNPC_Building.GetInvulnCount | GetInvulnCount]]
 +
 
 +
| <code>int GetInvulnCount() </code>
 +
 
 +
| 返回建筑无敌计数
 +
|-
 +
 
 +
| [[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%;"
 +
 
 +
! 函数名
 +
 
 +
! 函数原型
 +
 
 +
! 解释
 +
 
 +
|-
  
 
| [[Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.ActionState | ActionState]]
 
| [[Dota 2 Workshop Tools/Scripting/API/CRPG_Unit.ActionState | ActionState]]
Line 6,498: Line 6,775:
  
 
| 设置单位转向速率(度每秒)
 
| 设置单位转向速率(度每秒)
|-
+
|}
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.ClientLoadGridNav | ClientLoadGridNav]]
 
  
| <code>void ClientLoadGridNav() </code>
 
  
| 通知客户端需要载入网格信息,可用于允许客户端确定允许建筑的区域等
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetAlwaysShowPlayerInventory | SetAlwaysShowPlayerInventory]]
 
  
| <code>void SetAlwaysShowPlayerInventory(bool a) </code>
+
=== CDOTABaseGameMode ===
  
| 在HUD中显示玩家英雄的物品栏,不管选择了哪个单位
+
:::::extends [[#CBaseEntity| CBaseEntity]]
|-
+
 
 +
''No Description Set''
 +
 
 +
{| class="standard-table" style="width: 100%;"
 +
 
 +
! 函数名
 +
 
 +
! 函数原型
 +
 
 +
! 解释
 +
 
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.ClientLoadGridNav | ClientLoadGridNav]]
 +
 
 +
| <code>void ClientLoadGridNav() </code>
 +
 
 +
| 通知客户端需要载入网格信息,可用于允许客户端确定允许建筑的区域等
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetAlwaysShowPlayerInventory | SetAlwaysShowPlayerInventory]]
 +
 
 +
| <code>void SetAlwaysShowPlayerInventory(bool a) </code>
 +
 
 +
| 在HUD中显示玩家英雄的物品栏,不管选择了哪个单位
 +
|-
  
 
| [[Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetAnnouncerDisabled | SetAnnouncerDisabled]]
 
| [[Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetAnnouncerDisabled | SetAnnouncerDisabled]]
Line 6,647: Line 6,944:
  
 
| 开关自定义英雄英雄经验表,该表必须提前被定义
 
| 开关自定义英雄英雄经验表,该表必须提前被定义
 +
|}
 +
 +
 +
 +
 +
 +
=== CDotaQuest ===
 +
 +
:::::extends [[#CBaseEntity| CBaseEntity]]
 +
 +
''A quest, as seen in the Tutorial and Frostivus''
 +
 +
{| class="standard-table" style="width: 100%;"
 +
 +
! 函数名
 +
 +
! 函数原型
 +
 +
! 解释
 +
 
|-
 
|-
  
Line 6,696: Line 7,013:
  
 
| 设置任务数值
 
| 设置任务数值
|-
+
|}
  
| [[Dota 2 Workshop Tools/Scripting/API/CDotaSubquestBase.CompleteSubquest | CompleteSubquest]]
 
  
| <code>void CompleteSubquest() </code>
 
  
| 完成子任务
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDotaSubquestBase.SetTextReplaceString | SetTextReplaceString]]
 
  
| <code>void SetTextReplaceString(string a) </code>
+
=== CDotaSubquestBase ===
  
| 设置该子任务的文本取代字符串
+
:::::extends [[#CDotaQuest| CDotaQuest]]
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDotaSubquestBase.SetTextReplaceValue | SetTextReplaceValue]]
+
''No Description Set''
  
| <code>void SetTextReplaceValue(int a, int b) </code>
+
{| class="standard-table" style="width: 100%;"
  
| 设置子任务数值
+
! 函数名
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CPhysicsComponent.ExpensiveInstantRayCast | ExpensiveInstantRayCast]]
+
! 函数原型
  
| <code>bool ExpensiveInstantRayCast(Vector a, Vector b, handle c) </code>
+
! 解释
  
| 进行一个立即(即阻挡)的光线投射,稍后会有handle/queue版本,并不计划实际使用这个!
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CPointTemplate.DeleteCreatedSpawnGroups | DeleteCreatedSpawnGroups]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDotaSubquestBase.CompleteSubquest | CompleteSubquest]]
  
| <code>void DeleteCreatedSpawnGroups() </code>
+
| <code>void CompleteSubquest() </code>
  
| 删除任何该点模板的刷新组。提示:并不删除点模板
+
| 完成子任务
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CPointTemplate.ForceSpawn | ForceSpawn]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDotaSubquestBase.SetTextReplaceString | SetTextReplaceString]]
  
| <code>void ForceSpawn() </code>
+
| <code>void SetTextReplaceString(string a) </code>
  
| 强制刷新该点模板指向的全部实体
+
| 设置该子任务的文本取代字符串
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CPointTemplate.GetSpawnedEntities | GetSpawnedEntities]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDotaSubquestBase.SetTextReplaceValue | SetTextReplaceValue]]
  
| <code>handle GetSpawnedEntities() </code>
+
| <code>void SetTextReplaceValue(int a, int b) </code>
  
| 获取最近被刷新的实体
+
| 设置子任务数值
|-
+
|}
  
| [[Dota 2 Workshop Tools/Scripting/API/CPointTemplate.SetSpawnCallback | SetSpawnCallback]]
 
  
| <code>void SetSpawnCallback(handle a, handle b) </code>
 
  
| 设置刷新回调(hCallbackFunc, hCallbackScope, hCallbackData ),当模板产生实体时回调。被刷新的实体作为数组被传入
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.AddImpulseAtPosition | AddImpulseAtPosition]]
 
  
| <code>void AddImpulseAtPosition(Vector a, Vector b) </code>
+
=== CPhysicsComponent ===
  
| 在指定的世界位置施加一个物理推动
+
''No Description Set''
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.AddVelocity | AddVelocity]]
+
{| class="standard-table" style="width: 100%;"
  
| <code>void AddVelocity(Vector a, Vector b) </code>
+
! 函数名
  
| 为物理物件增加一个线速度或角速度
+
! 函数原型
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.DetachFromParent | DetachFromParent]]
+
! 解释
  
| <code>void DetachFromParent() </code>
 
 
| 从其父项(parent)中分离
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.GetSequence | GetSequence]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CPhysicsComponent.ExpensiveInstantRayCast | ExpensiveInstantRayCast]]
 +
 
 +
| <code>bool ExpensiveInstantRayCast(Vector a, Vector b, handle c) </code>
 +
 
 +
| 进行一个立即(即阻挡)的光线投射,稍后会有handle/queue版本,并不计划实际使用这个!
 +
|}
  
| <code><> GetSequence() </code>
 
  
| 返回激活的序列(sequence)
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.IsAttachedToParent | IsAttachedToParent]]
 
  
| <code>bool IsAttachedToParent() </code>
 
  
| 是否依附父项(parent)
+
=== CPointTemplate ===
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.LookupSequence | LookupSequence]]
+
''No Description Set''
  
| <code><> LookupSequence(string a) </code>
+
{| class="standard-table" style="width: 100%;"
  
| 输入名字返回序列(sequence)ID
+
! 函数名
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.SequenceDuration | SequenceDuration]]
+
! 函数原型
  
| <code>float SequenceDuration(string a) </code>
+
! 解释
  
| 按秒数返回指定序列(sequence)的持续时间
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.SetAngularVelocity | SetAngularVelocity]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CPointTemplate.DeleteCreatedSpawnGroups | DeleteCreatedSpawnGroups]]
  
| <code>void SetAngularVelocity(Vector a) </code>
+
| <code>void DeleteCreatedSpawnGroups() </code>
  
| 暂无描述
+
| 删除任何该点模板的刷新组。提示:并不删除点模板
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.SetAnimation | SetAnimation]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CPointTemplate.ForceSpawn | ForceSpawn]]
  
| <code>void SetAnimation(string a) </code>
+
| <code>void ForceSpawn() </code>
  
| 输入动画名称播放动作,需要模型拥有该动画
+
| 强制刷新该点模板指向的全部实体
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.SetBodyGroup | SetBodyGroup]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CPointTemplate.GetSpawnedEntities | GetSpawnedEntities]]
  
| <code>void SetBodyGroup(string a) </code>
+
| <code>handle GetSpawnedEntities() </code>
  
| 暂无描述
+
| 获取最近被刷新的实体
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.SetMaterialGroup | SetMaterialGroup]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CPointTemplate.SetSpawnCallback | SetSpawnCallback]]
  
| <code>void SetMaterialGroup(utlstringtoken a) </code>
+
| <code>void SetSpawnCallback(handle a, handle b) </code>
  
| 暂无描述
+
| 设置刷新回调(hCallbackFunc, hCallbackScope, hCallbackData ),当模板产生实体时回调。被刷新的实体作为数组被传入
|-
+
|}
  
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.SetVelocity | SetVelocity]]
 
  
| <code>void SetVelocity(Vector velocity) </code>
 
  
| 暂无描述
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.GetAttachmentAngles | GetAttachmentAngles]]
 
  
| <code>Vector GetAttachmentAngles(int a) </code>
+
=== CBodyComponent ===
  
| 获得指定ID附件的角度,返回vector(p,y,r)
+
''No Description Set''
|-
+
 
 +
{| class="standard-table" style="width: 100%;"
 +
 
 +
! 函数名
  
| [[Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.GetAttachmentOrigin | GetAttachmentOrigin]]
+
! 函数原型
  
| <code>Vector GetAttachmentOrigin(int a) </code>
+
! 解释
  
| 获得指定ID附件的源vector
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.IsSequenceFinished | IsSequenceFinished]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.AddImpulseAtPosition | AddImpulseAtPosition]]
  
| <code>bool IsSequenceFinished() </code>
+
| <code>void AddImpulseAtPosition(Vector a, Vector b) </code>
  
| 查询主序列是否播放结束
+
| 在指定的世界位置施加一个物理推动
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.ScriptLookupAttachment | ScriptLookupAttachment]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.AddVelocity | AddVelocity]]
  
| <code>int ScriptLookupAttachment(string a) </code>
+
| <code>void AddVelocity(Vector a, Vector b) </code>
  
| 获得指定名序列的ID
+
| 为物理物件增加一个线速度或角速度
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.SetBodygroup | SetBodygroup]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.DetachFromParent | DetachFromParent]]
  
| <code>void SetBodygroup(int a, int b) </code>
+
| <code>void DetachFromParent() </code>
  
| 设置一个bodygroup
+
| 从其父项(parent)中分离
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.SetModelScale | SetModelScale]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.GetSequence | GetSequence]]
  
| <code>void SetModelScale(float scale) </code>
+
| <code><> GetSequence() </code>
  
| 设置模型放大率。如果模型缩放为1,使用SetModelScale(10.0)将放大率设置成10.0.
+
| 返回激活的序列(sequence)
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.SetPoseParameter | SetPoseParameter]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.IsAttachedToParent | IsAttachedToParent]]
  
| <code>float SetPoseParameter(string a, float b) </code>
+
| <code>bool IsAttachedToParent() </code>
  
| 将指定的位置参数(pose parameter)设定为指定值
+
| 是否依附父项(parent)
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CBaseCombatCharacter.GetEquippedWeapons | GetEquippedWeapons]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.LookupSequence | LookupSequence]]
  
| <code>table GetEquippedWeapons() </code>
+
| <code><> LookupSequence(string a) </code>
  
| GetEquippedWeapons(): 获取一个装备武器的数组
+
| 输入名字返回序列(sequence)ID
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CBaseCombatCharacter.GetWeaponCount | GetWeaponCount]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.SequenceDuration | SequenceDuration]]
  
| <code>int GetWeaponCount() </code>
+
| <code>float SequenceDuration(string a) </code>
  
| GetWeaponCount(): 获取当前装备的武器数量
+
| 按秒数返回指定序列(sequence)的持续时间
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/ProjectileManager.CreateLinearProjectile | CreateLinearProjectile]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.SetAngularVelocity | SetAngularVelocity]]
  
| <code>int CreateLinearProjectile(table infoTable) </code>
+
| <code>void SetAngularVelocity(Vector a) </code>
  
| 创建一个线性投射物并返回其ID
+
| 暂无描述
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/ProjectileManager.CreateTrackingProjectile | CreateTrackingProjectile]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.SetAnimation | SetAnimation]]
  
| <code>void CreateTrackingProjectile(handle a) </code>
+
| <code>void SetAnimation(string a) </code>
  
| 创建一个追踪投射物
+
| 输入动画名称播放动作,需要模型拥有该动画
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/ProjectileManager.DestroyLinearProjectile | DestroyLinearProjectile]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.SetBodyGroup | SetBodyGroup]]
  
| <code>void DestroyLinearProjectile(int a) </code>
+
| <code>void SetBodyGroup(string a) </code>
  
| 摧毁指定ID的线性投射物
+
| 暂无描述
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/ProjectileManager.ProjectileDodge | ProjectileDodge]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.SetMaterialGroup | SetMaterialGroup]]
  
| <code>void ProjectileDodge(handle a) </code>
+
| <code>void SetMaterialGroup(utlstringtoken a) </code>
  
| 使得特定单位躲避投射物
+
| 暂无描述
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CBaseTrigger.Disable | Disable]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBodyComponent.SetVelocity | SetVelocity]]
  
| <code>void Disable() </code>
+
| <code>void SetVelocity(Vector velocity) </code>
  
| 禁止触发器
+
| 暂无描述
|-
+
|}
  
| [[Dota 2 Workshop Tools/Scripting/API/CBaseTrigger.Enable | Enable]]
 
  
| <code>void Enable() </code>
 
  
| 允许触发器
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CBaseTrigger.IsTouching | IsTouching]]
 
  
| <code>bool IsTouching(handle a) </code>
+
=== CBaseAnimating ===
  
| 检查指定实体是否正在接触触发器
+
:::::extends [[#CBaseEntity| CBaseEntity]]
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CEnvEntityMaker.SpawnEntity | SpawnEntity]]
+
''A class containing functions involved in animations''
  
| <code>void SpawnEntity() </code>
+
{| class="standard-table" style="width: 100%;"
  
| 在生成器的位置创建一个实体
+
! 函数名
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CEnvEntityMaker.SpawnEntityAtEntityOrigin | SpawnEntityAtEntityOrigin]]
+
! 函数原型
  
| <code>void SpawnEntityAtEntityOrigin(handle a) </code>
+
! 解释
  
| 在指定实体的位置立刻创建一个实体
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CEnvEntityMaker.SpawnEntityAtLocation | SpawnEntityAtLocation]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.GetAttachmentAngles | GetAttachmentAngles]]
  
| <code>void SpawnEntityAtLocation(Vector a, Vector b) </code>
+
| <code>Vector GetAttachmentAngles(int a) </code>
  
| 在指定位置和方向创建一个实体,方向是角度制欧拉角(pitch, yaw, roll)
+
| 获得指定ID附件的角度,返回vector(p,y,r)
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CEnvEntityMaker.SpawnEntityAtNamedEntityOrigin | SpawnEntityAtNamedEntityOrigin]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.GetAttachmentOrigin | GetAttachmentOrigin]]
  
| <code>void SpawnEntityAtNamedEntityOrigin(string a) </code>
+
| <code>Vector GetAttachmentOrigin(int a) </code>
  
| 在指定名字实体的位置创建一个实体
+
| 获得指定ID附件的源vector
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAVoteSystem.StartVote | StartVote]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.IsSequenceFinished | IsSequenceFinished]]
  
| <code>void StartVote(handle a) </code>
+
| <code>bool IsSequenceFinished() </code>
  
| 开始投票,详细由传入的table制定
+
| 查询主序列是否播放结束
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CMarkupVolumeTagged.HasTag | HasTag]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.ScriptLookupAttachment | ScriptLookupAttachment]]
  
| <code>bool HasTag(string a) </code>
+
| <code>int ScriptLookupAttachment(string a) </code>
  
| 查询该卷是否带有指定标签
+
| 获得指定名序列的ID
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CScriptPrecacheContext.AddResource | AddResource]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.SetBodygroup | SetBodygroup]]
  
| <code>void AddResource(string a) </code>
+
| <code>void SetBodygroup(int a, int b) </code>
  
| 预缓存指定资源
+
| 设置一个bodygroup
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CScriptPrecacheContext.GetValue | GetValue]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.SetModelScale | SetModelScale]]
  
| <code>table GetValue(string a) </code>
+
| <code>void SetModelScale(float scale) </code>
  
| 读取一个键值(spawn key)
+
| 设置模型放大率。如果模型缩放为1,使用SetModelScale(10.0)将放大率设置成10.0.
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CScriptKeyValues.GetValue | GetValue]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBaseAnimating.SetPoseParameter | SetPoseParameter]]
  
| <code>table GetValue(string a) </code>
+
| <code>float SetPoseParameter(string a, float b) </code>
 
 
| Reads a spawn key
 
  
 +
| 将指定的位置参数(pose parameter)设定为指定值
 
|}
 
|}
  
Line 7,018: Line 7,302:
  
  
=== CScriptParticleManager ===
+
=== CBaseCombatCharacter ===
  
 
''No Description Set''
 
''No Description Set''
 
 
 
''Global accessor variable:'' <code>ParticleManager</code>
 
  
 
{| class="standard-table" style="width: 100%;"
 
{| class="standard-table" style="width: 100%;"
Line 7,036: Line 7,316:
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.CreateParticle | CreateParticle]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBaseCombatCharacter.GetEquippedWeapons | GetEquippedWeapons]]
  
| <code>int CreateParticle(string particleName, int particleAttach, handle owningEntity) </code>
+
| <code>table GetEquippedWeapons() </code>
  
| 创建一个新的粒子特效
+
| GetEquippedWeapons(): 获取一个装备武器的数组
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.CreateParticleForPlayer | CreateParticleForPlayer]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBaseCombatCharacter.GetWeaponCount | GetWeaponCount]]
  
| <code>int CreateParticleForPlayer(string particleName, int particleAttach, handle owningEntity, handle owningPlayer) </code>
+
| <code>int GetWeaponCount() </code>
 +
 
 +
| GetWeaponCount(): 获取当前装备的武器数量
 +
|}
  
| 创建一个只对指定玩家播放的粒子特效
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.DestroyParticle | DestroyParticle]]
 
  
| <code>void DestroyParticle(int particleID, bool immediately) </code>
 
  
| Destroys particle.
 
  
|-
+
=== ProjectileManager ===
  
| [[Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.GetParticleReplacement | GetParticleReplacement]]
+
''The projectile manager, it manages projectiles.''
  
| <code>string GetParticleReplacement(string a, handle b) </code>
+
{| class="standard-table" style="width: 100%;"
  
| 暂无描述
+
! 函数名
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.ReleaseParticleIndex | ReleaseParticleIndex]]
+
! 函数原型
  
| <code>void ReleaseParticleIndex(int particleId) </code>
+
! 解释
  
| 施放指定粒子特效索引号
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.SetParticleAlwaysSimulate | SetParticleAlwaysSimulate]]
+
| [[Dota 2 Workshop Tools/Scripting/API/ProjectileManager.CreateLinearProjectile | CreateLinearProjectile]]
  
| <code>void SetParticleAlwaysSimulate(int a) </code>
+
| <code>int CreateLinearProjectile(table infoTable) </code>
  
| 暂无描述
+
| 创建一个线性投射物并返回其ID
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.SetParticleControl | SetParticleControl]]
+
| [[Dota 2 Workshop Tools/Scripting/API/ProjectileManager.CreateTrackingProjectile | CreateTrackingProjectile]]
  
| <code>void SetParticleControl(int particleId, int controlIndex, Vector controlData) </code>
+
| <code>void CreateTrackingProjectile(handle a) </code>
  
| 设置控制粒子特效的控制点数据
+
| 创建一个追踪投射物
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.SetParticleControlEnt | SetParticleControlEnt]]
+
| [[Dota 2 Workshop Tools/Scripting/API/ProjectileManager.DestroyLinearProjectile | DestroyLinearProjectile]]
  
| <code>void SetParticleControlEnt(int a, int b, handle c, int d, string e, Vector f, bool g) </code>
+
| <code>void DestroyLinearProjectile(int a) </code>
  
| 暂无描述
+
| 摧毁指定ID的线性投射物
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CScriptHeroList.GetAllHeroes | GetAllHeroes]]
+
| [[Dota 2 Workshop Tools/Scripting/API/ProjectileManager.ProjectileDodge | ProjectileDodge]]
  
| <code>table GetAllHeroes() </code>
+
| <code>void ProjectileDodge(handle a) </code>
  
| 返回当前世界全部英雄
+
| 使得特定单位躲避投射物
|-
+
|}
  
| [[Dota 2 Workshop Tools/Scripting/API/CScriptHeroList.GetHero | GetHero]]
 
  
| <code>handle GetHero(int heroId) </code>
 
  
| 获取英雄列表中第N位英雄
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CScriptHeroList.GetHeroCount | GetHeroCount]]
 
  
| <code>int GetHeroCount() </code>
+
=== CBaseTrigger ===
  
| 返回当前世界英雄数目
+
:::::extends [[#CBaseEntity| CBaseEntity]]
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CNativeOutputs.AddOutput | AddOutput]]
+
''No Description Set''
  
| <code>void AddOutput(string a, string b) </code>
+
{| class="standard-table" style="width: 100%;"
  
| 增加一个输出
+
! 函数名
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CNativeOutputs.Init | Init]]
+
! 函数原型
  
| <code>void Init(int a) </code>
+
! 解释
  
| 初始化输出
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CEnvProjectedTexture.SetFarRange | SetFarRange]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBaseTrigger.Disable | Disable]]
  
| <code>void SetFarRange(float a) </code>
+
| <code>void Disable() </code>
  
| 设置光照最大距离
+
| 禁止触发器
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CEnvProjectedTexture.SetLinearAttenuation | SetLinearAttenuation]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBaseTrigger.Enable | Enable]]
  
| <code>void SetLinearAttenuation(float a) </code>
+
| <code>void Enable() </code>
  
| 设置光照线性淡化值
+
| 允许触发器
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CEnvProjectedTexture.SetNearRange | SetNearRange]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CBaseTrigger.IsTouching | IsTouching]]
  
| <code>void SetNearRange(float a) </code>
+
| <code>bool IsTouching(handle a) </code>
  
| 设置光照最小距离
+
| 检查指定实体是否正在接触触发器
|-
+
|}
  
| [[Dota 2 Workshop Tools/Scripting/API/CEnvProjectedTexture.SetQuadraticAttenuation | SetQuadraticAttenuation]]
 
  
| <code>void SetQuadraticAttenuation(float a) </code>
 
  
| 设置光照二次项淡化值
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CEnvProjectedTexture.SetVolumetrics | SetVolumetrics]]
 
  
| <code>void SetVolumetrics(bool a, float b, float c, int d, float e) </code>
+
=== CEnvEntityMaker ===
  
| 开关体积光参数: bool bOn, float flIntensity, float flNoise, int nPlanes, float flPlaneOffset
+
:::::extends [[#CBaseEntity| CBaseEntity]]
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CInfoData.QueryColor | QueryColor]]
+
''No Description Set''
  
| <code>Vector QueryColor(utlstringtoken a, Vector b) </code>
+
{| class="standard-table" style="width: 100%;"
  
| 查询该键值颜色数据
+
! 函数名
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CInfoData.QueryFloat | QueryFloat]]
+
! 函数原型
  
| <code>float QueryFloat(utlstringtoken a, float b) </code>
+
! 解释
  
| 查询该键值浮点(float)数据
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CInfoData.QueryInt | QueryInt]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CEnvEntityMaker.SpawnEntity | SpawnEntity]]
  
| <code>int QueryInt(utlstringtoken a, int b) </code>
+
| <code>void SpawnEntity() </code>
  
| 查询该键值整型(int)数据
+
| 在生成器的位置创建一个实体
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CInfoData.QueryNumber | QueryNumber]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CEnvEntityMaker.SpawnEntityAtEntityOrigin | SpawnEntityAtEntityOrigin]]
  
| <code>float QueryNumber(utlstringtoken a, float b) </code>
+
| <code>void SpawnEntityAtEntityOrigin(handle a) </code>
  
| 查询该键值数值数据
+
| 在指定实体的位置立刻创建一个实体
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CInfoData.QueryString | QueryString]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CEnvEntityMaker.SpawnEntityAtLocation | SpawnEntityAtLocation]]
  
| <code>string QueryString(utlstringtoken a, string b) </code>
+
| <code>void SpawnEntityAtLocation(Vector a, Vector b) </code>
  
| 查询该键值字符串(string)数据
+
| 在指定位置和方向创建一个实体,方向是角度制欧拉角(pitch, yaw, roll)
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CInfoData.QueryVector | QueryVector]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CEnvEntityMaker.SpawnEntityAtNamedEntityOrigin | SpawnEntityAtNamedEntityOrigin]]
 +
 
 +
| <code>void SpawnEntityAtNamedEntityOrigin(string a) </code>
 +
 
 +
| 在指定名字实体的位置创建一个实体
 +
|}
  
| <code>Vector QueryVector(utlstringtoken a, Vector b) </code>
 
  
| 查询该键值矢量(vector)数据
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CPhysicsProp.DisableMotion | DisableMotion]]
 
  
| <code>void DisableMotion() </code>
 
  
| 禁止该元件运动
+
=== CDOTAVoteSystem ===
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CPhysicsProp.EnableMotion | EnableMotion]]
+
''No Description Set''
  
| <code>void EnableMotion() </code>
+
{| class="standard-table" style="width: 100%;"
  
| 允许该元件运动
+
! 函数名
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.Defeated | Defeated]]
+
! 函数原型
  
| <code>void Defeated() </code>
+
! 解释
  
| 摧毁遗迹等
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.DidMatchSignoutTimeOut | DidMatchSignoutTimeOut]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAVoteSystem.StartVote | StartVote]]
  
| <code>bool DidMatchSignoutTimeOut() </code>
+
| <code>void StartVote(handle a) </code>
  
| 当游戏结束,等待弹窗时为真
+
| 开始投票,详细由传入的table制定
|-
+
|}
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetCustomGameDifficulty | GetCustomGameDifficulty]]
 
  
| <code>int GetCustomGameDifficulty() </code>
 
  
| 返回自定义游戏模式难度
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetDifficulty | GetDifficulty]]
 
  
| <code>int GetDifficulty() </code>
+
=== CMarkupVolumeTagged ===
  
| 返回自定义游戏模式难度
+
''No Description Set''
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetDroppedItem | GetDroppedItem]]
+
{| class="standard-table" style="width: 100%;"
  
| <code>handle GetDroppedItem(int dropIndex) </code>
+
! 函数名
  
| 获得第X个掉落物品
+
! 函数原型
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetGameModeEntity | GetGameModeEntity]]
+
! 解释
  
| <code>handle GetGameModeEntity() </code>
 
 
| 设置游戏模式实体
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetGameTime | GetGameTime]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CMarkupVolumeTagged.HasTag | HasTag]]
  
| <code>float GetGameTime() </code>
+
| <code>bool HasTag(string a) </code>
  
| 返回游戏开始后经过的秒数,暂停时间不计算在内
+
| 查询该卷是否带有指定标签
|-
+
|}
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetMatchSignoutComplete | GetMatchSignoutComplete]]
 
  
| <code>bool GetMatchSignoutComplete() </code>
 
  
| 是否已经接受包含回报信息的弹窗
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetNianFightStartTime | GetNianFightStartTime]]
 
  
| <code>float GetNianFightStartTime() </code>
+
=== CScriptPrecacheContext ===
  
| 获得年兽大战开始时间
+
''No Description Set''
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetNianTotalDamageTaken | GetNianTotalDamageTaken]]
+
{| class="standard-table" style="width: 100%;"
  
| <code>int GetNianTotalDamageTaken() </code>
+
! 函数名
  
| 芳晓活动,获得年兽受到的总伤害
+
! 函数原型
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetTimeOfDay | GetTimeOfDay]]
+
! 解释
  
| <code>float GetTimeOfDay() </code>
 
 
| 获取一天中的时间(游戏时间)
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.IsDaytime | IsDaytime]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CScriptPrecacheContext.AddResource | AddResource]]
  
| <code>bool IsDaytime() </code>
+
| <code>void AddResource(string a) </code>
  
| 是否是白天
+
| 预缓存指定资源
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.MakeTeamLose | MakeTeamLose]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CScriptPrecacheContext.GetValue | GetValue]]
  
| <code>void MakeTeamLose(int team) </code>
+
| <code>table GetValue(string a) </code>
  
| 使指定队伍失败
+
| 读取一个键值(spawn key)
|-
+
|}
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.NumDroppedItems | NumDroppedItems]]
 
  
| <code>int NumDroppedItems() </code>
 
  
| 返回当前掉落在地面的物品数量
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.Playtesting_UpdateAddOnKeyValues | Playtesting_UpdateAddOnKeyValues]]
 
  
| <code>void Playtesting_UpdateAddOnKeyValues() </code>
+
=== CScriptKeyValues ===
  
| 从磁盘数据中更新自定义英雄、单位、技能的键值
+
''No Description Set''
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.ResetDefeated | ResetDefeated]]
+
{| class="standard-table" style="width: 100%;"
  
| <code>void ResetDefeated() </code>
+
! 函数名
  
| 遗迹摧毁后重新开始
+
! 函数原型
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.ResetToHeroSelection | ResetToHeroSelection]]
+
! 解释
  
| <code>void ResetToHeroSelection() </code>
+
|-
  
| 重新开始时选择英雄
+
| [[Dota 2 Workshop Tools/Scripting/API/CScriptKeyValues.GetValue | GetValue]]
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SendCustomMessage | SendCustomMessage]]
+
| <code>table GetValue(string a) </code>
  
| <code>void SendCustomMessage(string message, int teamID, int unknown(1?)) </code>
+
| Reads a spawn key
  
| Displays a l 在左侧文本框显示一行文本,通常用来提示死亡、反补队友、买活等信息。使用严格HTML格式(&lt;br&gt;,&lt;u&gt;,&lt;font&gt;)
+
|}
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetCreepMinimapIconScale | SetCreepMinimapIconScale]]
 
  
| <code>void SetCreepMinimapIconScale(float scale) </code>
 
  
| 在小地图上缩放中立生物图标
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetCustomGameDifficulty | SetCustomGameDifficulty]]
 
  
| <code>void SetCustomGameDifficulty(int a) </code>
+
=== CScriptParticleManager ===
  
| 设置自定义游戏模式难度等级
+
''No Description Set''
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetCustomGameEndDelay | SetCustomGameEndDelay]]
 
  
| <code>void SetCustomGameEndDelay(float delay) </code>
 
  
| Sets the delay time until the game ends
+
''Global accessor variable:'' <code>ParticleManager</code>
  
|-
+
{| class="standard-table" style="width: 100%;"
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetCustomVictoryMessageDuration | SetCustomVictoryMessageDuration]]
+
! 函数名
  
| <code>void SetCustomVictoryMessageDuration(float duration) </code>
+
! 函数原型
  
| Sets how long the custom victory message should last
+
! 解释
  
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetFirstBloodActive | SetFirstBloodActive]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.CreateParticle | CreateParticle]]
  
| <code>void SetFirstBloodActive(bool a) </code>
+
| <code>int CreateParticle(string particleName, int particleAttach, handle owningEntity) </code>
  
| 设置第一滴血是否已经产生
+
| 创建一个新的粒子特效
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetGameWinner | SetGameWinner]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.CreateParticleForPlayer | CreateParticleForPlayer]]
  
| <code>void SetGameWinner(int team) </code>
+
| <code>int CreateParticleForPlayer(string particleName, int particleAttach, handle owningEntity, handle owningPlayer) </code>
  
| 使指定队伍胜利
+
| 创建一个只对指定玩家播放的粒子特效
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetGoldPerTick | SetGoldPerTick]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.DestroyParticle | DestroyParticle]]
 +
 
 +
| <code>void DestroyParticle(int particleID, bool immediately) </code>
  
| <code>void SetGoldPerTick(int a) </code>
+
| Destroys particle.
  
| 设置每个时间间隔获得的金币
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetGoldTickTime | SetGoldTickTime]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.GetParticleReplacement | GetParticleReplacement]]
  
| <code>void SetGoldTickTime(float a) </code>
+
| <code>string GetParticleReplacement(string a, handle b) </code>
  
| 设置获得金币的时间周期
+
| 暂无描述
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetHeroMinimapIconScale | SetHeroMinimapIconScale]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.ReleaseParticleIndex | ReleaseParticleIndex]]
  
| <code>void SetHeroMinimapIconScale(int iconSize) </code>
+
| <code>void ReleaseParticleIndex(int particleId) </code>
  
| 设置小地图英雄图标尺寸
+
| 施放指定粒子特效索引号
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetHeroRespawnEnabled | SetHeroRespawnEnabled]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.SetParticleAlwaysSimulate | SetParticleAlwaysSimulate]]
  
| <code>void SetHeroRespawnEnabled(bool canRespawn) </code>
+
| <code>void SetParticleAlwaysSimulate(int a) </code>
  
| 设置是否使用默认英雄复活规则
+
| 暂无描述
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetHeroSelectionTime | SetHeroSelectionTime]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.SetParticleControl | SetParticleControl]]
  
| <code>void SetHeroSelectionTime(float time) </code>
+
| <code>void SetParticleControl(int particleId, int controlIndex, Vector controlData) </code>
  
| 设置选择英雄的时间
+
| 设置控制粒子特效的控制点数据
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetHideKillMessageHeaders | SetHideKillMessageHeaders]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CScriptParticleManager.SetParticleControlEnt | SetParticleControlEnt]]
  
| <code>void SetHideKillMessageHeaders(bool hide) </code>
+
| <code>void SetParticleControlEnt(int a, int b, handle c, int d, string e, Vector f, bool g) </code>
  
| Sets whether or not the kill banners should be hidden
+
| 暂无描述
 +
|}
  
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetNianFightStartTime | SetNianFightStartTime]]
 
  
| <code>void SetNianFightStartTime(float a) </code>
 
  
| 设置年兽大战开始时间
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetOverlayHealthBarUnit | SetOverlayHealthBarUnit]]
+
=== CScriptHeroList ===
 +
 
 +
''No Description Set''
  
| <code>void SetOverlayHealthBarUnit(handle unit, int style) </code>
 
  
| 在前端蒙版生命条上显示单位生命值
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetPostGameTime | SetPostGameTime]]
+
''Global accessor variable:'' <code>HeroList</code>
  
| <code>void SetPostGameTime(float time) </code>
+
{| class="standard-table" style="width: 100%;"
  
| 设置在结束游戏后服务器与玩家断线前的时间
+
! 函数名
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetPreGameTime | SetPreGameTime]]
+
! 函数原型
  
| <code>void SetPreGameTime(float time) </code>
+
! 解释
  
| 设置选择英雄与开始游戏之间的时间
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetRuneMinimapIconScale | SetRuneMinimapIconScale]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CScriptHeroList.GetAllHeroes | GetAllHeroes]]
  
| <code>void SetRuneMinimapIconScale(float scale) </code>
+
| <code>table GetAllHeroes() </code>
  
| 缩放小地图神符图标
+
| 返回当前世界全部英雄
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetRuneSpawnTime | SetRuneSpawnTime]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CScriptHeroList.GetHero | GetHero]]
  
| <code>void SetRuneSpawnTime(float time) </code>
+
| <code>handle GetHero(int heroId) </code>
  
| 设置神符刷新时间
+
| 获取英雄列表中第N位英雄
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetSafeToLeave | SetSafeToLeave]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CScriptHeroList.GetHeroCount | GetHeroCount]]
 +
 
 +
| <code>int GetHeroCount() </code>
 +
 
 +
| 返回当前世界英雄数目
 +
|}
  
| <code>void SetSafeToLeave(bool safeToLeave) </code>
 
  
| 标记游戏可安全离开
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetSameHeroSelectionEnabled | SetSameHeroSelectionEnabled]]
 
  
| <code>void SetSameHeroSelectionEnabled(bool enabled) </code>
 
  
| 允许选择重复英雄
+
=== CNativeOutputs ===
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetTimeOfDay | SetTimeOfDay]]
+
''No Description Set''
  
| <code>void SetTimeOfDay(float time) </code>
+
{| class="standard-table" style="width: 100%;"
  
| 设置一天中的时间(游戏时间)
+
! 函数名
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetTreeRegrowTime | SetTreeRegrowTime]]
+
! 函数原型
  
| <code>void SetTreeRegrowTime(float time) </code>
+
! 解释
  
| 设置树重新生长的时间(秒)
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetUseBaseGoldBountyOnHeroes | SetUseBaseGoldBountyOnHeroes]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CNativeOutputs.AddOutput | AddOutput]]
  
| <code>void SetUseBaseGoldBountyOnHeroes(bool a) </code>
+
| <code>void AddOutput(string a, string b) </code>
  
| 英雄将使用基础NPC规则来决定赏金,而不是DOTA指定规则
+
| 增加一个输出
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetUseCustomHeroXPValues | SetUseCustomHeroXPValues]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CNativeOutputs.Init | Init]]
  
| <code>void SetUseCustomHeroXPValues(bool a) </code>
+
| <code>void Init(int a) </code>
  
| 允许英雄提供指定数目的经验值(必须先设置)
+
| 初始化输出
|-
+
|}
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetUseUniversalShopMode | SetUseUniversalShopMode]]
 
  
| <code>void SetUseUniversalShopMode(bool enabled) </code>
 
  
| 为真时,所有物品当处于任意商店范围内时都能购买到,包括秘密商店物品
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.State_Get | State_Get]]
 
  
| <code><> State_Get() </code>
+
=== CEnvProjectedTexture ===
  
| 获取当前游戏规则状态
+
:::::extends [[#CBaseEntity| CBaseEntity]]
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CToneMapControllerComponent.GetBloomScale | GetBloomScale]]
+
''No Description Set''
  
| <code>float GetBloomScale() </code>
+
{| class="standard-table" style="width: 100%;"
  
| 获取该光泽贴图控制器(tonemap controller)的泛光缩放(bloomscale)
+
! 函数名
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CToneMapControllerComponent.GetMaxExposure | GetMaxExposure]]
+
! 函数原型
  
| <code>float GetMaxExposure() </code>
+
! 解释
  
| 获取该光泽贴图控制器(tonemap controller)的最大曝光(max exposure)
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CToneMapControllerComponent.GetMinExposure | GetMinExposure]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CEnvProjectedTexture.SetFarRange | SetFarRange]]
  
| <code>float GetMinExposure() </code>
+
| <code>void SetFarRange(float a) </code>
  
| 获取该光泽贴图控制器(tonemap controller)的最小曝光(min exposure)
+
| 设置光照最大距离
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CToneMapControllerComponent.SetBloomScale | SetBloomScale]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CEnvProjectedTexture.SetLinearAttenuation | SetLinearAttenuation]]
  
| <code>void SetBloomScale(float a) </code>
+
| <code>void SetLinearAttenuation(float a) </code>
  
| 设置该光泽贴图控制器(tonemap controller)的泛光缩放(bloomscale)
+
| 设置光照线性淡化值
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CToneMapControllerComponent.SetMaxExposure | SetMaxExposure]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CEnvProjectedTexture.SetNearRange | SetNearRange]]
  
| <code>void SetMaxExposure(float a) </code>
+
| <code>void SetNearRange(float a) </code>
  
| 设置该光泽贴图控制器(tonemap controller)的最大曝光(max exposure)
+
| 设置光照最小距离
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CToneMapControllerComponent.SetMinExposure | SetMinExposure]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CEnvProjectedTexture.SetQuadraticAttenuation | SetQuadraticAttenuation]]
  
| <code>void SetMinExposure(float a) </code>
+
| <code>void SetQuadraticAttenuation(float a) </code>
  
| 设置该光泽贴图控制器(tonemap controller)的最小曝光(min exposure)
+
| 设置光照二次项淡化值
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Axis | Axis]]
+
| [[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
 +
|}
  
| <code>void Axis(Vector a, Quaternion b, float c, bool d, float e) </code>
 
  
| 绘制一个轴线。在世界空间中指定出发点和方向
 
|-
 
  
| [[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>
 
  
| 绘制一个世界空间轴向盒。在世界空间中指定边界
+
=== CInfoData ===
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.BoxAngles | BoxAngles]]
+
''No Description Set''
  
| <code>void BoxAngles(Vector a, Vector b, Vector c, Quaternion d, int e, int f, int g, int h, bool i, float j) </code>
+
{| class="standard-table" style="width: 100%;"
  
| 在出发点绘制一个定向盒。在世界空间中指定边界
+
! 函数名
|-
 
  
| [[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>
+
! 解释
  
| 绘制一个胶囊体。在世界空间中指定基部
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Circle | Circle]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CInfoData.QueryColor | QueryColor]]
  
| <code>void Circle(Vector a, Quaternion b, float c, int d, int e, int f, int g, bool h, float i) </code>
+
| <code>Vector QueryColor(utlstringtoken a, Vector b) </code>
  
| 绘制一个圆。在世界空间中指定中心
+
| 查询该键值颜色数据
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.CircleScreenOriented | CircleScreenOriented]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CInfoData.QueryFloat | QueryFloat]]
  
| <code>void CircleScreenOriented(Vector a, float b, int c, int d, int e, int f, bool g, float h) </code>
+
| <code>float QueryFloat(utlstringtoken a, float b) </code>
  
| 绘制一个指向屏幕的圆。在世界空间中指定中心
+
| 查询该键值浮点(float)数据
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Cone | Cone]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CInfoData.QueryInt | QueryInt]]
  
| <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>int QueryInt(utlstringtoken a, int b) </code>
  
| 绘制一个线框锥形。在世界空间中指定结束点和方向
+
| 查询该键值整型(int)数据
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Cross | Cross]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CInfoData.QueryNumber | QueryNumber]]
  
| <code>void Cross(Vector a, float b, int c, int d, int e, int f, bool g, float h) </code>
+
| <code>float QueryNumber(utlstringtoken a, float b) </code>
  
| 绘制一个对齐屏幕的十字。在世界空间中指定出发点
+
| 查询该键值数值数据
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Cross3D | Cross3D]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CInfoData.QueryString | QueryString]]
  
| <code>void Cross3D(Vector a, float b, int c, int d, int e, int f, bool g, float h) </code>
+
| <code>string QueryString(utlstringtoken a, string b) </code>
  
| 绘制一个对齐世界的十字。在世界空间中指定出发点
+
| 查询该键值字符串(string)数据
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Cross3DOriented | Cross3DOriented]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CInfoData.QueryVector | QueryVector]]
 +
 
 +
| <code>Vector QueryVector(utlstringtoken a, Vector b) </code>
 +
 
 +
| 查询该键值矢量(vector)数据
 +
|}
  
| <code>void Cross3DOriented(Vector a, Quaternion b, float c, int d, int e, int f, int g, bool h, float i) </code>
 
  
| 绘制一个指向的十字。在世界空间中指定出发点
 
|-
 
  
| [[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>
 
  
| 绘制一个短划线。在世界空间中指定结束点
+
=== CPhysicsProp ===
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.EntityAttachments | EntityAttachments]]
+
''No Description Set''
  
| <code>void EntityAttachments(ehandle a, float b) </code>
+
{| class="standard-table" style="width: 100%;"
  
| 绘制实体附件
+
! 函数名
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.EntityAxis | EntityAxis]]
+
! 函数原型
  
| <code>void EntityAxis(ehandle a, float b, bool c, float d) </code>
+
! 解释
  
| 绘制实体源坐标轴
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.EntityBounds | EntityBounds]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CPhysicsProp.DisableMotion | DisableMotion]]
  
| <code>void EntityBounds(ehandle a, int b, int c, int d, int e, bool f, float g) </code>
+
| <code>void DisableMotion() </code>
  
| 绘制实体边界
+
| 禁止该元件运动
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.EntitySkeleton | EntitySkeleton]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CPhysicsProp.EnableMotion | EnableMotion]]
  
| <code>void EntitySkeleton(ehandle a, float b) </code>
+
| <code>void EnableMotion() </code>
  
| 绘制实体骨架
+
| 允许该元件运动
|-
+
|}
  
| [[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>
 
  
| 在实体上绘制文本
 
|-
 
  
| [[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>
+
=== CDOTAGamerules ===
  
| 绘制一个2D矩形填充的屏幕空间。按照像素对齐
+
''''
|-
 
  
| [[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>
 
  
| 绘制一个水平箭头。在世界空间中指定结束点
+
''Global accessor variable:'' <code>GameRules</code>
|-
+
 
 +
{| class="standard-table" style="width: 100%;"
 +
 
 +
! 函数名
  
| [[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>
+
! 解释
  
| 绘制一个两点间连线
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Line2D | Line2D]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.Defeated | Defeated]]
  
| <code>void Line2D(Vector2D a, Vector2D b, int c, int d, int e, int f, float g) </code>
+
| <code>void Defeated() </code>
  
| 绘制一个屏幕空间中亮点间连线
+
| 摧毁遗迹等
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.PopDebugOverlayScope | PopDebugOverlayScope]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.DidMatchSignoutTimeOut | DidMatchSignoutTimeOut]]
  
| <code>void PopDebugOverlayScope() </code>
+
| <code>bool DidMatchSignoutTimeOut() </code>
  
| 弹出蒙版分组用的标记,被标记的蒙版可被成批删除
+
| 当游戏结束,等待弹窗时为真
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.PushAndClearDebugOverlayScope | PushAndClearDebugOverlayScope]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetCustomGameDifficulty | GetCustomGameDifficulty]]
  
| <code>void PushAndClearDebugOverlayScope(utlstringtoken a) </code>
+
| <code>int GetCustomGameDifficulty() </code>
  
| 推入一个蒙版分组用的标记。删除所有使用该蒙版ID的蒙版
+
| 返回自定义游戏模式难度
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.PushDebugOverlayScope | PushDebugOverlayScope]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetDifficulty | GetDifficulty]]
  
| <code>void PushDebugOverlayScope(utlstringtoken a) </code>
+
| <code>int GetDifficulty() </code>
  
| 推入一个蒙版分组用的标记。被标记的蒙版可被成批删除
+
| 返回自定义游戏模式难度
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.RemoveAllInScope | RemoveAllInScope]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetDroppedItem | GetDroppedItem]]
  
| <code>void RemoveAllInScope(utlstringtoken a) </code>
+
| <code>handle GetDroppedItem(int dropIndex) </code>
  
| 移除指定标记的全部蒙版,无视其生命周期
+
| 获得第X个掉落物品
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.SolidCone | SolidCone]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetGameModeEntity | GetGameModeEntity]]
  
| <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>handle GetGameModeEntity() </code>
  
| 绘制一个固体锥。在世界空间中指定出发点和方向
+
| 设置游戏模式实体
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Sphere | Sphere]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetGameTime | GetGameTime]]
  
| <code>void Sphere(Vector a, float b, int c, int d, int e, int f, bool g, float h) </code>
+
| <code>float GetGameTime() </code>
  
| 绘制一个线框球体。在世界空间中指定中心
+
| 返回游戏开始后经过的秒数,暂停时间不计算在内
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.SweptBox | SweptBox]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetMatchSignoutComplete | GetMatchSignoutComplete]]
  
| <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>bool GetMatchSignoutComplete() </code>
  
| 绘制一个扫描盒。在世界空间中指定结束点并在本地空间中指定边界
+
| 是否已经接受包含回报信息的弹窗
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Text | Text]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetNianFightStartTime | GetNianFightStartTime]]
  
| <code>void Text(Vector a, int b, string c, float d, int e, int f, int g, int h, float i) </code>
+
| <code>float GetNianFightStartTime() </code>
  
| 绘制2D文本。在世界空间中指定出发点
+
| 获得年兽大战开始时间
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Texture | Texture]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetNianTotalDamageTaken | GetNianTotalDamageTaken]]
  
| <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>int GetNianTotalDamageTaken() </code>
  
| 绘制一个屏幕空间纹理。按照像素对齐
+
| 芳晓活动,获得年兽受到的总伤害
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Triangle | Triangle]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.GetTimeOfDay | GetTimeOfDay]]
  
| <code>void Triangle(Vector a, Vector b, Vector c, int d, int e, int f, int g, bool h, float i) </code>
+
| <code>float GetTimeOfDay() </code>
  
| 绘制一个填充三角形。在世界空间中指定顶部
+
| 获取一天中的时间(游戏时间)
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.UnitTestCycleOverlayRenderType | UnitTestCycleOverlayRenderType]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.IsDaytime | IsDaytime]]
  
| <code>void UnitTestCycleOverlayRenderType() </code>
+
| <code>bool IsDaytime() </code>
  
| 转换蒙版混合类型, 用于单位测试
+
| 是否是白天
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.VectorText3D | VectorText3D]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.MakeTeamLose | MakeTeamLose]]
  
| <code>void VectorText3D(Vector a, Quaternion b, string c, int d, int e, int f, int g, bool h, float i) </code>
+
| <code>void MakeTeamLose(int team) </code>
  
| 绘制3D文本。在世界空间中指定出发点和方向
+
| 使指定队伍失败
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.VertArrow | VertArrow]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.NumDroppedItems | NumDroppedItems]]
  
| <code>void VertArrow(Vector a, Vector b, float c, int d, int e, int f, int g, bool h, float i) </code>
+
| <code>int NumDroppedItems() </code>
  
| 绘制一个垂直箭头。在世界空间中指定结束点
+
| 返回当前掉落在地面的物品数量
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.YawArrow | YawArrow]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.Playtesting_UpdateAddOnKeyValues | Playtesting_UpdateAddOnKeyValues]]
  
| <code>void YawArrow(Vector a, float b, float c, float d, int e, int f, int g, int h, bool i, float j) </code>
+
| <code>void Playtesting_UpdateAddOnKeyValues() </code>
  
| 绘制一个指定偏航角的箭头。在世界空间中指定结束点
+
| 从磁盘数据中更新自定义英雄、单位、技能的键值
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CBaseFlex.GetCurrentScene | GetCurrentScene]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.ResetDefeated | ResetDefeated]]
  
| <code>handle GetCurrentScene() </code>
+
| <code>void ResetDefeated() </code>
  
| 返回最早激活的场景实体的实例(如果存在的话)
+
| 遗迹摧毁后重新开始
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CBaseFlex.GetSceneByIndex | GetSceneByIndex]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.ResetToHeroSelection | ResetToHeroSelection]]
  
| <code>handle GetSceneByIndex(int a) </code>
+
| <code>void ResetToHeroSelection() </code>
  
| 返回指定索引号的场景实体的实例
+
| 重新开始时选择英雄
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.AddBroadcastTeamTarget | AddBroadcastTeamTarget]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SendCustomMessage | SendCustomMessage]]
  
| <code>void AddBroadcastTeamTarget(int a) </code>
+
| <code>void SendCustomMessage(string message, int teamID, int unknown(1?)) </code>
  
| 在记分板列表上增加一个组(使用索引号)
+
| Displays a l 在左侧文本框显示一行文本,通常用来提示死亡、反补队友、买活等信息。使用严格HTML格式(&lt;br&gt;,&lt;u&gt;,&lt;font&gt;)
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.Cancel | Cancel]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetCreepMinimapIconScale | SetCreepMinimapIconScale]]
  
| <code>void Cancel() </code>
+
| <code>void SetCreepMinimapIconScale(float scale) </code>
  
| 取消场景重播
+
| 在小地图上缩放中立生物图标
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.EstimateLength | EstimateLength]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetCustomGameDifficulty | SetCustomGameDifficulty]]
  
| <code>float EstimateLength() </code>
+
| <code>void SetCustomGameDifficulty(int a) </code>
  
| 返回场景长度(秒)
+
| 设置自定义游戏模式难度等级
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.FindCamera | FindCamera]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetCustomGameEndDelay | SetCustomGameEndDelay]]
 +
 
 +
| <code>void SetCustomGameEndDelay(float delay) </code>
  
| <code>handle FindCamera() </code>
+
| Sets the delay time until the game ends
  
| 获取镜头
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.FindNamedEntity | FindNamedEntity]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetCustomVictoryMessageDuration | SetCustomVictoryMessageDuration]]
 +
 
 +
| <code>void SetCustomVictoryMessageDuration(float duration) </code>
  
| <code>handle FindNamedEntity(string a) </code>
+
| Sets how long the custom victory message should last
  
| 通过一个实体参照,比如!target,获取场景物体中的实际实体
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.IsPaused | IsPaused]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetFirstBloodActive | SetFirstBloodActive]]
  
| <code>bool IsPaused() </code>
+
| <code>void SetFirstBloodActive(bool a) </code>
  
| 场景是否被暂停
+
| 设置第一滴血是否已经产生
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.IsPlayingBack | IsPlayingBack]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetGameWinner | SetGameWinner]]
  
| <code>bool IsPlayingBack() </code>
+
| <code>void SetGameWinner(int team) </code>
  
| 场景是否正播放
+
| 使指定队伍胜利
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.LoadSceneFromString | LoadSceneFromString]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetGoldPerTick | SetGoldPerTick]]
  
| <code>bool LoadSceneFromString(string a, string b) </code>
+
| <code>void SetGoldPerTick(int a) </code>
  
| 输入虚拟场景名和VCD字符串,载入场景
+
| 设置每个时间间隔获得的金币
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.RemoveBroadcastTeamTarget | RemoveBroadcastTeamTarget]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetGoldTickTime | SetGoldTickTime]]
  
| <code>void RemoveBroadcastTeamTarget(int a) </code>
+
| <code>void SetGoldTickTime(float a) </code>
  
| 从记分板列表上移除一个组(使用索引号)
+
| 设置获得金币的时间周期
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.Start | Start]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetHeroMinimapIconScale | SetHeroMinimapIconScale]]
  
| <code>void Start(handle a) </code>
+
| <code>void SetHeroMinimapIconScale(int iconSize) </code>
  
| 开始场景重播,参数为激活者实体(activatorEntity)
+
| 设置小地图英雄图标尺寸
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/GridNav.GridPosToWorldCenterX | GridPosToWorldCenterX]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetHeroRespawnEnabled | SetHeroRespawnEnabled]]
  
| <code>float GridPosToWorldCenterX(int a) </code>
+
| <code>void SetHeroRespawnEnabled(bool canRespawn) </code>
  
| 获取指定X索引号的世界中心X位置(网格到世界)
+
| 设置是否使用默认英雄复活规则
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/GridNav.GridPosToWorldCenterY | GridPosToWorldCenterY]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetHeroSelectionTime | SetHeroSelectionTime]]
  
| <code>float GridPosToWorldCenterY(int a) </code>
+
| <code>void SetHeroSelectionTime(float time) </code>
  
| 获取指定Y索引号的世界中心Y位置(网格到世界)
+
| 设置选择英雄的时间
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/GridNav.IsBlocked | IsBlocked]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetHideKillMessageHeaders | SetHideKillMessageHeaders]]
 +
 
 +
| <code>void SetHideKillMessageHeaders(bool hide) </code>
  
| <code>bool IsBlocked(Vector a) </code>
+
| Sets whether or not the kill banners should be hidden
  
| 检查给定位置是否被阻挡
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/GridNav.IsNearbyTree | IsNearbyTree]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetNianFightStartTime | SetNianFightStartTime]]
  
| <code>bool IsNearbyTree(Vector position, float radius, bool c) </code>
+
| <code>void SetNianFightStartTime(float a) </code>
  
| 暂无描述
+
| 设置年兽大战开始时间
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/GridNav.IsTraversable | IsTraversable]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetOverlayHealthBarUnit | SetOverlayHealthBarUnit]]
  
| <code>bool IsTraversable(Vector a) </code>
+
| <code>void SetOverlayHealthBarUnit(handle unit, int style) </code>
  
| 检查给予维持是否可通过
+
| 在前端蒙版生命条上显示单位生命值
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/GridNav.RegrowAllTrees | RegrowAllTrees]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetPostGameTime | SetPostGameTime]]
  
| <code>void RegrowAllTrees() </code>
+
| <code>void SetPostGameTime(float time) </code>
  
| 暂无描述
+
| 设置在结束游戏后服务器与玩家断线前的时间
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/GridNav.WorldToGridPosX | WorldToGridPosX]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetPreGameTime | SetPreGameTime]]
  
| <code>int WorldToGridPosX(float a) </code>
+
| <code>void SetPreGameTime(float time) </code>
  
| 获取指定世界X位置的X索引(世界到网格)
+
| 设置选择英雄与开始游戏之间的时间
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/GridNav.WorldToGridPosY | WorldToGridPosY]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetRuneMinimapIconScale | SetRuneMinimapIconScale]]
  
| <code>int WorldToGridPosY(float a) </code>
+
| <code>void SetRuneMinimapIconScale(float scale) </code>
  
| 获取指定世界Y位置的Y索引(世界到网格)
+
| 缩放小地图神符图标
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/Convars.GetBool | GetBool]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetRuneSpawnTime | SetRuneSpawnTime]]
  
| <code>table GetBool(string variableName) </code>
+
| <code>void SetRuneSpawnTime(float time) </code>
  
| GetBool(name) : 将指定的控制台变量(convar)作为boolean返回.
+
| 设置神符刷新时间
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/Convars.GetCommandClient | GetCommandClient]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetSafeToLeave | SetSafeToLeave]]
  
| <code>handle GetCommandClient() </code>
+
| <code>void SetSafeToLeave(bool safeToLeave) </code>
  
| GetCommandClient() : 返回输入该控制台指令的玩家
+
| 标记游戏可安全离开
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/Convars.GetDOTACommandClient | GetDOTACommandClient]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetSameHeroSelectionEnabled | SetSameHeroSelectionEnabled]]
  
| <code>handle GetDOTACommandClient() </code>
+
| <code>void SetSameHeroSelectionEnabled(bool enabled) </code>
  
| GetDOTACommandClient() : 返回输入该控制台智力的DOTA玩家
+
| 允许选择重复英雄
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/Convars.GetFloat | GetFloat]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetTimeOfDay | SetTimeOfDay]]
  
| <code>table GetFloat(string name) </code>
+
| <code>void SetTimeOfDay(float time) </code>
  
| GetFloat(name) : 将指定的控制台变量(convar)作为float返回. 不存在时返回nil
+
| 设置一天中的时间(游戏时间)
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/Convars.GetInt | GetInt]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetTreeRegrowTime | SetTreeRegrowTime]]
  
| <code>table GetInt(string a) </code>
+
| <code>void SetTreeRegrowTime(float time) </code>
  
| GetInt(name) : 将指定的控制台变量(convar)作为int返回. 不存在时返回nil
+
| 设置树重新生长的时间(秒)
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/Convars.GetStr | GetStr]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetUseBaseGoldBountyOnHeroes | SetUseBaseGoldBountyOnHeroes]]
  
| <code>table GetStr(string variableName) </code>
+
| <code>void SetUseBaseGoldBountyOnHeroes(bool a) </code>
  
| GetStr(name) : 将指定的控制台变量(convar)作为string返回. 不存在时返回nil
+
| 英雄将使用基础NPC规则来决定赏金,而不是DOTA指定规则
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/Convars.RegisterCommand | RegisterCommand]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetUseCustomHeroXPValues | SetUseCustomHeroXPValues]]
  
| <code>void RegisterCommand(string variableName, handle function, string helpText, int flags) </code>
+
| <code>void SetUseCustomHeroXPValues(bool a) </code>
  
| RegisterCommand(name, fn, helpString, flags) : 注册一个控制台指令.
+
| 允许英雄提供指定数目的经验值(必须先设置)
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/Convars.RegisterConvar | RegisterConvar]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.SetUseUniversalShopMode | SetUseUniversalShopMode]]
  
| <code>void RegisterConvar(string name, string defaultValue, string helpText, int flags) </code>
+
| <code>void SetUseUniversalShopMode(bool enabled) </code>
  
| RegisterConvar(name, defaultValue, helpString, flags): 注册一个新的控制台变量.
+
| 为真时,所有物品当处于任意商店范围内时都能购买到,包括秘密商店物品
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/Convars.SetBool | SetBool]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CDOTAGamerules.State_Get | State_Get]]
 +
 
 +
| <code><> State_Get() </code>
 +
 
 +
| 获取当前游戏规则状态
 +
|}
  
| <code>void SetBool(string variableName, bool value) </code>
 
  
| SetBool(name,val) : 将指定控制台变量(convar)设置为指定bool.
 
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/Convars.SetFloat | SetFloat]]
 
  
| <code>void SetFloat(string variableName, float value) </code>
 
  
| SetFloat(name,val) : 将指定控制台变量(convar)设置为指定float.
+
=== CToneMapControllerComponent ===
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/Convars.SetInt | SetInt]]
+
''No Description Set''
  
| <code>void SetInt(string a, int b) </code>
+
{| class="standard-table" style="width: 100%;"
  
| SetInt(name,val) : 将指定控制台变量(convar)设置为指定int.
+
! 函数名
|-
 
  
| [[Dota 2 Workshop Tools/Scripting/API/Convars.SetStr | SetStr]]
+
! 函数原型
  
| <code>void SetStr(string a, string b) </code>
+
! 解释
  
| SetStr(name,val) : 将指定控制台变量(convar)设置为指定string.
 
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__add | __add]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CToneMapControllerComponent.GetBloomScale | GetBloomScale]]
  
| <code>Vector __add(Vector a, Vector b) </code>
+
| <code>float GetBloomScale() </code>
  
| 重载+.矢量加运算
+
| 获取该光泽贴图控制器(tonemap controller)的泛光缩放(bloomscale)
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__div | __div]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CToneMapControllerComponent.GetMaxExposure | GetMaxExposure]]
  
| <code>Vector __div(Vector a, Vector b) </code>
+
| <code>float GetMaxExposure() </code>
  
| 重载/.矢量除运算
+
| 获取该光泽贴图控制器(tonemap controller)的最大曝光(max exposure)
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__eq | __eq]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CToneMapControllerComponent.GetMinExposure | GetMinExposure]]
  
| <code>bool __eq(Vector a, Vector b) </code>
+
| <code>float GetMinExposure() </code>
  
| 重载==.矢量比较运算
+
| 获取该光泽贴图控制器(tonemap controller)的最小曝光(min exposure)
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__len | __len]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CToneMapControllerComponent.SetBloomScale | SetBloomScale]]
  
| <code>float __len() </code>
+
| <code>void SetBloomScale(float a) </code>
  
| 重载#返回矢量长度
+
| 设置该光泽贴图控制器(tonemap controller)的泛光缩放(bloomscale)
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__mul | __mul]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CToneMapControllerComponent.SetMaxExposure | SetMaxExposure]]
  
| <code>Vector __mul(Vector a, Vector b) </code>
+
| <code>void SetMaxExposure(float a) </code>
  
| 重载*返回矢量乘运算
+
| 设置该光泽贴图控制器(tonemap controller)的最大曝光(max exposure)
 
|-
 
|-
  
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__sub | __sub]]
+
| [[Dota 2 Workshop Tools/Scripting/API/CToneMapControllerComponent.SetMinExposure | SetMinExposure]]
 
+
 
| <code>Vector __sub(Vector a, Vector b) </code>
+
| <code>void SetMinExposure(float a) </code>
 
+
 
| 重载-.矢量减运算
+
| 设置该光泽贴图控制器(tonemap controller)的最小曝光(min exposure)
|-
+
|}
 
+
 
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__tostring | __tostring]]
+
 
 
+
 
| <code>string __tostring() </code>
+
 
 
+
 
| 重载..转换矢量为字符串
+
=== CDebugOverlayScriptHelper ===
|-
+
 
 
+
''No Description Set''
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__unm | __unm]]
+
 
 
+
{| class="standard-table" style="width: 100%;"
| <code>Vector __unm() </code>
+
 
 
+
! 函数名
| 重载- operator
+
 
|-
+
! 函数原型
 
+
 
| [[Dota 2 Workshop Tools/Scripting/API/Vector.Cross | Cross]]
+
! 解释
 
+
 
| <code>Vector Cross(Vector a, Vector b) </code>
+
|-
 
+
 
| 矢量叉积
+
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.Axis | Axis]]
|-
+
 
 
+
| <code>void Axis(Vector a, Quaternion b, float c, bool d, float e) </code>
| [[Dota 2 Workshop Tools/Scripting/API/Vector.Dot | Dot]]
+
 
 
+
| 绘制一个轴线。在世界空间中指定出发点和方向
| <code>float Dot(Vector a, Vector b) </code>
+
|-
 
+
 
| 矢量点积
+
| [[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>
| [[Dota 2 Workshop Tools/Scripting/API/Vector.Length | Length]]
+
 
 
+
| 绘制一个世界空间轴向盒。在世界空间中指定边界
| <code>float Length() </code>
+
|-
 
+
 
| 矢量长度(模)
+
| [[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>
| [[Dota 2 Workshop Tools/Scripting/API/Vector.Length2D | Length2D]]
+
 
 
+
| 在出发点绘制一个定向盒。在世界空间中指定边界
| <code>float Length2D() </code>
+
|-
 
+
 
| 矢量XY平面上长度(模)
+
| [[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>
| [[Dota 2 Workshop Tools/Scripting/API/Vector.Normalized | Normalized]]
+
 
 
+
| 绘制一个胶囊体。在世界空间中指定基部
| <code>Vector Normalized() </code>
+
|-
 
+
 
| 返回单位矢量
+
| [[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>
 +
 
 +
| 绘制一个圆。在世界空间中指定中心
 +
|-
 +
 
 +
| [[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>
 +
 
 +
| 绘制一个指向屏幕的圆。在世界空间中指定中心
 +
|-
 +
 
 +
| [[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>
 +
 
 +
| 绘制一个线框锥形。在世界空间中指定结束点和方向
 +
|-
 +
 
 +
| [[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>
 +
 
 +
| 绘制一个对齐屏幕的十字。在世界空间中指定出发点
 +
|-
 +
 
 +
| [[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>
 +
 
 +
| 绘制一个对齐世界的十字。在世界空间中指定出发点
 +
|-
 +
 
 +
| [[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>
 +
 
 +
| 绘制一个指向的十字。在世界空间中指定出发点
 +
|-
 +
 
 +
| [[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>
 +
 
 +
| 绘制一个短划线。在世界空间中指定结束点
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.EntityAttachments | EntityAttachments]]
 +
 
 +
| <code>void EntityAttachments(ehandle a, float b) </code>
 +
 
 +
| 绘制实体附件
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.EntityAxis | EntityAxis]]
 +
 
 +
| <code>void EntityAxis(ehandle a, float b, bool c, float d) </code>
 +
 
 +
| 绘制实体源坐标轴
 +
|-
 +
 
 +
| [[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>
 +
 
 +
| 绘制实体边界
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.EntitySkeleton | EntitySkeleton]]
 +
 
 +
| <code>void EntitySkeleton(ehandle a, float b) </code>
 +
 
 +
| 绘制实体骨架
 +
|-
 +
 
 +
| [[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>
 +
 
 +
| 在实体上绘制文本
 +
|-
 +
 
 +
| [[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矩形填充的屏幕空间。按照像素对齐
 +
|-
 +
 
 +
| [[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>
 +
 
 +
| 绘制一个水平箭头。在世界空间中指定结束点
 +
|-
 +
 
 +
| [[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>
 +
 
 +
| 绘制一个两点间连线
 +
|-
 +
 
 +
| [[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>
 +
 
 +
| 绘制一个屏幕空间中亮点间连线
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.PopDebugOverlayScope | PopDebugOverlayScope]]
 +
 
 +
| <code>void PopDebugOverlayScope() </code>
 +
 
 +
| 弹出蒙版分组用的标记,被标记的蒙版可被成批删除
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.PushAndClearDebugOverlayScope | PushAndClearDebugOverlayScope]]
 +
 
 +
| <code>void PushAndClearDebugOverlayScope(utlstringtoken a) </code>
 +
 
 +
| 推入一个蒙版分组用的标记。删除所有使用该蒙版ID的蒙版
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.PushDebugOverlayScope | PushDebugOverlayScope]]
 +
 
 +
| <code>void PushDebugOverlayScope(utlstringtoken a) </code>
 +
 
 +
| 推入一个蒙版分组用的标记。被标记的蒙版可被成批删除
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.RemoveAllInScope | RemoveAllInScope]]
 +
 
 +
| <code>void RemoveAllInScope(utlstringtoken a) </code>
 +
 
 +
| 移除指定标记的全部蒙版,无视其生命周期
 +
|-
 +
 
 +
| [[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>
 +
 
 +
| 绘制一个固体锥。在世界空间中指定出发点和方向
 +
|-
 +
 
 +
| [[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>
 +
 
 +
| 绘制一个线框球体。在世界空间中指定中心
 +
|-
 +
 
 +
| [[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>
 +
 
 +
| 绘制一个扫描盒。在世界空间中指定结束点并在本地空间中指定边界
 +
|-
 +
 
 +
| [[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文本。在世界空间中指定出发点
 +
|-
 +
 
 +
| [[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>
 +
 
 +
| 绘制一个屏幕空间纹理。按照像素对齐
 +
|-
 +
 
 +
| [[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>
 +
 
 +
| 绘制一个填充三角形。在世界空间中指定顶部
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CDebugOverlayScriptHelper.UnitTestCycleOverlayRenderType | UnitTestCycleOverlayRenderType]]
 +
 
 +
| <code>void UnitTestCycleOverlayRenderType() </code>
 +
 
 +
| 转换蒙版混合类型, 用于单位测试
 +
|-
 +
 
 +
| [[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文本。在世界空间中指定出发点和方向
 +
|-
 +
 
 +
| [[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>
 +
 
 +
| 绘制一个垂直箭头。在世界空间中指定结束点
 +
|-
 +
 
 +
| [[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%;"
 +
 
 +
! 函数名
 +
 
 +
! 函数原型
 +
 
 +
! 解释
 +
 
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CBaseFlex.GetCurrentScene | GetCurrentScene]]
 +
 
 +
| <code>handle GetCurrentScene() </code>
 +
 
 +
| 返回最早激活的场景实体的实例(如果存在的话)
 +
|-
 +
 
 +
| [[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%;"
 +
 
 +
! 函数名
 +
 
 +
! 函数原型
 +
 
 +
! 解释
 +
 
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.AddBroadcastTeamTarget | AddBroadcastTeamTarget]]
 +
 
 +
| <code>void AddBroadcastTeamTarget(int a) </code>
 +
 
 +
| 在记分板列表上增加一个组(使用索引号)
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.Cancel | Cancel]]
 +
 
 +
| <code>void Cancel() </code>
 +
 
 +
| 取消场景重播
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.EstimateLength | EstimateLength]]
 +
 
 +
| <code>float EstimateLength() </code>
 +
 
 +
| 返回场景长度(秒)
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.FindCamera | FindCamera]]
 +
 
 +
| <code>handle FindCamera() </code>
 +
 
 +
| 获取镜头
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.FindNamedEntity | FindNamedEntity]]
 +
 
 +
| <code>handle FindNamedEntity(string a) </code>
 +
 
 +
| 通过一个实体参照,比如!target,获取场景物体中的实际实体
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.IsPaused | IsPaused]]
 +
 
 +
| <code>bool IsPaused() </code>
 +
 
 +
| 场景是否被暂停
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.IsPlayingBack | IsPlayingBack]]
 +
 
 +
| <code>bool IsPlayingBack() </code>
 +
 
 +
| 场景是否正播放
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.LoadSceneFromString | LoadSceneFromString]]
 +
 
 +
| <code>bool LoadSceneFromString(string a, string b) </code>
 +
 
 +
| 输入虚拟场景名和VCD字符串,载入场景
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/CSceneEntity.RemoveBroadcastTeamTarget | RemoveBroadcastTeamTarget]]
 +
 
 +
| <code>void RemoveBroadcastTeamTarget(int a) </code>
 +
 
 +
| 从记分板列表上移除一个组(使用索引号)
 +
|-
 +
 
 +
| [[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%;"
 +
 
 +
! 函数名
 +
 
 +
! 函数原型
 +
 
 +
! 解释
 +
 
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/GridNav.GridPosToWorldCenterX | GridPosToWorldCenterX]]
 +
 
 +
| <code>float GridPosToWorldCenterX(int a) </code>
 +
 
 +
| 获取指定X索引号的世界中心X位置(网格到世界)
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/GridNav.GridPosToWorldCenterY | GridPosToWorldCenterY]]
 +
 
 +
| <code>float GridPosToWorldCenterY(int a) </code>
 +
 
 +
| 获取指定Y索引号的世界中心Y位置(网格到世界)
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/GridNav.IsBlocked | IsBlocked]]
 +
 
 +
| <code>bool IsBlocked(Vector a) </code>
 +
 
 +
| 检查给定位置是否被阻挡
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/GridNav.IsNearbyTree | IsNearbyTree]]
 +
 
 +
| <code>bool IsNearbyTree(Vector position, float radius, bool c) </code>
 +
 
 +
| 暂无描述
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/GridNav.IsTraversable | IsTraversable]]
 +
 
 +
| <code>bool IsTraversable(Vector a) </code>
 +
 
 +
| 检查给予维持是否可通过
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/GridNav.RegrowAllTrees | RegrowAllTrees]]
 +
 
 +
| <code>void RegrowAllTrees() </code>
 +
 
 +
| 暂无描述
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/GridNav.WorldToGridPosX | WorldToGridPosX]]
 +
 
 +
| <code>int WorldToGridPosX(float a) </code>
 +
 
 +
| 获取指定世界X位置的X索引(世界到网格)
 +
|-
 +
 
 +
| [[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%;"
 +
 
 +
! 函数名
 +
 
 +
! 函数原型
 +
 
 +
! 解释
 +
 
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Convars.GetBool | GetBool]]
 +
 
 +
| <code>table GetBool(string variableName) </code>
 +
 
 +
| GetBool(name) : 将指定的控制台变量(convar)作为boolean返回.
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Convars.GetCommandClient | GetCommandClient]]
 +
 
 +
| <code>handle GetCommandClient() </code>
 +
 
 +
| GetCommandClient() : 返回输入该控制台指令的玩家
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Convars.GetDOTACommandClient | GetDOTACommandClient]]
 +
 
 +
| <code>handle GetDOTACommandClient() </code>
 +
 
 +
| GetDOTACommandClient() : 返回输入该控制台智力的DOTA玩家
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Convars.GetFloat | GetFloat]]
 +
 
 +
| <code>table GetFloat(string name) </code>
 +
 
 +
| GetFloat(name) : 将指定的控制台变量(convar)作为float返回. 不存在时返回nil
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Convars.GetInt | GetInt]]
 +
 
 +
| <code>table GetInt(string a) </code>
 +
 
 +
| GetInt(name) : 将指定的控制台变量(convar)作为int返回. 不存在时返回nil
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Convars.GetStr | GetStr]]
 +
 
 +
| <code>table GetStr(string variableName) </code>
 +
 
 +
| GetStr(name) : 将指定的控制台变量(convar)作为string返回. 不存在时返回nil
 +
|-
 +
 
 +
| [[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) : 注册一个控制台指令.
 +
|-
 +
 
 +
| [[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): 注册一个新的控制台变量.
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Convars.SetBool | SetBool]]
 +
 
 +
| <code>void SetBool(string variableName, bool value) </code>
 +
 
 +
| SetBool(name,val) : 将指定控制台变量(convar)设置为指定bool.
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Convars.SetFloat | SetFloat]]
 +
 
 +
| <code>void SetFloat(string variableName, float value) </code>
 +
 
 +
| SetFloat(name,val) : 将指定控制台变量(convar)设置为指定float.
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Convars.SetInt | SetInt]]
 +
 
 +
| <code>void SetInt(string a, int b) </code>
 +
 
 +
| SetInt(name,val) : 将指定控制台变量(convar)设置为指定int.
 +
|-
 +
 
 +
| [[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%;"
 +
 
 +
! 函数名
 +
 
 +
! 函数原型
 +
 
 +
! 解释
 +
 
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__add | __add]]
 +
 
 +
| <code>Vector __add(Vector a, Vector b) </code>
 +
 
 +
| 重载+.矢量加运算
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__div | __div]]
 +
 
 +
| <code>Vector __div(Vector a, Vector b) </code>
 +
 
 +
| 重载/.矢量除运算
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__eq | __eq]]
 +
 
 +
| <code>bool __eq(Vector a, Vector b) </code>
 +
 
 +
| 重载==.矢量比较运算
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__len | __len]]
 +
 
 +
| <code>float __len() </code>
 +
 
 +
| 重载#返回矢量长度
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__mul | __mul]]
 +
 
 +
| <code>Vector __mul(Vector a, Vector b) </code>
 +
 
 +
| 重载*返回矢量乘运算
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__sub | __sub]]
 +
 
 +
| <code>Vector __sub(Vector a, Vector b) </code>
 +
 
 +
| 重载-.矢量减运算
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__tostring | __tostring]]
 +
 
 +
| <code>string __tostring() </code>
 +
 
 +
| 重载..转换矢量为字符串
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Vector.__unm | __unm]]
 +
 
 +
| <code>Vector __unm() </code>
 +
 
 +
| 重载- operator
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Vector.Cross | Cross]]
 +
 
 +
| <code>Vector Cross(Vector a, Vector b) </code>
 +
 
 +
| 矢量叉积
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Vector.Dot | Dot]]
 +
 
 +
| <code>float Dot(Vector a, Vector b) </code>
 +
 
 +
| 矢量点积
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Vector.Length | Length]]
 +
 
 +
| <code>float Length() </code>
 +
 
 +
| 矢量长度(模)
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Vector.Length2D | Length2D]]
 +
 
 +
| <code>float Length2D() </code>
 +
 
 +
| 矢量XY平面上长度(模)
 +
|-
 +
 
 +
| [[Dota 2 Workshop Tools/Scripting/API/Vector.Normalized | Normalized]]
 +
 
 +
| <code>Vector Normalized() </code>
 +
 
 +
| 返回单位矢量
 +
|}
 +
 
 +
 
 +
 
 +
 
 +
 
 +
=== CDOTA_MapTree ===
 +
 
 +
:::::extends [[#CBaseEntity| CBaseEntity]]
 +
 
 +
''A tree on the map''
 +
 
 +
{| class="standard-table" style="width: 100%;"
 +
 
 +
! 函数名
 +
 
 +
! 函数原型
 +
 
 +
! 解释
 +
 
 
|-
 
|-
  
Line 8,192: Line 9,027:
  
 
|}
 
|}
 
  
  
 
[[Category:Dota 2 创意工坊工具集]]
 
[[Category:Dota 2 创意工坊工具集]]
 
[[Category:AMHC 汉化]]
 
[[Category:AMHC 汉化]]

Revision as of 07:04, 29 October 2014

English
Note.png Note:  This page is automatically generated. Any changes may be overwritten


Accessing the DOTA 2 Scripting API from Lua

While Lua is dynamically typed, the DOTA 2 engine is written primarily in C++, which is statically typed. Thus, you'll need to be conscious of your data types when calling the API. (If you try to pass the wrong type to an API function, you'll get an error message in Vconsole telling you what you passed and what it was expecting.)

Global

Global functions. These can be called without any class

函数名 函数原型 解释
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 轴线的旋转角
CancelEntityIOEvents void CancelEntityIOEvents(ehandle a) 为特定的实体创建所有输入/输出事件
CreateEffect bool CreateEffect(handle a) 传递table - 输入:实体,效果
CreateHeroForPlayer handle CreateHeroForPlayer(string unitName, handle player) 用DOTA英雄的dota_npc_units.txt中的名字创建它并把它设为给定玩家的控制英雄
CreateItem handle CreateItem(string item_name, handle owner, handle owner) 用类名称item_name创建一个owner可以使用的物品
CreateItemOnPositionSync handle CreateItemOnPositionSync(Vector a, handle b) 在给定位置创建一个可见的物品
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)
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脚本运行周期内唯一的字符串。当给表增加数据但不确定已用关键字时有用
EmitGlobalSound void EmitGlobalSound(string a) 为所有玩家播放给定名称的音效
EmitSoundOn void EmitSoundOn(string a, handle b) 在一个实体上播放给定名称的音效
EmitSoundOnClient void EmitSoundOnClient(string a, handle b) 为指定玩家播放给定名称的音效
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 )
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() 获取上一帧在服务器上花费的时间
GetFrameCount int GetFrameCount() 返回引擎当然的帧数
GetFrostyBoostAmount float GetFrostyBoostAmount(int a, int b) 暂无
GetFrostyPointsForRound int GetFrostyPointsForRound(int a, int b, int c) 暂无
GetGoldFrostyBoostAmount float GetGoldFrostyBoostAmount(int a, int b) 暂无
GetGoldFrostyPointsForRound int GetGoldFrostyPointsForRound(int a, int b, int c) 暂无
GetGroundPosition Vector GetGroundPosition(Vector a, handle b) 返回移动到地面的供给位置。第二个参数是一个NPC,用于测量碰撞体积
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() 获取真实世界的时间
GetTeamName string GetTeamName(int teamNumber) Returns the team name
GetWorldMaxX float GetWorldMaxX() 获取地图X坐标最大值
GetWorldMaxY float GetWorldMaxY() 获取地图Y坐标最大值
GetWorldMinX float GetWorldMinX() 获取地图X坐标最小值
GetWorldMinY float GetWorldMinY() 获取地图Y坐标最小值
InitLogFile void InitLogFile(string a, string b) 如果给定文件不存在,用给定内容创建它;如果存在则不做任何动作
IsDedicatedServer bool IsDedicatedServer() 如果服务器开放返回true
IsMarkedForDeletion bool IsMarkedForDeletion(handle a) 如果实体有效并被标记为删除返回true
IsValidEntity bool IsValidEntity(handle a) 检查给定hScript是否为有效实体
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是否是有效实体(?)
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代理
RollPercentage bool RollPercentage(int a) 随机生成1-100内的数,小于等于给定数则返回true
RotateOrientation QAngle RotateOrientation(QAngle a, QAngle b) 旋转一个QAngle,用另一个QAngle
RotatePosition Vector RotatePosition(Vector a, QAngle b, Vector c) 围绕点旋转一个Vector
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() 暂无
SendFrostyPointsMessageToGC void SendFrostyPointsMessageToGC(handle a) 暂无
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(渲染)开/关
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 void 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) 开始音效事件
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) Pass table - 输入: startpos, endpos, mask, ignore -- 输出: pos, fraction, hit, enthit, startsolid
UnloadSpawnGroup void UnloadSpawnGroup(string a) 通过名称去除生成组
UnloadSpawnGroupByHandle void UnloadSpawnGroupByHandle(int a) 通过handle去除生成组
UpdateEventPoints void UpdateEventPoints(handle a) 暂无
UTIL_MessageText void UTIL_MessageText(int playerId, string message, int r, int g, int b, int a) Displays a message for a specific player
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) Sends a message to everyone in the message box
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) Resets the message text for the player
UTIL_ResetMessageTextAll void UTIL_ResetMessageTextAll() Resets the message text for all players
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() 暂无
GatherCriteria void GatherCriteria(handle a) 返回一个表包含用在这个实体的判定的标准.这个表等同于传入脚本方法的调用.
GetAbsOrigin Vector GetAbsOrigin() 暂无
GetAngles QAngle GetAngles() 暂无
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() 暂无
GetLocalAngularVelocity QAngle GetLocalAngularVelocity() 可能为当前角速度
GetLocalVelocity Vector GetLocalVelocity() 获得实体相对速度
GetMaxHealth int GetMaxHealth() 暂无
GetModelName string GetModelName() 获得模型的名字
GetMoveParent handle GetMoveParent() 如果在有继承对象,恢复实体所继承的对象
GetOrigin Vector GetOrigin() 暂无
GetOwner handle GetOwner() 获得实体的所有者
GetOwnerEntity handle GetOwnerEntity() 获得拥有者的实体,如果有的话
GetRightVector Vector GetRightVector() 获得实体的右方矢量
GetRootMoveParent handle GetRootMoveParent() 如果在继承关系里,在继承关系中寻找所继承的根源对象
GetSoundDuration float GetSoundDuration(string soundName, string actormodelname) 返回声音的播放时间.传入声音名字和可选的应用模型名字.
GetTeam int GetTeam() 暂无
GetUpVector Vector GetUpVector() 获得实体的上方矢量
GetVelocity Vector GetVelocity() 暂无
IsAlive bool IsAlive() 暂无
IsPlayer bool IsPlayer() 是否为玩家的实体
Kill void Kill() 暂无
NextMovePeer handle NextMovePeer() 暂无
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) 在这个实体上设置一个计时器/DescriptionCN><HowToCall><Parameter>a:名字,b:实体? c:时间</Parameter><Return></Return><PS></PS></HowToCall>
SetForwardVector void SetForwardVector(Vector forwardVec) 设置实体的方向为前进矢量
SetFriction void SetFriction(float a) 设置玩家阻力,无视物体
SetGravity void SetGravity(float a) 设置玩家引力,无视物体
SetHealth void SetHealth(int hp) 暂无
SetMaxHealth void SetMaxHealth(int maxHP) 暂无
SetModel void SetModel(string modelName) 暂无
SetOrigin void SetOrigin(Vector origin) 暂无
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) 暂无
SetTeam void SetTeam(int team) 暂无
SetVelocity void SetVelocity(Vector a) 暂无
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() 暂无
DisconnectOutput void DisconnectOutput(string a, string b) 从这个实体的I/O事件移除已连接的脚本方法
DisconnectRedirectedOutput void DisconnectRedirectedOutput(string a, string b, handle c) 从传入实体的I/O事件移除已连接的脚本方法
entindex int entindex() 暂无
FireOutput void FireOutput(string outputName, handle activator, handle caller, table args, float delay) 触发实体的输出
GetClassname string GetClassname() 暂无
GetDebugName string GetDebugName() 如果没有定义的话获得实体名字的帮助
GetEntityHandle ehandle GetEntityHandle() 获得这个实体的EHANDLE
GetEntityIndex int GetEntityIndex() 暂无
GetIntAttr int GetIntAttr(string a) 获得整型属性
GetName string GetName() 暂无
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() 暂无
ContinueCasting bool ContinueCasting() 暂无
CreateVisibilityNode void CreateVisibilityNode(Vector a, float b, float c) 暂无
DecrementModifierRefCount void DecrementModifierRefCount() 暂无
EndChannel void EndChannel(bool a) 参数: bool bInterrupted
EndCooldown void EndCooldown() 刷新这个技能
GetAbilityDamage int GetAbilityDamage() 暂无
GetAbilityDamageType int GetAbilityDamageType() 暂无
GetAbilityIndex int GetAbilityIndex() 暂无
GetAbilityName string GetAbilityName() 暂无
GetAbilityTargetFlags int GetAbilityTargetFlags() 暂无
GetAbilityTargetTeam int GetAbilityTargetTeam() 暂无
GetAbilityTargetType int GetAbilityTargetType() 暂无
GetAbilityType int GetAbilityType() 暂无
GetAnimationIgnoresModelScale bool GetAnimationIgnoresModelScale() 暂无
GetAssociatedPrimaryAbilities string GetAssociatedPrimaryAbilities() 暂无
GetAssociatedSecondaryAbilities string GetAssociatedSecondaryAbilities() 暂无
GetAutoCastState bool GetAutoCastState() 暂无
GetBackswingTime float GetBackswingTime() 暂无
GetBehavior int GetBehavior() 暂无
GetCaster handle GetCaster() 暂无
GetCastPoint float GetCastPoint() 暂无
GetCastRange int GetCastRange() 暂无
GetChannelledManaCostPerSecond int GetChannelledManaCostPerSecond(int a) 暂无
GetChannelStartTime float GetChannelStartTime() 暂无
GetChannelTime float GetChannelTime() 暂无
GetCloneSource handle GetCloneSource() 暂无
GetConceptRecipientType int GetConceptRecipientType() 暂无
GetCooldown float GetCooldown(int a) 获得技能在给出的等级设定上的冷却时间,而不是目前的剩余的冷却时间
GetCooldownTime float GetCooldownTime() 暂无
GetCooldownTimeRemaining float GetCooldownTimeRemaining() 暂无
GetCursorPosition Vector GetCursorPosition() 暂无
GetCursorTarget handle GetCursorTarget() 暂无
GetCursorTargetingNothing bool GetCursorTargetingNothing() 暂无
GetDuration float GetDuration() 暂无
GetGoldCost int GetGoldCost(int a) 暂无
GetGoldCostForUpgrade int GetGoldCostForUpgrade(int a) 暂无
GetHeroLevelRequiredToUpgrade int GetHeroLevelRequiredToUpgrade() 暂无
GetIntrinsicModifierName string GetIntrinsicModifierName() 暂无
GetLevel int GetLevel() 获得技能目前的等级
GetLevelSpecialValueFor table GetLevelSpecialValueFor(string a, int b) 暂无
GetManaCost int GetManaCost(int a) 暂无
GetMaxLevel int GetMaxLevel() 暂无
GetModifierValue float GetModifierValue() 暂无
GetModifierValueBonus float GetModifierValueBonus() 暂无
GetPlaybackRateOverride float GetPlaybackRateOverride() 暂无
GetSharedCooldownName string GetSharedCooldownName() 暂无
GetSpecialValueFor table GetSpecialValueFor(string a) 暂无
GetStolenActivityModifier string GetStolenActivityModifier() 暂无
GetToggleState bool GetToggleState() 暂无
HeroXPChange bool HeroXPChange(float a) 暂无
IncrementModifierRefCount void IncrementModifierRefCount() 暂无
IsActivated bool IsActivated() 暂无
IsAttributeBonus bool IsAttributeBonus() 暂无
IsChanneling bool IsChanneling() 返回目前技能是否在施法状态
IsCooldownReady bool IsCooldownReady() 暂无
IsCosmetic bool IsCosmetic() 暂无
IsFullyCastable bool IsFullyCastable() 返回技能能否被释放
IsHidden bool IsHidden() 暂无
IsHiddenWhenStolen bool IsHiddenWhenStolen() 暂无
IsInAbilityPhase bool IsInAbilityPhase() 返回技能目前是否在被释放
IsItem bool IsItem() 暂无
IsOwnersGoldEnough bool IsOwnersGoldEnough(int a) 暂无
IsOwnersGoldEnoughForUpgrade bool IsOwnersGoldEnoughForUpgrade() 暂无
IsOwnersManaEnough bool IsOwnersManaEnough() 暂无
IsPassive bool IsPassive() 暂无
IsSharedWithTeammates bool IsSharedWithTeammates() 暂无
IsStealable bool IsStealable() 暂无
IsStolen bool IsStolen() 暂无
IsToggle bool IsToggle() 暂无
IsTrained bool IsTrained() 暂无
MarkAbilityButtonDirty void MarkAbilityButtonDirty() 标记这个技能图标表示需要刷新
NumModifiersUsingAbility int NumModifiersUsingAbility() 暂无
OnAbilityPhaseInterrupted void OnAbilityPhaseInterrupted() 暂无
OnAbilityPhaseStart bool OnAbilityPhaseStart() 暂无
OnAbilityPinged void OnAbilityPinged() 暂无
OnChannelFinish void OnChannelFinish(bool a) 暂无
OnChannelThink void OnChannelThink(float a) 暂无
OnHeroCalculateStatBonus void OnHeroCalculateStatBonus() 暂无
OnHeroLevelUp void OnHeroLevelUp() 暂无
OnInventoryContentsChanged void OnInventoryContentsChanged() 暂无
OnOwnerDied void OnOwnerDied() 暂无
OnOwnerSpawned void OnOwnerSpawned() 暂无
OnSpellStart void OnSpellStart() 暂无
OnToggle void OnToggle() 暂无
OnUpgrade void OnUpgrade() 暂无
PayGoldCost void PayGoldCost() 暂无
PayGoldCostForUpgrade void PayGoldCostForUpgrade() 暂无
PayManaCost void PayManaCost() 暂无
PlaysDefaultAnimWhenStolen bool PlaysDefaultAnimWhenStolen() 暂无
ProcsMagicStick bool ProcsMagicStick() 暂无
RefCountsModifiers bool RefCountsModifiers() 暂无
RefundManaCost void RefundManaCost() 暂无
ResetToggleOnRespawn bool ResetToggleOnRespawn() 暂无
SetAbilityIndex void SetAbilityIndex(int a) 暂无
SetActivated void SetActivated(bool a) 暂无
SetChanneling void SetChanneling(bool a) 暂无
SetHidden void SetHidden(bool a) 暂无
SetInAbilityPhase void SetInAbilityPhase(bool a) 暂无
SetLevel void SetLevel(int a) 设置这个技能的等级
SetOverrideCastPoint void SetOverrideCastPoint(float a) 暂无
SetRefCountsModifiers void SetRefCountsModifiers(bool a) 暂无
SetStolen void SetStolen(bool a) 暂无
ShouldUseResources bool ShouldUseResources() 暂无
SpeakAbilityConcept void SpeakAbilityConcept(int a) 暂无
SpeakTrigger bool SpeakTrigger() 暂无
StartCooldown void StartCooldown(float a) 参数:fl冷却时间?
ToggleAbility void ToggleAbility() 暂无
ToggleAutoCast void ToggleAutoCast() 暂无
UpgradeAbility void UpgradeAbility() 暂无
UseResources void UseResources(bool a, bool b, bool c) 暂无


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() 暂无
GetCurrentCharges int GetCurrentCharges() 获得物品的目前充能
GetInitialCharges int GetInitialCharges() 获得物品的初始充能
GetPurchaser handle GetPurchaser() 获得物品的购买者
GetPurchaseTime float GetPurchaseTime() 获得物品的购买时间
GetShareability int GetShareability() 暂无
IsPermanent bool IsPermanent() 判断物品是否非消耗品
LaunchLoot void LaunchLoot(bool useOnContact, float height, float speed, Vector destination) 暂无
SetCurrentCharges void SetCurrentCharges(int a) 设置物品的充能数
SetPurchaser void SetPurchaser(handle a) 设置物品的购买者
SetPurchaseTime void SetPurchaseTime(float a) 设置物品的购买时间
SetStacksWithOtherOwners void SetStacksWithOtherOwners(bool a) 暂无
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) 暂无



CDOTA_Unit_Nian

extends CDOTA_BaseNPC_Creature

No Description Set

函数名 函数原型 解释
GetHorn handle GetHorn() Is the Nian horn?
GetTail handle GetTail() Is the Nian's tail broken?
IsHornAlive bool IsHornAlive() Is the Nian's horn broken?
IsTailAlive bool IsTailAlive() Is the Nian's tail broken?



CBasePlayer

No Description Set

函数名 函数原型 解释
IsNoclipping bool IsNoclipping() Returns true if the player is in noclip mode.



CDOTAPlayer

extends CBaseAnimating

No Description Set

函数名 函数原型 解释
GetAssignedHero handle GetAssignedHero() Get the player's hero.
GetControlledRPGUnit handle GetControlledRPGUnit() Get the RPG unit this player controls.
GetPlayerID int GetPlayerID() Get the player's official PlayerID; notably is -1 when the player isn't yet on a team.
MakeRandomHeroSelection void MakeRandomHeroSelection() Randoms this player's hero.
SetKillCamUnit void SetKillCamUnit(handle a) Set the kill cam unit for this hero.
SetMusicStatus void SetMusicStatus(int nMusicStatus, float flIntensity) Set the music status for this player, note this will only really apply if dota_music_battle_enable is 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 <> GetBroadcasterChannel(int a) No Description Set
GetBroadcasterChannelSlot <> 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 <> GetConnectionState(int a) No Description Set
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) returns the team number that the player should join
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) Returns how much gold the specified player currently has
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) Return how many kills the specified player currently gets
GetKillsDoneToHero int GetKillsDoneToHero(int attackerPlayerID, int victimPlayerID) Returns the number of times the attacker (first argument) has killed the victim (second argument)
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
GetPlayer handle GetPlayer(int playerID) No Description Set
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) Returns how much reliable gold the specified player currently has
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) No Description Set
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
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) Returns how much unreliable gold the specified player currently has
GetXPPerMin float GetXPPerMin(int a) No Description Set
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) (playerID, heroClassName, gold, XP) - replaces the player's hero with a new one of the specified class, gold and XP
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) (playerID, entity) - force the given player's camera to follow the given entity
SetCustomBuybackCooldown void SetCustomBuybackCooldown(int a, float b) Set the buyback cooldown for this player.
SetCustomBuybackCost void SetCustomBuybackCost(int a, int b) Set the buyback cost for this player.
SetCustomTeamAssignment void SetCustomTeamAssignment(int playerIndex, int teamToJoin) Sets the team that the player should join
SetGold void SetGold(int playerID, int amount, bool reliableGold) Sets the reliable/unreliable gold of the specified player
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
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 void AddAbility(string a) 以技能名称为该单位新增技能。
AddItem void AddItem(handle a) 增加物品到该单位的库存 。
AddNewModifier void AddNewModifier(handle caster, handle optionalSourceAbility, string modifierName, handle modifierData) 为该单位增加修改器。
AddNoDraw void AddNoDraw() Adds the no draw flag.
AlertNearbyUnits void AlertNearbyUnits(handle a, handle b) 暂无
AngerNearbyUnits void AngerNearbyUnits() 暂无
AttackNoEarlierThan void AttackNoEarlierThan(float a) 暂无
AttackReady bool AttackReady() 暂无
BoundingRadius2D float BoundingRadius2D() 暂无
CanEntityBeSeenByMyTeam bool CanEntityBeSeenByMyTeam(handle a) Check FoW to see if an entity is visible.
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 ) 。
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) 以名称寻找技能。
ForceKill void ForceKill(bool a) 强制击杀该单位。
GetAbilityByIndex handle GetAbilityByIndex(int a) 以下标值检索该单位的技能。
GetAbilityCount int GetAbilityCount() 获取拥有的技能数量。
GetAcquisitionRange float GetAcquisitionRange() 获取单位的自动收集距离。
GetAdditionalBattleMusicWeight float GetAdditionalBattleMusicWeight() 获取当与该单位战斗时将会计算的战斗音乐权重。
GetAttackAnimationPoint float GetAttackAnimationPoint() 暂无
GetAttackCapability int GetAttackCapability() Gets the Attack Capabilities of the unit
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() 暂无
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) 暂无
GetCollisionPadding float GetCollisionPadding() 返回该单位的碰撞体积。
GetConstantBasedManaRegen float GetConstantBasedManaRegen() 获取基础的魔力恢复值常数。
GetCreationTime float GetCreationTime() 暂无
GetCurrentActiveAbility handle GetCurrentActiveAbility() 获取该单位正在使用中的法术。
GetCurrentVisionRange int GetCurrentVisionRange() 获取当前的视野距离。
GetCursorCastTarget handle GetCursorCastTarget() 获取鼠标指定的施法目标。
GetCursorPosition Vector GetCursorPosition() 获取鼠标位置。
GetCursorTargetingNothing bool GetCursorTargetingNothing() 暂无
GetDayTimeVisionRange int GetDayTimeVisionRange() 获取该单位的日间视野(将修改器并入计算)。
GetDeathXP int GetDeathXP() 获取该单位的击杀经验值奖赏。
GetForceAttackTarget handle GetForceAttackTarget() 暂无
GetGoldBounty int GetGoldBounty() 获取该单位的击杀金钱奖赏。
GetHasteFactor float GetHasteFactor() 暂无
GetHealth int GetHealth() 获取该单位的血量。
GetHealthDeficit int GetHealthDeficit() 返回损失的血量 (最大血量 - 当前血量)。
GetHealthPercent int GetHealthPercent() 获取该单位当前的血量百分比。
GetHealthRegen float GetHealthRegen() 获取该单位当前的血量恢复值。
GetHullRadius float GetHullRadius() 获取该单位的碰撞体积半径。
GetIdealSpeed float GetIdealSpeed() 获取该单位的跑速(将修改器并入计算)。
GetIncreasedAttackSpeed float GetIncreasedAttackSpeed() 暂无
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() 获取该单位的最大魔力。
GetModelRadius float GetModelRadius() 获取模型大小半径。
GetModifierCount int GetModifierCount() 返回该单位所拥有的修改器数量。
GetModifierNameByIndex string GetModifierNameByIndex(int a) 以下标值索引修改器,并返回修改器名称字符串。
GetModifierStackCount void GetModifierStackCount(string modifierName, handle b) Gets the stack count of a given modifier.
GetMoveSpeedModifier float GetMoveSpeedModifier(float a) 暂无
GetMustReachEachGoalEntity bool GetMustReachEachGoalEntity() 该单位是否被要求走访每个路径点?
GetNightTimeVisionRange int GetNightTimeVisionRange() 返回夜间视野距离(将修改器并入计算)。
GetOpposingTeamNumber int GetOpposingTeamNumber() 暂无
GetPaddedCollisionRadius float GetPaddedCollisionRadius() 获取单位碰撞体积半径。
GetPercentageBasedManaRegen float GetPercentageBasedManaRegen() 获取基础魔力恢复值百分比。
GetPhysicalArmorBaseValue float GetPhysicalArmorBaseValue() 返回基础护甲值。
GetPhysicalArmorValue float GetPhysicalArmorValue() 返回当前的护甲值。
GetPlayerOwner handle GetPlayerOwner() 获取拥有此单位的玩家实体。
GetPlayerOwnerID int GetPlayerOwnerID() 获取拥有此单位的玩家ID。
GetProjectileSpeed int GetProjectileSpeed() 暂无
GetRangeToUnit float GetRangeToUnit(handle a) 暂无
GetSecondsPerAttack float GetSecondsPerAttack() 暂无
GetStatsBasedManaRegen float GetStatsBasedManaRegen() 获取因智慧而增加的魔法恢复值。
GetTeamNumber int GetTeamNumber() 获取该单位所属的队伍ID。
GetTotalPurchasedUpgradeGoldCost int GetTotalPurchasedUpgradeGoldCost() 获取用在升级的金钱。
GetUnitLabel string GetUnitLabel() 暂无
GetUnitName string GetUnitName() 获取单位名称。
GiveMana void GiveMana(float a) 给予此单位指定的魔法值。(Giff me mana!)
HasAbility bool HasAbility(string a) 以技能名称搜寻该单位是否拥有此技能。
HasAttackCapability bool HasAttackCapability() 暂无
HasFlyingVision bool HasFlyingVision() 暂无
HasFlyMovementCapability bool HasFlyMovementCapability() 暂无
HasGroundMovementCapability bool HasGroundMovementCapability() 暂无
HasInventory bool HasInventory() 暂无
HasItemInInventory bool HasItemInInventory(string a) 以物品名称搜寻该单位是否拥有此物品。
HasModifier bool HasModifier(string a) 以修改器名称搜寻该单位是否拥有此修改器。
HasMovementCapability bool HasMovementCapability() 暂无
HasScepter bool HasScepter() 暂无
Heal void Heal(float amount, handle source) 治疗该单位。
Hold void Hold() 命令单位在原地待命。
Interrupt void Interrupt() 暂无
InterruptChannel void InterruptChannel() 暂无
InterruptMotionControllers void InterruptMotionControllers(bool a) 暂无
IsAlive bool IsAlive() 此单位是否还活着?
IsAncient bool IsAncient() 该生物是否为远古野怪?
IsAttackImmune bool IsAttackImmune() 暂无
IsAttacking bool IsAttacking() 暂无
IsAttackingEntity bool IsAttackingEntity(handle a) 暂无
IsBlind bool IsBlind() 暂无
IsBlockDisabled bool IsBlockDisabled() 暂无
IsCommandRestricted bool IsCommandRestricted() 暂无
IsControllableByAnyPlayer bool IsControllableByAnyPlayer() 该单位是否为非Bot玩家所控制?
IsCreature bool IsCreature() 此单位是否为怪物类型单位?
IsDeniable bool IsDeniable() 暂无
IsDisarmed bool IsDisarmed() 暂无
IsDominated bool IsDominated() 暂无
IsEvadeDisabled bool IsEvadeDisabled() 暂无
IsFrozen bool IsFrozen() 暂无
IsHardDisarmed bool IsHardDisarmed() 暂无
IsHero bool IsHero() 此单位是否为英雄或英雄幻象?
IsHexed bool IsHexed() 暂无
IsIdle bool IsIdle() 该生物是否处于闲置状态?
IsIllusion bool IsIllusion() 该单位是否为幻象单位?
IsInvisible bool IsInvisible() 暂无
IsInvulnerable bool IsInvulnerable() 暂无
IsLowAttackPriority bool IsLowAttackPriority() 暂无
IsMagicImmune bool IsMagicImmune() 该单位是否魔法免疫?
IsMechanical bool IsMechanical() 该单位是否为机械单位?
IsMovementImpaired bool IsMovementImpaired() 暂无
IsMuted bool IsMuted() 暂无
IsNeutralUnitType bool IsNeutralUnitType() 该单位是否为野怪?
IsNightmared bool IsNightmared() 暂无
IsOpposingTeam bool IsOpposingTeam(int a) 暂无
IsOutOfGame bool IsOutOfGame() 暂无
IsOwnedByAnyPlayer bool IsOwnedByAnyPlayer() 该单位是否为非Bot之玩家所有?
IsPhantom bool IsPhantom() 该单位是否为幻象单位?
IsPhantomBlocker bool IsPhantomBlocker() 暂无
IsPhased bool IsPhased() 是否在相位状态?
IsPositionInRange bool IsPositionInRange(Vector a, float b) 是否在某点的范围内
IsRangedAttacker bool IsRangedAttacker() 该单位攻击类型是否为远程攻击?
IsRealHero bool IsRealHero() 返回该单位是否为真正的英雄单位,而非小兵或是幻象。
IsRooted bool IsRooted() 暂无
IsSilenced bool IsSilenced() 该单位是否被沉默?
IsSoftDisarmed bool IsSoftDisarmed() 暂无
IsSpeciallyDeniable bool IsSpeciallyDeniable() 暂无
IsStunned bool IsStunned() 该单位是否被晕眩了?
IsSummoned bool IsSummoned() 此单位是否为召唤物?
IsTower bool IsTower() 此单位是否为塔?
IsUnableToMiss bool IsUnableToMiss() 暂无
IsUnselectable bool IsUnselectable() 暂无
Kill void Kill(handle a, handle b) 杀死一个单位,参数为使用的技能与攻击者。
MakeIllusion void MakeIllusion() 暂无
MakePhantomBlocker void MakePhantomBlocker() 暂无
MakeVisibleDueToAttack void MakeVisibleDueToAttack(int a) 暂无
MakeVisibleToTeam void MakeVisibleToTeam(int a, float b) 暂无
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() 暂无
NoTeamMoveTo bool NoTeamMoveTo() 暂无
NoTeamSelect bool NoTeamSelect() 暂无
NotOnMinimap bool NotOnMinimap() 暂无
NotOnMinimapForEnemies bool NotOnMinimapForEnemies() 暂无
NoUnitCollision bool NoUnitCollision() 暂无
PassivesDisabled bool PassivesDisabled() 暂无
PerformAttack void PerformAttack(handle a, bool b, bool c, bool d, bool e) 对一单位执行攻击。
PickupDroppedItem void PickupDroppedItem(handle a) 捡起掉落的物品。
PickupRune void PickupRune(handle a) 捡起神符。
ProvidesVision bool ProvidesVision() 暂无
ReduceMana void ReduceMana(float a) 移除单位的魔力,不过是用在该单位非自愿失去魔力,而非用在使用技能消耗魔力的情况。
RemoveAbility void RemoveAbility(string a) 以技能名称移除该单位相应的技能。
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.
RespawnUnit void RespawnUnit() 复活该单位。
SellItem void SellItem(handle a) 卖出该单位的物品。
SetAcquisitionRange void SetAcquisitionRange(float a) Sets acquisition range
SetAdditionalBattleMusicWeight void SetAdditionalBattleMusicWeight(float a) 获取当与该单位战斗时将会计算的战斗音乐权重。
SetAttackCapability void SetAttackCapability(int a) 暂无
SetAttacking void SetAttacking(handle a) 暂无
SetBaseAttackTime void SetBaseAttackTime(float a) 暂无
SetBaseDamageMax void SetBaseDamageMax(int a) 设置基础最大攻击力。
SetBaseDamageMin void SetBaseDamageMin(int a) 设置基础最小攻击力。
SetBaseHealthRegen void SetBaseHealthRegen(float a) 暂无
SetBaseMagicalResistanceValue void SetBaseMagicalResistanceValue(float a) 设置基础魔法抗性值。
SetBaseManaRegen void SetBaseManaRegen(float a) 设置基础魔力恢复值。
SetBaseMaxHealth void SetBaseMaxHealth(float a) 设置基础最大血量。
SetBaseMoveSpeed void SetBaseMoveSpeed(int a) 设置基础跑速。
SetControllableByPlayer void SetControllableByPlayer(int a, bool b) 以玩家ID设置该单位的控制权。
SetCursorCastTarget void SetCursorCastTarget(handle a) 暂无
SetCursorPosition void SetCursorPosition(Vector a) 暂无
SetCursorTargetingNothing void SetCursorTargetingNothing(bool a) 暂无
SetDayTimeVisionRange void SetDayTimeVisionRange(int a) 设置基础的视间视野距离。
SetDeathXP void SetDeathXP(int a) 设置该单位的击杀经验值奖赏。
SetForceAttackTarget void SetForceAttackTarget(handle a) 暂无
SetHasInventory void SetHasInventory(bool a) 暂无
SetHullRadius void SetHullRadius(float a) 设置该单位的碰撞半径。
SetIdleAcquire void SetIdleAcquire(bool a) 暂无
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) 暂无
SetMustReachEachGoalEntity void SetMustReachEachGoalEntity(bool a) 设置该单位是否要走访每个路径点。
SetNeverMoveToClearSpace void SetNeverMoveToClearSpace(bool a) 如果设置为True,则不会将该单位移动到净空的地方。
SetNightTimeVisionRange void SetNightTimeVisionRange(int a) 设置基础夜间视野距离。
SetOriginalModel void SetOriginalModel(string originalModel) 设置单位原模型。
SetPhysicalArmorBaseValue void SetPhysicalArmorBaseValue(float a) 设置基础护甲值。
SetRangedProjectileName void SetRangedProjectileName(string a) 暂无
SetStolenScepter void SetStolenScepter(bool a) 暂无
SetUnitName void SetUnitName(string a) 暂无
ShouldIdleAcquire bool ShouldIdleAcquire() 暂无
SpendMana void SpendMana(float a, handle b) 消耗魔力,可以用在技能消耗或使用物品。
Stop void Stop() 使该单位暂停当前动作。
SwapAbilities void SwapAbilities(string a, string b, bool c, bool d) 交换两个技能的字段,并设置其是否生效。
TimeUntilNextAttack float TimeUntilNextAttack() 暂无
TriggerModifierDodge bool TriggerModifierDodge() 暂无
TriggerSpellAbsorb bool TriggerSpellAbsorb(handle a) 判断传递的技能是否会触发该单位的技能吸收
UnitCanRespawn bool UnitCanRespawn() 暂无



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() 返回未分配的技能点数
GetAgility float GetAgility() 返回敏捷值
GetAgilityGain float GetAgilityGain() 返回敏捷成长
GetAssists int GetAssists() 返回助攻数,数值存储在玩家资源(PlayerResource)中
GetAttacker int GetAttacker(int a) 暂无
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() 暂无
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() 暂无
GetPhysicalArmorValue float GetPhysicalArmorValue() 返回护甲值,英雄护甲受到属性影响
GetPlayerID int GetPlayerID() 返回英雄拥有者的ID
GetPrimaryAttribute int GetPrimaryAttribute() 返回英雄主要属性,0 = 力量, 1 = 敏捷, 2 = 智力.
GetPrimaryStatValue float GetPrimaryStatValue() 返回主属性值
GetRespawnTime float GetRespawnTime() 返回复活时间
GetStatsBasedManaRegen float GetStatsBasedManaRegen() 返回属性提供的魔法回复
GetStreak int GetStreak() 返回连杀数
GetStrength float GetStrength() 返回力量值
GetStrengthGain float GetStrengthGain() 返回力量成长
GetTimeUntilRespawn float GetTimeUntilRespawn() 返回复活所需的时间
HasAnyAvailableInventorySpace bool HasAnyAvailableInventorySpace() 返回是否有可用物品栏空间
HasFlyingVision bool HasFlyingVision() 返回是否拥有空中视野
HasOwnerAbandoned bool HasOwnerAbandoned() 暂无
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() 暂无
RecordLastHit void RecordLastHit() 暂无
RespawnHero void RespawnHero(bool buyback, bool unknown1, bool unknown2) 暂无
SetAbilityPoints void SetAbilityPoints(int a) 设置当前可用技能点
SetBaseAgility void SetBaseAgility(float a) 设置基础敏捷
SetBaseIntellect void SetBaseIntellect(float a) 设置基础智力
SetBaseStrength void SetBaseStrength(float a) 设置基础力量
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) 暂无
SetRespawnPosition void SetRespawnPosition(Vector a) 暂无
SetTimeUntilRespawn void SetTimeUntilRespawn(float a) 暂无
ShouldDoFlyHeightVisual bool ShouldDoFlyHeightVisual() 暂无
SpendGold void SpendGold(int amount, int reason) 参数: int 金钱, int 原因
UnitCanRespawn bool UnitCanRespawn() 暂无
UpgradeAbility void UpgradeAbility(handle a) 升级指定技能,需要英雄拥有该技能和技能点
WillReincarnate bool WillReincarnate() 暂无



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

函数名 函数原型 解释
ClientLoadGridNav void ClientLoadGridNav() 通知客户端需要载入网格信息,可用于允许客户端确定允许建筑的区域等
SetAlwaysShowPlayerInventory void SetAlwaysShowPlayerInventory(bool a) 在HUD中显示玩家英雄的物品栏,不管选择了哪个单位
SetAnnouncerDisabled void SetAnnouncerDisabled(bool enabled) Disables the dota announcer
SetBotThinkingEnabled void SetBotThinkingEnabled(bool a) 允许/禁止机器人思考,需要与Dota PvP高度相似的三路线地图、商店等
SetBuybackEnabled void SetBuybackEnabled(bool a) 完全允许/禁止买活
SetCameraDistanceOverride void SetCameraDistanceOverride(float a) 设置默认的镜头距离。Dota默认为1134
SetCustomBuybackCooldownEnabled void SetCustomBuybackCooldownEnabled(bool a) 开启该选项来允许自定义买活冷却时间
SetCustomBuybackCostEnabled void SetCustomBuybackCostEnabled(bool a) 开启该选项来允许自定义买活花费
SetCustomHeroMaxLevel void SetCustomHeroMaxLevel(int maxLevel) 定义最大英雄等级(默认为25)
SetCustomXPRequiredToReachNextLevel void SetCustomXPRequiredToReachNextLevel(handle a) 定义英雄经验值表(table)
SetFixedRespawnTime void SetFixedRespawnTime(float time) Sets the dota respawn time. -1 for default behavior
SetFogOfWarDisabled void SetFogOfWarDisabled(bool a) 开关战争迷雾
SetGoldSoundDisabled void SetGoldSoundDisabled(bool a) 是否禁止获取金钱时的声音提示
SetOverrideSelectionEntity void SetOverrideSelectionEntity(handle unit) 覆盖默认选择实体,替代所有玩家的英雄
SetRecommendedItemsDisabled void SetRecommendedItemsDisabled(bool a) 是否禁止显示商店中的推荐购买物品
SetRemoveIllusionsOnDeath void SetRemoveIllusionsOnDeath(bool a) 使幻象死亡时立即消失,而不是延迟数秒
SetTopBarTeamValue void SetTopBarTeamValue(int a, int b) 设置顶端的队伍数值
SetTopBarTeamValuesOverride void SetTopBarTeamValuesOverride(bool a) 是否覆盖顶端的队伍数值
SetTopBarTeamValuesVisible void SetTopBarTeamValuesVisible(bool a) 开关顶端的队伍数值
SetTowerBackdoorProtectionEnabled void SetTowerBackdoorProtectionEnabled(bool a) 开关偷塔保护
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 <> GetSequence() 返回激活的序列(sequence)
IsAttachedToParent bool IsAttachedToParent() 是否依附父项(parent)
LookupSequence <> LookupSequence(string a) 输入名字返回序列(sequence)ID
SequenceDuration float SequenceDuration(string a) 按秒数返回指定序列(sequence)的持续时间
SetAngularVelocity void SetAngularVelocity(Vector a) 暂无描述
SetAnimation void SetAnimation(string a) 输入动画名称播放动作,需要模型拥有该动画
SetBodyGroup void SetBodyGroup(string a) 暂无描述
SetMaterialGroup void SetMaterialGroup(utlstringtoken a) 暂无描述
SetVelocity void SetVelocity(Vector velocity) 暂无描述



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
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的线性投射物
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) 创建一个只对指定玩家播放的粒子特效
DestroyParticle void DestroyParticle(int particleID, bool immediately) Destroys particle.
GetParticleReplacement string GetParticleReplacement(string a, handle b) 暂无描述
ReleaseParticleIndex void ReleaseParticleIndex(int particleId) 施放指定粒子特效索引号
SetParticleAlwaysSimulate void SetParticleAlwaysSimulate(int a) 暂无描述
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) 暂无描述



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

函数名 函数原型 解释
Defeated void Defeated() 摧毁遗迹等
DidMatchSignoutTimeOut bool DidMatchSignoutTimeOut() 当游戏结束,等待弹窗时为真
GetCustomGameDifficulty int GetCustomGameDifficulty() 返回自定义游戏模式难度
GetDifficulty int GetDifficulty() 返回自定义游戏模式难度
GetDroppedItem handle GetDroppedItem(int dropIndex) 获得第X个掉落物品
GetGameModeEntity handle GetGameModeEntity() 设置游戏模式实体
GetGameTime float GetGameTime() 返回游戏开始后经过的秒数,暂停时间不计算在内
GetMatchSignoutComplete bool GetMatchSignoutComplete() 是否已经接受包含回报信息的弹窗
GetNianFightStartTime float GetNianFightStartTime() 获得年兽大战开始时间
GetNianTotalDamageTaken int GetNianTotalDamageTaken() 芳晓活动,获得年兽受到的总伤害
GetTimeOfDay float GetTimeOfDay() 获取一天中的时间(游戏时间)
IsDaytime bool IsDaytime() 是否是白天
MakeTeamLose void MakeTeamLose(int team) 使指定队伍失败
NumDroppedItems int NumDroppedItems() 返回当前掉落在地面的物品数量
Playtesting_UpdateAddOnKeyValues void Playtesting_UpdateAddOnKeyValues() 从磁盘数据中更新自定义英雄、单位、技能的键值
ResetDefeated void ResetDefeated() 遗迹摧毁后重新开始
ResetToHeroSelection void ResetToHeroSelection() 重新开始时选择英雄
SendCustomMessage void SendCustomMessage(string message, int teamID, int unknown(1?)) Displays a l 在左侧文本框显示一行文本,通常用来提示死亡、反补队友、买活等信息。使用严格HTML格式(<br>,<u>,<font>)
SetCreepMinimapIconScale void SetCreepMinimapIconScale(float scale) 在小地图上缩放中立生物图标
SetCustomGameDifficulty void SetCustomGameDifficulty(int a) 设置自定义游戏模式难度等级
SetCustomGameEndDelay void SetCustomGameEndDelay(float delay) Sets the delay time until the game ends
SetCustomVictoryMessageDuration void SetCustomVictoryMessageDuration(float duration) Sets how long the custom victory message should last
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) Sets whether or not the kill banners should be hidden
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) 允许选择重复英雄
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 a, float b) 绘制实体附件
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)



GridNav

A class that can communicate with the gridnav, useful for seeing if stuff should be able to move

函数名 函数原型 解释
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 ) Cuts down this tree.
CutDownRegrowAfter void CutDownRegrowAfter(float RegrowAfter, int TeamNumberKnownTo ) Cuts down this tree. Regrow it after some time
GrowBack void GrowBack() Grows back the tree if it was cut down.
IsStanding bool IsStanding() Returns true if the tree is standing, false if it has been cut down



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