Zh/Dota 2 Workshop Tools/Scripting/API: Difference between revisions
Line 9,181: | Line 9,181: | ||
| <code>void CutDown(int TeamNumberKnownTo ) </code> | | <code>void CutDown(int TeamNumberKnownTo ) </code> | ||
| 砍掉这棵树 | | 砍掉这棵树 | ||
|- | |- | ||
Line 9,189: | Line 9,189: | ||
| <code>void CutDownRegrowAfter(float RegrowAfter, int TeamNumberKnownTo ) </code> | | <code>void CutDownRegrowAfter(float RegrowAfter, int TeamNumberKnownTo ) </code> | ||
| | | 砍掉这棵树,一段时间后再生 | ||
|- | |- | ||
Line 9,197: | Line 9,197: | ||
| <code>void GrowBack() </code> | | <code>void GrowBack() </code> | ||
| | | 再生一棵被砍掉的树 | ||
|- | |- | ||
Line 9,205: | Line 9,205: | ||
| <code>bool IsStanding() </code> | | <code>bool IsStanding() </code> | ||
| | | 如果树站立着返回true,如果被砍掉返回false | ||
|} | |} |
Revision as of 05:02, 2 September 2015

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)
|
No Description Set |
GetFrostyPointsForRound | int GetFrostyPointsForRound(int a, int b, int c)
|
No Description Set |
GetGoldFrostyBoostAmount | float GetGoldFrostyBoostAmount(int a, int b)
|
No Description Set |
GetGoldFrostyPointsForRound | int GetGoldFrostyPointsForRound(int a, int b, int c)
|
No Description Set |
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()
|
No Description Set |
SendFrostyPointsMessageToGC | void SendFrostyPointsMessageToGC(handle a)
|
No Description Set |
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)
|
No Description Set |
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()
|
No Description Set |
GatherCriteria | void GatherCriteria(handle a)
|
返回一个表包含用在这个实体的判定的标准.这个表等同于传入脚本方法的调用. |
GetAbsOrigin | Vector GetAbsOrigin()
|
No Description Set |
GetAngles | QAngle GetAngles()
|
No Description Set |
GetAnglesAsVector | Vector GetAnglesAsVector()
|
获得实体的颠簸,偏航,摇晃的矢量 |
GetAngularVelocity | Vector GetAngularVelocity()
|
获得当前角速度,返回颠簸,偏航,摇晃的矢量 |
GetBaseVelocity | Vector GetBaseVelocity()
|
获得基础速度 |
GetBoundingMaxs | Vector GetBoundingMaxs()
|
获得一个包含最大范围,以物体为中心的矢量 |
GetBoundingMins | Vector GetBoundingMins()
|
获得一个包含最小范围,以物体为中心的矢量 |
GetBounds | table GetBounds()
|
获得一个以物体为中心,包含“Mins”和“Maxs”矢量的表 |
GetCenter | Vector GetCenter()
|
获得指向物体中心的矢量,以绝对坐标的形式 |
GetChildren | handle GetChildren()
|
获得继承这个实体的实体 |
GetContext | table GetContext(string a)
|
GetContext( name ):检查一个对象的状态然后返回对象是否可用.可能返回string,float,或nil(如果对象没有找到) |
GetForwardVector | Vector GetForwardVector()
|
获得这个实体的前进矢量 |
GetHealth | int GetHealth()
|
No Description Set |
GetLocalAngularVelocity | QAngle GetLocalAngularVelocity()
|
可能为当前角速度 |
GetLocalVelocity | Vector GetLocalVelocity()
|
获得实体相对速度 |
GetMaxHealth | int GetMaxHealth()
|
No Description Set |
GetModelName | string GetModelName()
|
获得模型的名字 |
GetMoveParent | handle GetMoveParent()
|
如果在有继承对象,恢复实体所继承的对象 |
GetOrigin | Vector GetOrigin()
|
No Description Set |
GetOwner | handle GetOwner()
|
获得实体的所有者 |
GetOwnerEntity | handle GetOwnerEntity()
|
获得拥有者的实体,如果有的话 |
GetRightVector | Vector GetRightVector()
|
获得实体的右方矢量 |
GetRootMoveParent | handle GetRootMoveParent()
|
如果在继承关系里,在继承关系中寻找所继承的根源对象 |
GetSoundDuration | float GetSoundDuration(string soundName, string actormodelname)
|
返回声音的播放时间.传入声音名字和可选的应用模型名字. |
GetTeam | int GetTeam()
|
No Description Set |
GetUpVector | Vector GetUpVector()
|
获得实体的上方矢量 |
GetVelocity | Vector GetVelocity()
|
No Description Set |
IsAlive | bool IsAlive()
|
No Description Set. |
IsPlayer | bool IsPlayer()
|
是否为玩家的实体 |
Kill | void Kill()
|
No Description Set |
NextMovePeer | handle NextMovePeer()
|
No Description Set |
OverrideFriction | void OverrideFriction(float a, float b)
|
暂时重设阻力的持续时间和值 |
PrecacheScriptSound | void PrecacheScriptSound(string a)
|
预载声音文件 |
SetAbsOrigin | void SetAbsOrigin(Vector origin)
|
设置绝对来源 |
SetAngles | void SetAngles(float pitch, float yaw, float roll)
|
设置实体的颠簸,偏航,摇晃 |
SetAngularVelocity | void SetAngularVelocity(float pitch, float yaw, float roll)
|
设置当前角速度,使用实数颠簸,偏航,摇晃速度 |
SetContext | void SetContext(string a, string b, float c)
|
SetContext( 名字 , 值, 持续时间 ):存储任何在实体对话内容里的配对值.值是一个字符串.持续一段时间.(0代表永久) |
SetContextNum | void SetContextNum(string a, float b, float c)
|
SetContext( 名字 , 值, 持续时间 ):存储任何在实体对话内容里的配对值.值是一个数字(int或者float).持续一段时间.(0代表永久) |
SetContextThink | void SetContextThink(string a, handle b, float c)
|
在这个实体上设置一个计时器( a:标示字符,b:执行函数 c:延迟执行的时间 ) |
SetForwardVector | void SetForwardVector(Vector forwardVec)
|
设置实体的方向为前进矢量 |
SetFriction | void SetFriction(float a)
|
设置玩家阻力,无视物体 |
SetGravity | void SetGravity(float a)
|
设置玩家引力,无视物体 |
SetHealth | void SetHealth(int hp)
|
No Description Set |
SetMaxHealth | void SetMaxHealth(int maxHP)
|
No Description Set |
SetModel | void SetModel(string modelName)
|
No Description Set |
SetOrigin | void SetOrigin(Vector origin)
|
No Description Set |
SetOwner | void SetOwner(handle owningEntity)
|
设定实体的所有者 |
SetParent | void SetParent(handle a, string b)
|
设定这个实体的所继承的父实体 |
SetRenderColor | void SetRenderColor(int a, int b, int c)
|
SetRenderColor( r, g, b ):设定实体的渲染颜色 |
SetSize | void SetSize(Vector a, Vector b)
|
No Description Set |
SetTeam | void SetTeam(int team)
|
No Description Set |
SetVelocity | void SetVelocity(Vector a)
|
No Description Set |
StopSound | void StopSound(string soundName)
|
停止播放这个实体的特定的声音 |
Trigger | void Trigger()
|
触发这个实体的触发器 |
CEntities
No Description Set
Global accessor variable: Entities
函数名 | 函数原型 | 解释 |
---|---|---|
CreateByClassname | handle CreateByClassname(string className)
|
用类名来创建一个实体 |
FindAllByClassname | table FindAllByClassname(string a)
|
通过类名来寻找所有实体.返回被找到实体的数组或表. |
FindAllByClassnameWithin | table FindAllByClassnameWithin(string a, Vector b, float c)
|
在一个半径范围内通过类名寻找实体. |
FindAllByModel | table FindAllByModel(string modelName)
|
通过模型名字来找到对象. |
FindAllByName | table FindAllByName(string name)
|
通过名字来寻找所有实体.返回被找到实体的数组或表. |
FindAllByNameWithin | table FindAllByNameWithin(string name, Vector origin, float maxRadius)
|
在半径范围内通过名字来寻找实体. |
FindAllByTarget | table FindAllByTarget(string targetName)
|
通过目标名字来寻找实体 |
FindAllInSphere | table FindAllInSphere(Vector origin, float maxRadius)
|
在(球形)范围内寻找实体 |
FindByClassname | handle FindByClassname(handle startFrom, string className)
|
通过类名寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 |
FindByClassnameNearest | handle FindByClassnameNearest(string className, Vector origin, float maxRadius)
|
在最近一个点通过类名寻找实体 |
FindByClassnameWithin | handle FindByClassnameWithin(handle startFrom, string className, Vector origin, float maxRadius)
|
在半径范围内通过类名寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 |
FindByModel | handle FindByModel(handle startFrom, string modelName)
|
通过模型名字寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 |
FindByModelWithin | handle FindByModelWithin(handle startFrom, string modelName, Vector origin, float maxRadius)
|
在半径范围内通过模型名字寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 |
FindByName | handle FindByName(handle lastEnt, string searchString)
|
通过名字寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 |
FindByNameNearest | handle FindByNameNearest(string name, Vector origin, float maxRadius)
|
通过名字寻找最近原点的实体 |
FindByNameWithin | handle FindByNameWithin(handle startFrom, string name, Vector origin, float maxRadius)
|
在半径范围内通过名字寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 |
FindByTarget | handle FindByTarget(handle startFrom, string targetName)
|
通过目标名字寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 |
FindInSphere | handle FindInSphere(handle startFrom, Vector origin, float maxRadius)
|
在半径范围内寻找实体.传入nil就从头进行迭代寻找,传入之前找到的实体可以以之作为起点开始寻找 |
First | handle First()
|
在实体数组或表中开始一个迭代程序 |
Next | handle Next(handle startFrom)
|
从指定列表中的实体开始迭代 |
CEntityInstance
- extends CBaseEntity
No Description Set
函数名 | 函数原型 | 解释 |
---|---|---|
ConnectOutput | void ConnectOutput(string a, string b)
|
添加一个I/O链接,这可以当特定输出触发时,在这个实体调用方法 |
Destroy | void Destroy()
|
No Description Set |
DisconnectOutput | void DisconnectOutput(string a, string b)
|
从这个实体的I/O事件移除已连接的脚本方法 |
DisconnectRedirectedOutput | void DisconnectRedirectedOutput(string a, string b, handle c)
|
从传入实体的I/O事件移除已连接的脚本方法 |
entindex | int entindex()
|
No Description Set |
FireOutput | void FireOutput(string outputName, handle activator, handle caller, table args, float delay)
|
触发实体的输出 |
GetClassname | string GetClassname()
|
No Description Set |
GetDebugName | string GetDebugName()
|
如果没有定义的话获得实体名字的帮助 |
GetEntityHandle | ehandle GetEntityHandle()
|
获得这个实体的EHANDLE |
GetEntityIndex | int GetEntityIndex()
|
No Description Set |
GetIntAttr | int GetIntAttr(string a)
|
获得整型属性 |
GetName | string GetName()
|
No Description Set |
GetOrCreatePrivateScriptScope | handle GetOrCreatePrivateScriptScope()
|
恢复实体相关的每个实例私有的脚本数据,必要时会创建 |
GetOrCreatePublicScriptScope | handle GetOrCreatePublicScriptScope()
|
恢复实体相关的公用脚本数据,必要时会创建 |
GetPrivateScriptScope | handle GetPrivateScriptScope()
|
恢复实体相关的每个实例私有的脚本数据 |
GetPublicScriptScope | handle GetPublicScriptScope()
|
恢复实体相关的公用脚本数据 |
RedirectOutput | void RedirectOutput(string a, string b, handle c)
|
添加一个I/O链接,这可以当特定输出触发时,在这个实体调用方法 |
RemoveSelf | void RemoveSelf()
|
删除这个实体 |
SetIntAttr | void SetIntAttr(string a, int b)
|
设置整型属性 |
CDOTABaseAbility
- extends CBaseEntity
No Description Set
函数名 | 函数原型 | 解释 |
---|---|---|
CastAbility | void CastAbility()
|
No Description Set |
ContinueCasting | bool ContinueCasting()
|
No Description Set |
CreateVisibilityNode | void CreateVisibilityNode(Vector a, float b, float c)
|
No Description Set |
DecrementModifierRefCount | void DecrementModifierRefCount()
|
No Description Set |
EndChannel | void EndChannel(bool a)
|
参数: bool bInterrupted |
EndCooldown | void EndCooldown()
|
刷新这个技能 |
GetAbilityDamage | int GetAbilityDamage()
|
No Description Set |
GetAbilityDamageType | int GetAbilityDamageType()
|
No Description Set |
GetAbilityIndex | int GetAbilityIndex()
|
No Description Set |
GetAbilityName | string GetAbilityName()
|
No Description Set |
GetAbilityTargetFlags | int GetAbilityTargetFlags()
|
No Description Set |
GetAbilityTargetTeam | int GetAbilityTargetTeam()
|
No Description Set |
GetAbilityTargetType | int GetAbilityTargetType()
|
No Description Set |
GetAbilityType | int GetAbilityType()
|
No Description Set |
GetAnimationIgnoresModelScale | bool GetAnimationIgnoresModelScale()
|
No Description Set |
GetAssociatedPrimaryAbilities | string GetAssociatedPrimaryAbilities()
|
No Description Set |
GetAssociatedSecondaryAbilities | string GetAssociatedSecondaryAbilities()
|
No Description Set |
GetAutoCastState | bool GetAutoCastState()
|
No Description Set |
GetBackswingTime | float GetBackswingTime()
|
No Description Set |
GetBehavior | int GetBehavior()
|
No Description Set |
GetCaster | handle GetCaster()
|
No Description Set |
GetCastPoint | float GetCastPoint()
|
Returns the cast point of this ability. |
GetCastRange | int GetCastRange()
|
Returns the cast range of this ability. |
GetChannelledManaCostPerSecond | int GetChannelledManaCostPerSecond(int a)
|
Returns the channeled mana cost per second of this ability if it's a channeling ability. |
GetChannelStartTime | float GetChannelStartTime()
|
No Description Set |
GetChannelTime | float GetChannelTime()
|
No Description Set |
GetCloneSource | handle GetCloneSource()
|
No Description Set |
GetConceptRecipientType | int GetConceptRecipientType()
|
No Description Set |
GetCooldown | float GetCooldown(int a)
|
获得技能在给出的等级设定上的冷却时间,而不是目前的剩余的冷却时间 |
GetCooldownTime | float GetCooldownTime()
|
No Description Set |
GetCooldownTimeRemaining | float GetCooldownTimeRemaining()
|
No Description Set |
GetCursorPosition | Vector GetCursorPosition()
|
Returns the target point vector from the last cast of this point-targeting ability . |
GetCursorTarget | handle GetCursorTarget()
|
Returns the target unit from the last cast of this unit-targeting ability. |
GetCursorTargetingNothing | bool GetCursorTargetingNothing()
|
No Description Set |
GetDuration | float GetDuration()
|
No Description Set |
GetGoldCost | int GetGoldCost(int a)
|
No Description Set |
GetGoldCostForUpgrade | int GetGoldCostForUpgrade(int a)
|
No Description Set |
GetHeroLevelRequiredToUpgrade | int GetHeroLevelRequiredToUpgrade()
|
No Description Set |
GetIntrinsicModifierName | string GetIntrinsicModifierName()
|
No Description Set |
GetLevel | int GetLevel()
|
获得技能目前的等级 |
GetLevelSpecialValueFor | table GetLevelSpecialValueFor(string a, int b)
|
No Description Set |
GetManaCost | int GetManaCost(int a)
|
No Description Set |
GetMaxLevel | int GetMaxLevel()
|
No Description Set |
GetModifierValue | float GetModifierValue()
|
No Description Set |
GetModifierValueBonus | float GetModifierValueBonus()
|
No Description Set |
GetPlaybackRateOverride | float GetPlaybackRateOverride()
|
No Description Set |
GetSharedCooldownName | string GetSharedCooldownName()
|
No Description Set |
GetSpecialValueFor | table GetSpecialValueFor(string a)
|
No Description Set |
GetStolenActivityModifier | string GetStolenActivityModifier()
|
No Description Set |
GetToggleState | bool GetToggleState()
|
No Description Set |
HeroXPChange | bool HeroXPChange(float a)
|
No Description Set |
IncrementModifierRefCount | void IncrementModifierRefCount()
|
No Description Set |
IsActivated | bool IsActivated()
|
No Description Set |
IsAttributeBonus | bool IsAttributeBonus()
|
No Description Set |
IsChanneling | bool IsChanneling()
|
返回目前技能是否在施法状态 |
IsCooldownReady | bool IsCooldownReady()
|
No Description Set |
IsCosmetic | bool IsCosmetic()
|
No Description Set |
IsFullyCastable | bool IsFullyCastable()
|
返回技能能否被释放 |
IsHidden | bool IsHidden()
|
No Description Set |
IsHiddenWhenStolen | bool IsHiddenWhenStolen()
|
No Description Set |
IsInAbilityPhase | bool IsInAbilityPhase()
|
返回技能目前是否在被释放 |
IsItem | bool IsItem()
|
Returns whether this is an ability attached to an item. |
IsOwnersGoldEnough | bool IsOwnersGoldEnough(int a)
|
No Description Set |
IsOwnersGoldEnoughForUpgrade | bool IsOwnersGoldEnoughForUpgrade()
|
No Description Set |
IsOwnersManaEnough | bool IsOwnersManaEnough()
|
No Description Set |
IsPassive | bool IsPassive()
|
Returns whether this is a passive ability. |
IsSharedWithTeammates | bool IsSharedWithTeammates()
|
No Description Set |
IsStealable | bool IsStealable()
|
Returns whether this ability can be stealed (by Rubick's ultimate). |
IsStolen | bool IsStolen()
|
Returns whether this ability has been stolen. |
IsToggle | bool IsToggle()
|
No Description Set |
IsTrained | bool IsTrained()
|
No Description Set |
MarkAbilityButtonDirty | void MarkAbilityButtonDirty()
|
标记这个技能图标表示需要刷新 |
NumModifiersUsingAbility | int NumModifiersUsingAbility()
|
No Description Set |
OnAbilityPhaseInterrupted | void OnAbilityPhaseInterrupted()
|
No Description Set |
OnAbilityPhaseStart | bool OnAbilityPhaseStart()
|
No Description Set |
OnAbilityPinged | void OnAbilityPinged()
|
No Description Set |
OnChannelFinish | void OnChannelFinish(bool a)
|
No Description Set |
OnChannelThink | void OnChannelThink(float a)
|
No Description Set |
OnHeroCalculateStatBonus | void OnHeroCalculateStatBonus()
|
No Description Set |
OnHeroLevelUp | void OnHeroLevelUp()
|
No Description Set |
OnInventoryContentsChanged | void OnInventoryContentsChanged()
|
No Description Set |
OnOwnerDied | void OnOwnerDied()
|
No Description Set |
OnOwnerSpawned | void OnOwnerSpawned()
|
No Description Set |
OnSpellStart | void OnSpellStart()
|
No Description Set |
OnToggle | void OnToggle()
|
No Description Set |
OnUpgrade | void OnUpgrade()
|
No Description Set |
PayGoldCost | void PayGoldCost()
|
No Description Set |
PayGoldCostForUpgrade | void PayGoldCostForUpgrade()
|
No Description Set |
PayManaCost | void PayManaCost()
|
No Description Set |
PlaysDefaultAnimWhenStolen | bool PlaysDefaultAnimWhenStolen()
|
No Description Set |
ProcsMagicStick | bool ProcsMagicStick()
|
Returns whether this ability procs magic stick. |
RefCountsModifiers | bool RefCountsModifiers()
|
No Description Set |
RefundManaCost | void RefundManaCost()
|
No Description Set |
ResetToggleOnRespawn | bool ResetToggleOnRespawn()
|
No Description Set |
SetAbilityIndex | void SetAbilityIndex(int a)
|
No Description Set |
SetActivated | void SetActivated(bool a)
|
No Description Set |
SetChanneling | void SetChanneling(bool a)
|
No Description Set |
SetHidden | void SetHidden(bool a)
|
No Description Set |
SetInAbilityPhase | void SetInAbilityPhase(bool a)
|
No Description Set |
SetLevel | void SetLevel(int a)
|
设置这个技能的等级 |
SetOverrideCastPoint | void SetOverrideCastPoint(float a)
|
No Description Set |
SetRefCountsModifiers | void SetRefCountsModifiers(bool a)
|
No Description Set |
SetStolen | void SetStolen(bool a)
|
No Description Set |
ShouldUseResources | bool ShouldUseResources()
|
No Description Set |
SpeakAbilityConcept | void SpeakAbilityConcept(int a)
|
No Description Set |
SpeakTrigger | bool SpeakTrigger()
|
No Description Set |
StartCooldown | void StartCooldown(float a)
|
参数:fl冷却时间? |
ToggleAbility | void ToggleAbility()
|
No Description Set |
ToggleAutoCast | void ToggleAutoCast()
|
No Description Set |
UpgradeAbility | void UpgradeAbility()
|
No Description Set |
UseResources | void UseResources(bool a, bool b, bool c)
|
No Description Set |
CDOTA_Ability_Animation_Attack
- extends CDOTABaseAbility
No Description Set
函数名 | 函数原型 | 解释 |
---|---|---|
SetPlaybackRate | void SetPlaybackRate(float a)
|
重写播放速率 |
CDOTA_Ability_Animation_TailSpin
- extends CDOTABaseAbility
No Description Set
函数名 | 函数原型 | 解释 |
---|---|---|
SetPlaybackRate | void SetPlaybackRate(float a)
|
Override playbackrate |
CDOTA_Ability_Nian_Leap
- extends CDOTABaseAbility
No Description Set
函数名 | 函数原型 | 解释 |
---|---|---|
SetPlaybackRate | void SetPlaybackRate(float a)
|
Override playbackrate |
CDOTA_Ability_Nian_Dive
- extends CDOTABaseAbility
No Description Set
函数名 | 函数原型 | 解释 |
---|---|---|
SetPlaybackRate | void SetPlaybackRate(float a)
|
Override playbackrate |
CDOTA_Ability_Nian_Roar
- extends CDOTABaseAbility
No Description Set
函数名 | 函数原型 | 解释 |
---|---|---|
GetCastCount | int GetCastCount()
|
年兽使用了咆哮的次数 |
CDOTA_Item
- extends CDOTABaseAbility
No Description Set
函数名 | 函数原型 | 解释 |
---|---|---|
GetContainer | handle GetContainer()
|
获得物品所有者 |
GetCost | int GetCost()
|
No Description Set |
GetCurrentCharges | int GetCurrentCharges()
|
获得物品的目前充能 |
GetInitialCharges | int GetInitialCharges()
|
获得物品的初始充能 |
GetPurchaser | handle GetPurchaser()
|
获得物品的购买者 |
GetPurchaseTime | float GetPurchaseTime()
|
获得物品的购买时间 |
GetShareability | int GetShareability()
|
No Description Set |
IsPermanent | bool IsPermanent()
|
判断物品是否非消耗品 |
LaunchLoot | void LaunchLoot(bool useOnContact, float height, float speed, Vector destination)
|
For items lying on the ground. Fires the item up into the air so that it lands at the specified position. |
SetCurrentCharges | void SetCurrentCharges(int a)
|
设置物品的充能数 |
SetPurchaser | void SetPurchaser(handle a)
|
设置物品的购买者 |
SetPurchaseTime | void SetPurchaseTime(float a)
|
设置物品的购买时间 |
SetStacksWithOtherOwners | void SetStacksWithOtherOwners(bool a)
|
No Description Set |
StacksWithOtherOwners | bool StacksWithOtherOwners()
|
No Description Set |
Think | void Think()
|
判断此物品 |
CDOTA_Item_Physical
- extends CBaseAnimating
No Description Set
函数名 | 函数原型 | 解释 |
---|---|---|
GetContainedItem | handle GetContainedItem()
|
返回禁用的物品? |
GetCreationTime | float GetCreationTime()
|
返回物品第一次出现在地图上的时间 |
SetContainedItem | void SetContainedItem(handle a)
|
设置禁用的物品? |
CDOTA_Item_DataDriven
- extends CDOTA_Item
'
函数名 | 函数原型 | 解释 |
---|---|---|
ApplyDataDrivenModifier | void ApplyDataDrivenModifier(handle source, handle target, string modifier_name, handle modifierArgs)
|
CDOTA_Unit_Nian
- extends CDOTA_BaseNPC_Creature
No Description Set
函数名 | 函数原型 | 解释 |
---|---|---|
GetHorn | handle GetHorn()
|
获取年兽角 |
GetTail | handle GetTail()
|
获取年兽尾巴 |
IsHornAlive | bool IsHornAlive()
|
年兽的角巴是否损坏? |
IsTailAlive | bool IsTailAlive()
|
年兽的尾巴是否损坏? |
CBasePlayer
No Description Set
函数名 | 函数原型 | 解释 |
---|---|---|
IsNoclipping | bool IsNoclipping()
|
玩家处于穿墙模式(noclip mode)下返回true |
CDOTAPlayer
- extends CBaseAnimating
No Description Set
函数名 | 函数原型 | 解释 |
---|---|---|
GetAssignedHero | handle GetAssignedHero()
|
获取该玩家的英雄 |
GetControlledRPGUnit | handle GetControlledRPGUnit()
|
获取该玩家控制的RPG单位 |
GetPlayerID | int GetPlayerID()
|
获取该玩家的官方玩家ID(PlayerID)玩家不在队伍中时返回-1 |
MakeRandomHeroSelection | void MakeRandomHeroSelection()
|
随机该玩家的英雄 |
SetKillCamUnit | void SetKillCamUnit(handle a)
|
设置英雄的击杀镜头单位(kill cam unit) |
SetMusicStatus | void SetMusicStatus(int nMusicStatus, float flIntensity)
|
设置玩家的音乐状态,注意这只有在dota_music_battle_enable为off时才会有效 |
CDOTA_PlayerResource
- extends CBaseEntity
No Description Set
Global accessor variable: PlayerResource
函数名 | 函数原型 | 解释 |
---|---|---|
AddAegisPickup | void AddAegisPickup(int a)
|
No Description Set |
AddClaimedFarm | void AddClaimedFarm(int a, float b)
|
No Description Set |
AddGoldSpentOnSupport | void AddGoldSpentOnSupport(int a, int b)
|
No Description Set |
AddRunePickup | void AddRunePickup(int a)
|
No Description Set |
AreUnitsSharedWithPlayerID | bool AreUnitsSharedWithPlayerID(int a, int b)
|
No Description Set |
ClearKillsMatrix | void ClearKillsMatrix(int a)
|
No Description Set |
ClearLastHitMultikill | void ClearLastHitMultikill(int a)
|
No Description Set |
ClearLastHitStreak | void ClearLastHitStreak(int a)
|
No Description Set |
ClearRawPlayerDamageMatrix | void ClearRawPlayerDamageMatrix(int a)
|
No Description Set |
ClearStreak | void ClearStreak(int a)
|
No Description Set |
GetAegisPickups | int GetAegisPickups(int a)
|
No Description Set |
GetAssists | int GetAssists(int a)
|
No Description Set |
GetBroadcasterChannel | <> 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)
|
返回玩家要加入的队伍编号 |
GetDamageDoneToHero | int GetDamageDoneToHero(int a, int b)
|
No Description Set |
GetDeaths | int GetDeaths(int a)
|
No Description Set |
GetDenies | int GetDenies(int a)
|
No Description Set |
GetEventPointsForPlayerID | int GetEventPointsForPlayerID(int a)
|
No Description Set |
GetEventPremiumPointsGranted | int GetEventPremiumPointsGranted(int a)
|
No Description Set |
GetEventRankGranted | int GetEventRankGranted(int a)
|
No Description Set |
GetGold | int GetGold(int playerID)
|
返回指定玩家现有金钱量 |
GetGoldBagsCollected | int GetGoldBagsCollected(int a)
|
No Description Set |
GetGoldLostToDeath | int GetGoldLostToDeath(int a)
|
No Description Set |
GetGoldPerMin | float GetGoldPerMin(int a)
|
No Description Set |
GetGoldSpentOnBuybacks | int GetGoldSpentOnBuybacks(int a)
|
No Description Set |
GetGoldSpentOnConsumables | int GetGoldSpentOnConsumables(int a)
|
No Description Set |
GetGoldSpentOnItems | int GetGoldSpentOnItems(int a)
|
No Description Set |
GetGoldSpentOnSupport | int GetGoldSpentOnSupport(int a)
|
No Description Set |
GetHealing | float GetHealing(int a)
|
No Description Set |
GetHeroDamageTaken | int GetHeroDamageTaken(int a)
|
No Description Set |
GetKills | int GetKills(int playerID)
|
返回指定玩家击杀次数 |
GetKillsDoneToHero | int GetKillsDoneToHero(int attackerPlayerID, int victimPlayerID)
|
返回攻击者(第一个参数)杀死指定受害者(第二个参数)的次数 |
GetLastHitMultikill | int GetLastHitMultikill(int a)
|
No Description Set |
GetLastHits | int GetLastHits(int playerID)
|
No Description Set |
GetLastHitStreak | int GetLastHitStreak(int a)
|
No Description Set |
GetLevel | int GetLevel(int playerID)
|
No Description Set |
GetMisses | int GetMisses(int a)
|
No Description Set |
GetNearbyCreepDeaths | int GetNearbyCreepDeaths(int a)
|
No Description Set |
GetNthCourierForTeam | handle GetNthCourierForTeam(int a, int b)
|
No Description Set |
GetNthPlayerIDOnTeam | int GetNthPlayerIDOnTeam(int a, int b)
|
No Description Set |
GetNumConsumablesPurchased | int GetNumConsumablesPurchased(int a)
|
No Description Set |
GetNumCouriersForTeam | int GetNumCouriersForTeam(int a)
|
No Description Set |
GetNumItemsPurchased | int GetNumItemsPurchased(int a)
|
No Description Set |
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)
|
返回指定玩家现有可靠金钱量 |
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)
|
返回指定玩家现有不可靠金钱量 |
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)
|
(玩家ID,英雄职业名,金钱,经验值) - 将玩家的英雄替换成指定的英雄、金钱和经验值 |
ResetBuybackCostTime | void ResetBuybackCostTime(int a)
|
No Description Set |
ResetTotalEarnedGold | void ResetTotalEarnedGold(int a)
|
No Description Set |
SetBuybackCooldownTime | void SetBuybackCooldownTime(int a, float b)
|
No Description Set |
SetBuybackGoldLimitTime | void SetBuybackGoldLimitTime(int a, float b)
|
No Description Set |
SetCameraTarget | void SetCameraTarget(int a, handle b)
|
(玩家ID,实体) - 强制玩家镜头跟随目标实体 |
SetCustomBuybackCooldown | void SetCustomBuybackCooldown(int a, float b)
|
设置玩家买活冷却时间 |
SetCustomBuybackCost | void SetCustomBuybackCost(int a, int b)
|
设置玩家买活花费 |
SetCustomTeamAssignment | void SetCustomTeamAssignment(int playerIndex, int teamToJoin)
|
设置玩家要加入的队伍 |
SetGold | void SetGold(int playerID, int amount, bool reliableGold)
|
设置玩家的可靠/不可靠金钱数 |
SetHasRandomed | void SetHasRandomed(int playerID)
|
No Description Set |
SetHasRepicked | void SetHasRepicked(int playerID)
|
No Description Set |
SetLastBuybackTime | void SetLastBuybackTime(int a, int b)
|
No Description Set |
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)
|
No Description Set |
AngerNearbyUnits | void AngerNearbyUnits()
|
No Description Set |
AttackNoEarlierThan | void AttackNoEarlierThan(float a)
|
No Description Set |
AttackReady | bool AttackReady()
|
No Description Set |
BoundingRadius2D | float BoundingRadius2D()
|
No Description Set |
CanEntityBeSeenByMyTeam | bool CanEntityBeSeenByMyTeam(handle a)
|
Check FoW to see if an entity is visible. |
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()
|
No Description Set |
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()
|
No Description Set |
GetBaseDamageMax | int GetBaseDamageMax()
|
获取最大伤害值。 |
GetBaseDamageMin | int GetBaseDamageMin()
|
获取最小伤害值。 |
GetBaseDayTimeVisionRange | int GetBaseDayTimeVisionRange()
|
获取单位的基础日间视野距离(修改器不列入计算)。 |
GetBaseHealthRegen | float GetBaseHealthRegen()
|
获取单位的基础血量恢复值。 |
GetBaseMagicalResistanceValue | float GetBaseMagicalResistanceValue()
|
获取单位的基础魔法抗性值。 |
GetBaseMaxHealth | float GetBaseMaxHealth()
|
获取基础血量值。 |
GetBaseMoveSpeed | float GetBaseMoveSpeed()
|
获取基础跑速。 |
GetBaseNightTimeVisionRange | int GetBaseNightTimeVisionRange()
|
获取单位基础的夜间视野距离(修改器不列入计算)。 |
GetCastPoint | float GetCastPoint(bool a)
|
Parameter: bAttack |
GetCollisionPadding | float GetCollisionPadding()
|
返回该单位的碰撞体积。 |
GetConstantBasedManaRegen | float GetConstantBasedManaRegen()
|
获取基础的魔力恢复值常数。 |
GetCreationTime | float GetCreationTime()
|
No Description Set |
GetCurrentActiveAbility | handle GetCurrentActiveAbility()
|
获取该单位正在使用中的法术。 |
GetCurrentVisionRange | int GetCurrentVisionRange()
|
获取当前的视野距离。 |
GetCursorCastTarget | handle GetCursorCastTarget()
|
获取鼠标指定的施法目标。 |
GetCursorPosition | Vector GetCursorPosition()
|
获取鼠标位置。 |
GetCursorTargetingNothing | bool GetCursorTargetingNothing()
|
No Description Set |
GetDayTimeVisionRange | int GetDayTimeVisionRange()
|
获取该单位的日间视野(将修改器并入计算)。 |
GetDeathXP | int GetDeathXP()
|
获取该单位的击杀经验值奖赏。 |
GetForceAttackTarget | handle GetForceAttackTarget()
|
No Description Set |
GetGoldBounty | int GetGoldBounty()
|
获取该单位的击杀金钱奖赏。 |
GetHasteFactor | float GetHasteFactor()
|
No Description Set |
GetHealth | int GetHealth()
|
获取该单位的血量。 |
GetHealthDeficit | int GetHealthDeficit()
|
返回损失的血量 (最大血量 - 当前血量)。 |
GetHealthPercent | int GetHealthPercent()
|
获取该单位当前的血量百分比。 |
GetHealthRegen | float GetHealthRegen()
|
获取该单位当前的血量恢复值。 |
GetHullRadius | float GetHullRadius()
|
获取该单位的碰撞体积半径。 |
GetIdealSpeed | float GetIdealSpeed()
|
获取该单位的跑速(将修改器并入计算)。 |
GetIncreasedAttackSpeed | float GetIncreasedAttackSpeed()
|
No Description Set |
GetInitialGoalEntity | handle GetInitialGoalEntity()
|
返回该单位初始的路径点。 |
GetItemInSlot | handle GetItemInSlot(int a)
|
以下标值获取物品栏中的物品。 |
GetLastIdleChangeTime | float GetLastIdleChangeTime()
|
获取该单位最后 进入/离开 闲置状态的时间。 |
GetLevel | int GetLevel()
|
返回该单位当前的等级。 |
GetMagicalArmorValue | float GetMagicalArmorValue()
|
返回该单位当前的魔法抗性值。 |
GetMainControllingPlayer | int GetMainControllingPlayer()
|
返回控制该单位的玩家ID。 |
GetMana | float GetMana()
|
获取该单位的魔力值。 |
GetManaPercent | int GetManaPercent()
|
获取该单位的剩余魔力值百分比。 |
GetManaRegen | float GetManaRegen()
|
获取该单位的魔力恢复值。 |
GetMaxHealth | int GetMaxHealth()
|
获取该单位的最大血量。 |
GetMaxMana | float GetMaxMana()
|
获取该单位的最大魔力。 |
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)
|
No Description Set |
GetMustReachEachGoalEntity | bool GetMustReachEachGoalEntity()
|
该单位是否被要求走访每个路径点? |
GetNightTimeVisionRange | int GetNightTimeVisionRange()
|
返回夜间视野距离(将修改器并入计算)。 |
GetOpposingTeamNumber | int GetOpposingTeamNumber()
|
No Description Set |
GetPaddedCollisionRadius | float GetPaddedCollisionRadius()
|
获取单位碰撞体积半径。 |
GetPercentageBasedManaRegen | float GetPercentageBasedManaRegen()
|
获取基础魔力恢复值百分比。 |
GetPhysicalArmorBaseValue | float GetPhysicalArmorBaseValue()
|
返回基础护甲值。 |
GetPhysicalArmorValue | float GetPhysicalArmorValue()
|
返回当前的护甲值。 |
GetPlayerOwner | handle GetPlayerOwner()
|
获取拥有此单位的玩家实体。 |
GetPlayerOwnerID | int GetPlayerOwnerID()
|
获取拥有此单位的玩家ID。 |
GetProjectileSpeed | int GetProjectileSpeed()
|
No Description Set |
GetRangeToUnit | float GetRangeToUnit(handle a)
|
No Description Set |
GetSecondsPerAttack | float GetSecondsPerAttack()
|
No Description Set |
GetStatsBasedManaRegen | float GetStatsBasedManaRegen()
|
获取因智慧而增加的魔法恢复值。 |
GetTeamNumber | int GetTeamNumber()
|
获取该单位所属的队伍ID。 |
GetTotalPurchasedUpgradeGoldCost | int GetTotalPurchasedUpgradeGoldCost()
|
获取用在升级的金钱。 |
GetUnitLabel | string GetUnitLabel()
|
No Description Set |
GetUnitName | string GetUnitName()
|
获取单位名称。 |
GiveMana | void GiveMana(float a)
|
给予此单位指定的魔法值。(Giff me mana!) |
HasAbility | bool HasAbility(string a)
|
以技能名称搜寻该单位是否拥有此技能。 |
HasAttackCapability | bool HasAttackCapability()
|
No Description Set |
HasFlyingVision | bool HasFlyingVision()
|
No Description Set |
HasFlyMovementCapability | bool HasFlyMovementCapability()
|
No Description Set |
HasGroundMovementCapability | bool HasGroundMovementCapability()
|
No Description Set |
HasInventory | bool HasInventory()
|
No Description Set |
HasItemInInventory | bool HasItemInInventory(string a)
|
以物品名称搜寻该单位是否拥有此物品。 |
HasModifier | bool HasModifier(string a)
|
以修改器名称搜寻该单位是否拥有此修改器。 |
HasMovementCapability | bool HasMovementCapability()
|
No Description Set |
HasScepter | bool HasScepter()
|
No Description Set |
Heal | void Heal(float amount, handle source)
|
治疗该单位。 |
Hold | void Hold()
|
命令单位在原地待命。 |
Interrupt | void Interrupt()
|
No Description Set |
InterruptChannel | void InterruptChannel()
|
No Description Set |
InterruptMotionControllers | void InterruptMotionControllers(bool a)
|
Parameter boolean determines finding clear space. |
IsAlive | bool IsAlive()
|
此单位是否还活着? |
IsAncient | bool IsAncient()
|
该生物是否为远古野怪? |
IsAttackImmune | bool IsAttackImmune()
|
No Description Set |
IsAttacking | bool IsAttacking()
|
No Description Set |
IsAttackingEntity | bool IsAttackingEntity(handle a)
|
No Description Set |
IsBlind | bool IsBlind()
|
No Description Set |
IsBlockDisabled | bool IsBlockDisabled()
|
No Description Set |
IsCommandRestricted | bool IsCommandRestricted()
|
No Description Set |
IsControllableByAnyPlayer | bool IsControllableByAnyPlayer()
|
该单位是否为非Bot玩家所控制? |
IsCreature | bool IsCreature()
|
此单位是否为怪物类型单位? |
IsDeniable | bool IsDeniable()
|
No Description Set |
IsDisarmed | bool IsDisarmed()
|
No Description Set |
IsDominated | bool IsDominated()
|
No Description Set |
IsEvadeDisabled | bool IsEvadeDisabled()
|
No Description Set |
IsFrozen | bool IsFrozen()
|
No Description Set |
IsHardDisarmed | bool IsHardDisarmed()
|
No Description Set |
IsHero | bool IsHero()
|
此单位是否为英雄或英雄幻象? |
IsHexed | bool IsHexed()
|
No Description Set |
IsIdle | bool IsIdle()
|
该生物是否处于闲置状态? |
IsIllusion | bool IsIllusion()
|
该单位是否为幻象单位? |
IsInvisible | bool IsInvisible()
|
No Description Set |
IsInvulnerable | bool IsInvulnerable()
|
No Description Set |
IsLowAttackPriority | bool IsLowAttackPriority()
|
No Description Set |
IsMagicImmune | bool IsMagicImmune()
|
该单位是否魔法免疫? |
IsMechanical | bool IsMechanical()
|
该单位是否为机械单位? |
IsMovementImpaired | bool IsMovementImpaired()
|
No Description Set |
IsMuted | bool IsMuted()
|
No Description Set |
IsNeutralUnitType | bool IsNeutralUnitType()
|
该单位是否为野怪? |
IsNightmared | bool IsNightmared()
|
No Description Set |
IsOpposingTeam | bool IsOpposingTeam(int a)
|
No Description Set |
IsOutOfGame | bool IsOutOfGame()
|
No Description Set |
IsOwnedByAnyPlayer | bool IsOwnedByAnyPlayer()
|
该单位是否为非Bot之玩家所有? |
IsPhantom | bool IsPhantom()
|
该单位是否为幻象单位? |
IsPhantomBlocker | bool IsPhantomBlocker()
|
No Description Set |
IsPhased | bool IsPhased()
|
是否在相位状态? |
IsPositionInRange | bool IsPositionInRange(Vector a, float b)
|
是否在某点的范围内 |
IsRangedAttacker | bool IsRangedAttacker()
|
该单位攻击类型是否为远程攻击? |
IsRealHero | bool IsRealHero()
|
返回该单位是否为真正的英雄单位,而非小兵或是幻象。 |
IsRooted | bool IsRooted()
|
No Description Set |
IsSilenced | bool IsSilenced()
|
该单位是否被沉默? |
IsSoftDisarmed | bool IsSoftDisarmed()
|
No Description Set |
IsSpeciallyDeniable | bool IsSpeciallyDeniable()
|
No Description Set |
IsStunned | bool IsStunned()
|
该单位是否被晕眩了? |
IsSummoned | bool IsSummoned()
|
此单位是否为召唤物? |
IsTower | bool IsTower()
|
此单位是否为塔? |
IsUnableToMiss | bool IsUnableToMiss()
|
No Description Set |
IsUnselectable | bool IsUnselectable()
|
No Description Set |
Kill | void Kill(handle a, handle b)
|
杀死一个单位,参数为使用的技能与攻击者。 |
MakeIllusion | void MakeIllusion()
|
No Description Set |
MakePhantomBlocker | void MakePhantomBlocker()
|
No Description Set |
MakeVisibleDueToAttack | void MakeVisibleDueToAttack(int a)
|
No Description Set |
MakeVisibleToTeam | void MakeVisibleToTeam(int a, float b)
|
No Description Set |
ModifyHealth | void ModifyHealth(int a, handle b, bool c, int d)
|
设置血量为所指定的值 |
MoveToNPC | void MoveToNPC(handle a)
|
移动至指定的单位。 |
MoveToNPCToGiveItem | void MoveToNPCToGiveItem(handle npc, handle item)
|
将身上的物品丢给指定的单位。 |
MoveToPosition | void MoveToPosition(Vector a)
|
移动到指定的位置。 |
MoveToPositionAggressive | void MoveToPositionAggressive(Vector a)
|
移动到指定的位置。 |
MoveToTargetToAttack | void MoveToTargetToAttack(handle a)
|
移动至指定的单位,并且发动攻击。 |
NoHealthBar | bool NoHealthBar()
|
No Description Set |
NoTeamMoveTo | bool NoTeamMoveTo()
|
No Description Set |
NoTeamSelect | bool NoTeamSelect()
|
No Description Set |
NotOnMinimap | bool NotOnMinimap()
|
No Description Set |
NotOnMinimapForEnemies | bool NotOnMinimapForEnemies()
|
No Description Set |
NoUnitCollision | bool NoUnitCollision()
|
No Description Set |
PassivesDisabled | bool PassivesDisabled()
|
No Description Set |
PerformAttack | void PerformAttack(handle a, bool b, bool c, bool d, bool e)
|
对一单位执行攻击。 |
PickupDroppedItem | void PickupDroppedItem(handle a)
|
捡起掉落的物品。 |
PickupRune | void PickupRune(handle a)
|
捡起神符。 |
ProvidesVision | bool ProvidesVision()
|
No Description Set |
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)
|
No Description Set |
SetAttacking | void SetAttacking(handle a)
|
No Description Set |
SetBaseAttackTime | void SetBaseAttackTime(float a)
|
No Description Set |
SetBaseDamageMax | void SetBaseDamageMax(int a)
|
设置基础最大攻击力。 |
SetBaseDamageMin | void SetBaseDamageMin(int a)
|
设置基础最小攻击力。 |
SetBaseHealthRegen | void SetBaseHealthRegen(float a)
|
No Description Set |
SetBaseMagicalResistanceValue | void SetBaseMagicalResistanceValue(float a)
|
设置基础魔法抗性值。 |
SetBaseManaRegen | void SetBaseManaRegen(float a)
|
设置基础魔力恢复值。 |
SetBaseMaxHealth | void SetBaseMaxHealth(float a)
|
设置基础最大血量。 |
SetBaseMoveSpeed | void SetBaseMoveSpeed(int a)
|
设置基础跑速。 |
SetControllableByPlayer | void SetControllableByPlayer(int a, bool b)
|
以玩家ID设置该单位的控制权。 |
SetCursorCastTarget | void SetCursorCastTarget(handle a)
|
No Description Set |
SetCursorPosition | void SetCursorPosition(Vector a)
|
No Description Set |
SetCursorTargetingNothing | void SetCursorTargetingNothing(bool a)
|
No Description Set |
SetDayTimeVisionRange | void SetDayTimeVisionRange(int a)
|
设置基础的视间视野距离。 |
SetDeathXP | void SetDeathXP(int a)
|
设置该单位的击杀经验值奖赏。 |
SetForceAttackTarget | void SetForceAttackTarget(handle a)
|
No Description Set |
SetHasInventory | void SetHasInventory(bool a)
|
No Description Set |
SetHullRadius | void SetHullRadius(float a)
|
设置该单位的碰撞半径。 |
SetIdleAcquire | void SetIdleAcquire(bool a)
|
No Description Set |
SetInitialGoalEntity | void SetInitialGoalEntity(handle a)
|
设置该单位的初始路径点。 |
SetMana | void SetMana(float a)
|
设置该单位的魔力值。 |
SetMaximumGoldBounty | void SetMaximumGoldBounty(int a)
|
设置该单位的最高赏金。 |
SetMinimumGoldBounty | void SetMinimumGoldBounty(int a)
|
设置该单位的最低赏金。 |
SetModifierStackCount | void SetModifierStackCount(string modifierName, handle b, int modifierCount)
|
Sets the stack count of a given modifier. |
SetMoveCapability | void SetMoveCapability(int a)
|
No Description Set |
SetMustReachEachGoalEntity | void SetMustReachEachGoalEntity(bool a)
|
设置该单位是否要走访每个路径点。 |
SetNeverMoveToClearSpace | void SetNeverMoveToClearSpace(bool a)
|
如果设置为True,则不会将该单位移动到净空的地方。 |
SetNightTimeVisionRange | void SetNightTimeVisionRange(int a)
|
设置基础夜间视野距离。 |
SetOriginalModel | void SetOriginalModel(string originalModel)
|
设置单位原模型。 |
SetPhysicalArmorBaseValue | void SetPhysicalArmorBaseValue(float a)
|
设置基础护甲值。 |
SetRangedProjectileName | void SetRangedProjectileName(string a)
|
No Description Set |
SetStolenScepter | void SetStolenScepter(bool a)
|
No Description Set |
SetUnitName | void SetUnitName(string a)
|
No Description Set |
ShouldIdleAcquire | bool ShouldIdleAcquire()
|
No Description Set |
SpendMana | void SpendMana(float a, handle b)
|
消耗魔力,可以用在技能消耗或使用物品。 |
Stop | void Stop()
|
使该单位暂停当前动作。 |
SwapAbilities | void SwapAbilities(string a, string b, bool c, bool d)
|
交换两个技能的字段,并设置其是否生效。 |
TimeUntilNextAttack | float TimeUntilNextAttack()
|
No Description Set |
TriggerModifierDodge | bool TriggerModifierDodge()
|
No Description Set |
TriggerSpellAbsorb | bool TriggerSpellAbsorb(handle a)
|
判断传递的技能是否会触发该单位的技能吸收 |
UnitCanRespawn | bool UnitCanRespawn()
|
No Description Set |
CDOTA_BaseNPC_Hero
- extends CDOTA_BaseNPC
'
函数名 | 函数原型 | 解释 |
---|---|---|
AddExperience | bool AddExperience(float amount, bool applyBotDifficultyScaling)
|
给单位增加经验值 |
Buyback | void Buyback()
|
花费金钱并买活英雄 |
CalculateStatBonus | void CalculateStatBonus()
|
英雄返回属性后,重新计算全部属性 |
CanEarnGold | bool CanEarnGold()
|
返回布尔值,买活返回金钱限制时间是否少于游戏时间(其实就是是否能够正常返回金钱.....) |
ClearLastHitMultikill | void ClearLastHitMultikill()
|
数值存储在玩家资源(PlayerResource)中 |
ClearLastHitStreak | void ClearLastHitStreak()
|
数值存储在玩家资源(PlayerResource)中 |
ClearStreak | void ClearStreak()
|
数值存储在玩家资源(PlayerResource)中 |
GetAbilityPoints | int GetAbilityPoints()
|
返回未分配的技能点数 |
GetAgility | float GetAgility()
|
返回敏捷值 |
GetAgilityGain | float GetAgilityGain()
|
返回敏捷成长 |
GetAssists | int GetAssists()
|
返回助攻数,数值存储在玩家资源(PlayerResource)中 |
GetAttacker | int GetAttacker(int a)
|
No Description Set |
GetBaseAgility | float GetBaseAgility()
|
返回基础敏捷 |
GetBaseDamageMax | int GetBaseDamageMax()
|
返回基础攻击伤害最大值,英雄的基础攻击伤害也会受到属性影响 |
GetBaseDamageMin | int GetBaseDamageMin()
|
返回基础攻击伤害最小值,英雄的基础攻击伤害也会受到属性影响 |
GetBaseIntellect | float GetBaseIntellect()
|
返回基础智力 |
GetBaseStrength | float GetBaseStrength()
|
返回基础力量 |
GetBonusDamageFromPrimaryStat | int GetBonusDamageFromPrimaryStat()
|
返回来自主属性奖励的攻击伤害值 |
GetBuybackCooldownTime | float GetBuybackCooldownTime()
|
返回该英雄买活CD的剩余时间 |
GetBuybackCost | int GetBuybackCost()
|
返回买活所需金钱 |
GetBuybackGoldLimitTime | float GetBuybackGoldLimitTime()
|
返回买活所带来的金钱惩罚剩余时间 |
GetCurrentXP | int GetCurrentXP()
|
返回当前经验值 |
GetDeathGoldCost | int GetDeathGoldCost()
|
返回死亡损失金钱 |
GetDeaths | int GetDeaths()
|
返回死亡次数 |
GetDenies | int GetDenies()
|
返回反补次数 |
GetGold | int GetGold()
|
返回该英雄拥有者所有的金钱数量 |
GetGoldBounty | int GetGoldBounty()
|
No Description Set |
GetHealthRegen | float GetHealthRegen()
|
返回每秒生命回复,英雄生命回复受到属性影响 |
GetIncreasedAttackSpeed | float GetIncreasedAttackSpeed()
|
返回攻击速度增加值(IAS),英雄攻击速度受到敏捷影响 |
GetIntellect | float GetIntellect()
|
返回智力值 |
GetIntellectGain | float GetIntellectGain()
|
返回智力成长 |
GetKills | int GetKills()
|
返回击杀数,数值存储在玩家资源(PlayerResource)中 |
GetLastHits | int GetLastHits()
|
返回正补数,数值存储在玩家资源(PlayerResource)中 |
GetManaRegen | float GetManaRegen()
|
返回每秒魔法回复,英雄魔法回复受到属性影响 |
GetMostRecentDamageTime | float GetMostRecentDamageTime()
|
返回最近一次伤害时间 |
GetMultipleKillCount | int GetMultipleKillCount()
|
返回多杀计数 |
GetNumAttackers | int GetNumAttackers()
|
No Description Set |
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()
|
No Description Set |
HasRoomForItem | int HasRoomForItem(string a, bool b, bool c)
|
参数: const char* pItemName, bool bIncludeStashCombines, bool bAllowSelling |
HeroLevelUp | void HeroLevelUp(bool a)
|
升级英雄, 参数决定是否播放升级效果. |
IncrementAssists | void IncrementAssists()
|
数值存储在玩家资源(PlayerResource)中 |
IncrementDeaths | void IncrementDeaths()
|
数值存储在玩家资源(PlayerResource)中 |
IncrementDenies | void IncrementDenies()
|
数值存储在玩家资源(PlayerResource)中 |
IncrementKills | void IncrementKills(int kills)
|
增加击杀数,击杀者为当前英雄,传入ID为受害者ID。数值存储在玩家资源(PlayerResource)中 |
IncrementLastHitMultikill | void IncrementLastHitMultikill()
|
数值存储在玩家资源(PlayerResource)中 |
IncrementLastHits | void IncrementLastHits()
|
数值存储在玩家资源(PlayerResource)中 |
IncrementLastHitStreak | void IncrementLastHitStreak()
|
数值存储在玩家资源(PlayerResource)中 |
IncrementNearbyCreepDeaths | void IncrementNearbyCreepDeaths()
|
数值存储在玩家资源(PlayerResource)中 |
IncrementStreak | void IncrementStreak()
|
数值存储在玩家资源(PlayerResource)中 |
IsBuybackDisabledByReapersScythe | bool IsBuybackDisabledByReapersScythe()
|
是否被死神镰刀禁止买活 |
IsReincarnating | bool IsReincarnating()
|
是否处于重生中 |
KilledHero | void KilledHero(handle a, handle b)
|
参数: 英雄, 加害者 |
ModifyAgility | void ModifyAgility(float a)
|
增加指定值到英雄基础敏捷,随后调用CalculateStatBonus |
ModifyGold | int ModifyGold(int goldAmmt, bool reliable, int reason)
|
给予英雄金钱。参数: int 金钱数, bool 是否为可靠金钱, int 原因 |
ModifyIntellect | void ModifyIntellect(float a)
|
增加指定值到英雄基础智力,随后调用CalculateStatBonus |
ModifyStrength | void ModifyStrength(float a)
|
增加指定值到英雄基础力量,随后调用CalculateStatBonus |
PerformTaunt | void PerformTaunt()
|
No Description Set |
RecordLastHit | void RecordLastHit()
|
No Description Set |
RespawnHero | void RespawnHero(bool buyback, bool 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)
|
No Description Set |
SetRespawnPosition | void SetRespawnPosition(Vector a)
|
No Description Set |
SetTimeUntilRespawn | void SetTimeUntilRespawn(float a)
|
No Description Set |
ShouldDoFlyHeightVisual | bool ShouldDoFlyHeightVisual()
|
No Description Set |
SpendGold | void SpendGold(int amount, int reason)
|
参数: int 金钱, int 原因 |
UnitCanRespawn | bool UnitCanRespawn()
|
No Description Set |
UpgradeAbility | void UpgradeAbility(handle a)
|
升级指定技能,需要英雄拥有该技能和技能点 |
WillReincarnate | bool WillReincarnate()
|
No Description Set |
CDOTA_BaseNPC_Creature
- extends CDOTA_BaseNPC
No Description Set
函数名 | 函数原型 | 解释 |
---|---|---|
AddItemDrop | void AddItemDrop(handle a)
|
为该生物添加特别的道具掉落 |
CreatureLevelUp | void CreatureLevelUp(int a)
|
升级目标生物指定级别 |
IsChampion | bool IsChampion()
|
是否为冠军生物 |
SetArmorGain | void SetArmorGain(float a)
|
设置该生物每级增加的护甲 |
SetAttackTimeGain | void SetAttackTimeGain(float a)
|
设置该生物每级增加的攻击速度 |
SetBountyGain | void SetBountyGain(int a)
|
设置该生物每级增加的奖励金币 |
SetChampion | void SetChampion(bool a)
|
将该生物标记为冠军生物 |
SetDamageGain | void SetDamageGain(int a)
|
设置该生物每级增加的攻击伤害 |
SetDisableResistanceGain | void SetDisableResistanceGain(float a)
|
设置该生物每级增加的控制抗性 |
SetHPGain | void SetHPGain(int a)
|
设置该生物每级增加的生命值 |
SetHPRegenGain | void SetHPRegenGain(float a)
|
设置该生物每级增加的生命回复 |
SetMagicResistanceGain | void SetMagicResistanceGain(float a)
|
设置该生物每级增加的魔法抗性 |
SetManaGain | void SetManaGain(int a)
|
设置该生物每级增加的魔法值 |
SetManaRegenGain | void SetManaRegenGain(float a)
|
设置该生物每级增加的魔法回复 |
SetMoveSpeedGain | void SetMoveSpeedGain(int a)
|
设置该生物每级增加的移动速度 |
SetXPGain | void SetXPGain(int a)
|
设置该生物每级增加的经验值 |
CDOTA_BaseNPC_Building
- extends CDOTA_BaseNPC
No Description Set
函数名 | 函数原型 | 解释 |
---|---|---|
GetInvulnCount | int GetInvulnCount()
|
返回建筑无敌计数 |
SetInvulnCount | void SetInvulnCount(int a)
|
设置建筑无敌计数 |
CRPG_Unit
No Description Set
函数名 | 函数原型 | 解释 |
---|---|---|
ActionState | handle ActionState()
|
返回该单位的ActionState物体 |
ClearMovementTarget | void ClearMovementTarget()
|
清除移动目标实体或点 |
FindSensedEnemies | table FindSensedEnemies()
|
返回该单位视野锥或感应球体内所有敌方单位列表 |
GetMaxSpeed | float GetMaxSpeed()
|
返回最大移动速度 |
GetMaxStamina | float GetMaxStamina()
|
返回最大耐力值 |
GetMovementTargetEntity | handle GetMovementTargetEntity()
|
返回移动目标实体,如果已经设置移动目标实体 |
GetSensingSphereRange | float GetSensingSphereRange()
|
返回单位的360度感应球体范围 |
GetSightConeAngle | float GetSightConeAngle()
|
返回单位视野锥的夹角 |
GetSightConeRange | float GetSightConeRange()
|
返回单位视野锥的范围 |
GetStamina | float GetStamina()
|
返回当前耐力值 |
GetTurnRate | float GetTurnRate()
|
返回单位转身速度,单位为度每秒 |
GetUnitName | string GetUnitName()
|
返回单位名字 |
GrantItem | void GrantItem(string a, bool b)
|
授予单位物品 |
IsBlocking | bool IsBlocking()
|
单位是否正在格挡(不确定) |
IsFacing | bool IsFacing(Vector a, float b)
|
参数为(Vector目标点,float允许角度差)如果单位朝向目标角度低于角度差则返还true |
SetBlocking | void SetBlocking(bool a)
|
设置单位格挡状态(不确定) |
SetMaxSpeed | void SetMaxSpeed(float a)
|
设置单位最大速度 |
SetMovementTargetEntity | void SetMovementTargetEntity(handle a, float b)
|
参数为(目标实体,跟随范围)单位向目标实体移动直到抵达指定范围内 |
SetMovementTargetPosition | void SetMovementTargetPosition(Vector a, float b)
|
参数为(目标点,跟随范围)单位向目标点移动直到抵达指定范围内 |
SetSensingSphereRange | void SetSensingSphereRange(float a)
|
设置单位的360度感应球体范围 |
SetSightConeAngle | void SetSightConeAngle(float a)
|
设置单位的视野锥夹角 |
SetSightConeRange | void SetSightConeRange(float a)
|
设置单位的视野锥范围 |
SetTurnRate | void SetTurnRate(float a)
|
设置单位转向速率(度每秒) |
CDOTABaseGameMode
- extends CBaseEntity
No Description Set
函数名 | 函数原型 | 解释 |
---|---|---|
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)
|
No Description Set |
SetAnimation | void SetAnimation(string a)
|
输入动画名称播放动作,需要模型拥有该动画 |
SetBodyGroup | void SetBodyGroup(string a)
|
No Description Set |
SetMaterialGroup | void SetMaterialGroup(utlstringtoken a)
|
No Description Set |
SetVelocity | void SetVelocity(Vector velocity)
|
No Description Set |
CBaseAnimating
- extends CBaseEntity
A class containing functions involved in animations
函数名 | 函数原型 | 解释 |
---|---|---|
GetAttachmentAngles | Vector GetAttachmentAngles(int a)
|
获得指定ID附件的角度,返回vector(p,y,r) |
GetAttachmentOrigin | Vector GetAttachmentOrigin(int a)
|
获得指定ID附件的源vector |
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)
|
No Description Set |
ReleaseParticleIndex | void ReleaseParticleIndex(int particleId)
|
施放指定粒子特效索引号 |
SetParticleAlwaysSimulate | void SetParticleAlwaysSimulate(int a)
|
No Description Set |
SetParticleControl | void SetParticleControl(int particleId, int controlIndex, Vector controlData)
|
设置控制粒子特效的控制点数据 |
SetParticleControlEnt | void SetParticleControlEnt(int a, int b, handle c, int d, string e, Vector f, bool g)
|
No Description Set |
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?))
|
在左侧文本框显示一行文本,通常用来提示死亡、反补队友、买活等信息。使用严格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) |
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 )
|
砍掉这棵树 |
CutDownRegrowAfter | void CutDownRegrowAfter(float RegrowAfter, int TeamNumberKnownTo )
|
砍掉这棵树,一段时间后再生 |
GrowBack | void GrowBack()
|
再生一棵被砍掉的树 |
IsStanding | bool IsStanding()
|
如果树站立着返回true,如果被砍掉返回false |
CDOTA_SimpleObstruction
- extends CBaseEntity
An obstruction on the map that effects the gridnav
函数名 | 函数原型 | 解释 |
---|---|---|
IsEnabled | bool IsEnabled()
|
Returns whether the obstruction is currently active |
SetEnabled | void SetEnabled(bool enabled, bool b)
|
Enable or disable the obstruction |