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

From Valve Developer Community
Jump to: navigation, search
(Created page with "{{Note | This page is automatically generated. Any changes may be overwritten}} ==='''Accessing the DOTA 2 Scripting API from Lua=== While Lua is [http://en.wikipedia.org/wi...")
 
m
Line 1: Line 1:
 +
{{otherlang2
 +
|title = API
 +
|en = Dota_2_Workshop_Tools/Scripting/API
 +
}}
 
{{Note | This page is automatically generated.  Any changes may be overwritten}}
 
{{Note | This page is automatically generated.  Any changes may be overwritten}}
 
    
 
    
Line 4,767: Line 4,771:
 
| SetStr(name, val) : sets the value of the convar to the ''string''.
 
| SetStr(name, val) : sets the value of the convar to the ''string''.
 
|}
 
|}
 +
[[Category:Dota 2 创意工坊工具集]]
 +
[[Category:AMHC 汉化]]

Revision as of 06:32, 6 September 2014

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

Accessing the DOTA 2 Scripting API from Lua

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

Global

Global functions. These can be called without any class

Function Signature Description
AngleDiff float AngleDiff(float ang1, float ang2) Returns the number of degrees difference between two yaw angles
AppendToLogFile void AppendToLogFile(string a, string b) Appends a string to a log file on the server
ApplyDamage float ApplyDamage(handle DamageTable) Pass table - Inputs: victim, attacker, damage, damage_type, damage_flags, abilityReturn damage done.
AxisAngleToQuaternion Quaternion AxisAngleToQuaternion(Vector a, float b) (vector,float) constructs a quaternion representing a rotation by angle around the specified vector axis
CancelEntityIOEvents void CancelEntityIOEvents(ehandle a) Create all I/O events for a particular entity
CreateEffect bool CreateEffect(handle a) Pass table - Inputs: entity, effect
CreateHeroForPlayer handle CreateHeroForPlayer(string a, handle b) Creates a DOTA hero by its dota_npc_units.txt name and sets it as the given player's controlled hero
CreateItem handle CreateItem(string item_name, handle owner, handle owner) Creates an item with classname item_name that owner can use.
CreateItemOnPositionSync handle CreateItemOnPositionSync(Vector a, handle b) Create a physical item at a given location
CreateTrigger handle CreateTrigger(Vector a, Vector b, Vector c) CreateTrigger( vecMin, vecMax ) : Creates and returns an AABB trigger
CreateTriggerRadiusApproximate handle CreateTriggerRadiusApproximate(Vector a, float b) CreateTriggerRadiusApproximate( vecOrigin, flRadius ) : Creates and returns an AABB trigger thats bigger than the radius provided
CreateUnitByName handle CreateUnitByName(string a, Vector b, bool c, handle d, handle e, int f) Creates a DOTA unit by its dota_npc_units.txt name ( szUnitName, vLocation, bFindClearSpace, hNPCOwner, hUnitOwner, iTeamNumber )
CreateUnitByNameAsync int CreateUnitByNameAsync(string a, Vector b, bool c, handle d, handle e, int f, handle g) Creates a DOTA unit by its dota_npc_units.txt name ( szUnitName, vLocation, bFindClearSpace, hNPCOwner, hUnitOwner, iTeamNumber, hCallback )
cvar_getf float cvar_getf(string a) Gets the value of the given cvar, as a float.
cvar_setf bool cvar_setf(string a, float b) Sets the value of the given cvar, as a float.
DebugBreak void DebugBreak() Breaks in the debugger
DebugDrawBox void DebugDrawBox(Vector a, Vector b, Vector c, int d, int e, int f, int g, float h) Draw a debug overlay box (origin, mins, maxs, forward, r, g, b, a, duration )
DebugDrawBoxDirection void DebugDrawBoxDirection(Vector a, Vector b, Vector c, Vector d, Vector e, float f, float g) Draw a debug forward box (cent, min, max, forward, vRgb, a, duration)
DebugDrawCircle void DebugDrawCircle(Vector a, Vector b, float c, float d, bool e, float f) Draw a debug circle (center, vRgb, a, rad, ztest, duration)
DebugDrawClear void DebugDrawClear() Try to clear all the debug overlay info
DebugDrawLine void DebugDrawLine(Vector a, Vector b, int c, int d, int e, bool f, float g) Draw a debug overlay line (origin, target, r, g, b, ztest, duration)
DebugDrawLine_vCol void DebugDrawLine_vCol(Vector a, Vector b, Vector c, bool d, float e) Draw a debug line using color vec (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) Draw text with a line offset (x, y, lineOffset, text, r, g, b, a, duration)
DebugDrawSphere void DebugDrawSphere(Vector a, Vector b, float c, float d, bool e, float f) Draw a debug sphere (center, vRgb, a, rad, ztest, duration)
DebugDrawText void DebugDrawText(Vector a, string b, bool c, float d) Draw text in 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) Draw pretty debug text (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: Generate an entity i/o event ( szTarget, szAction, szValue, flDelay, hActivator, hCaller )
DoEntFireByInstanceHandle void DoEntFireByInstanceHandle(handle a, string b, string c, float d, handle e, handle f) EntFireByHandle:Generate and entity i/o event
DoIncludeScript bool DoIncludeScript(string a, handle b) Execute a script (internal)
DoScriptAssert void DoScriptAssert(bool a, string b) ScriptAssert:Asserts the passed in value. Prints out a message and brings up the assert dialog.
DoUniqueString string DoUniqueString(string a) UniqueString:Generate a string guaranteed to be unique across the life of the script VM, with an optional root string. Useful for adding data to table's when not sure what keys are already in use in that table.
EmitGlobalSound void EmitGlobalSound(string a) Play named sound for all players
EmitSoundOn void EmitSoundOn(string a, handle b) Play named sound on Entity
EmitSoundOnClient void EmitSoundOnClient(string a, handle b) Play named sound only on the client for the passed in player
EntIndexToHScript handle EntIndexToHScript(int a) Turn an entity index integer to an HScript representing that entity's script instance.
ExecuteOrderFromTable void ExecuteOrderFromTable(handle a) Issue an order from a script table
ExponentialDecay float ExponentialDecay(float a, float b, float c) Smooth curve decreasing slower as it approaches zero
FileToString string FileToString(string a) Reads a string from a file to send to script
FindClearSpaceForUnit void FindClearSpaceForUnit(handle a, Vector b, bool c) Place a unit somewhere not already occupied.
FindUnitsInRadius table FindUnitsInRadius(int a, Vector b, handle c, float d, int e, int f, int g, int h, bool i) Finds the units in a given radius with the given flags. ( iTeamNumber, vPosition, hCacheUnit, flRadius, iTeamFilter, iTypeFilter, iFlagFilter, iOrder, bCanGrowCache )
FireEntityIOInputNameOnly void FireEntityIOInputNameOnly(ehandle a, string b) Fire Entity's Action Input w/no data
FireEntityIOInputString void FireEntityIOInputString(ehandle a, string b, string c) Fire Entity's Action Input with passed String - you own the memory
FireEntityIOInputVec void FireEntityIOInputVec(ehandle a, string b, Vector c) Fire Entity's Action Input with passed Vector ( hEntity, szActionName, vector )
FireGameEvent void FireGameEvent(string eventName, handle parameterTable) Fire a pre-defined event, which can be found either in custom_events.txt or in dota's resource/*.res
FireGameEventLocal void FireGameEventLocal(string a, handle b) Fire a game event without broadcasting to the client.
FrameTime float FrameTime() Get the time spent on the server in the last frame
GetFrameCount int GetFrameCount() Returns the engines current frame count
GetFrostyBoostAmount float GetFrostyBoostAmount(int a, int b) 暂无描述
GetFrostyPointsForRound int GetFrostyPointsForRound(int a, int b, int c) 暂无描述
GetGoldFrostyBoostAmount float GetGoldFrostyBoostAmount(int a, int b) 暂无描述
GetGoldFrostyPointsForRound int GetGoldFrostyPointsForRound(int a, int b, int c) 暂无描述
GetGroundPosition Vector GetGroundPosition(Vector a, handle b) Returns the supplied position moved to the ground. Second parameter is an NPC for measuring movement collision hull offset.
GetListenServerHost handle GetListenServerHost() Get the local player on a listen server.
GetMapName string GetMapName() Get the name of the map.
GetMaxOutputDelay float GetMaxOutputDelay(ehandle a, string b) Get the longest delay for all events attached to an output
GetPhysAngularVelocity Vector GetPhysAngularVelocity(handle a) Get Angular Velocity for VPHYS or normal object
GetPhysVelocity Vector GetPhysVelocity(handle a) Get Velocity for VPHYS or normal object
GetSystemDate string GetSystemDate() Get the current real world date
GetSystemTime string GetSystemTime() Get the current real world time
GetWorldMaxX float GetWorldMaxX() Gets the world's maximum X position.
GetWorldMaxY float GetWorldMaxY() Gets the world's maximum Y position.
GetWorldMinX float GetWorldMinX() Gets the world's minimum X position.
GetWorldMinY float GetWorldMinY() Gets the world's minimum Y position.
InitLogFile void InitLogFile(string a, string b) If the given file doesn't exist, creates it with the given contents; does nothing if it exists
IsDedicatedServer bool IsDedicatedServer() Returns true if this server is a dedicated server.
IsMarkedForDeletion bool IsMarkedForDeletion(handle a) Returns true if the entity is valid and marked for deletion.
IsValidEntity bool IsValidEntity(handle a) Checks to see if the given hScript is a valid entity
ListenToGameEvent int ListenToGameEvent(string a, handle b, handle c) Register as a listener for a game event from script. ( szEventName, hFunctionNameToCall, hContext )
Tip:In addition to listening for standard engine events, you can also create your own events by placing them in /scripts/custom_events.txt.
LoadKeyValues table LoadKeyValues(string a) Creates a table from the specified keyvalues text file
LoadKeyValuesFromString table LoadKeyValuesFromString(string a) Creates a table from the specified keyvalues string
MakeStringToken int MakeStringToken(string a) Checks to see if the given hScript is a valid entity
Msg void Msg(string a) Print a message
PauseGame void PauseGame(bool a) Pause or unpause the game.
PlayerInstanceFromIndex handle PlayerInstanceFromIndex(int a) Get a script instance of a player by index.
PrecacheEntityFromTable void PrecacheEntityFromTable(string a, handle b, handle c) Precache an entity from KeyValues in table
PrecacheEntityListFromTable void PrecacheEntityListFromTable(handle a, handle b) Precache a list of entity KeyValues table's
PrecacheItemByNameAsync void PrecacheItemByNameAsync(string a, handle b) Asynchronously precaches a DOTA item by its dota_npc_items.txt name, provides a callback when it's finished.
PrecacheItemByNameSync void PrecacheItemByNameSync(string a, handle b) Precaches a DOTA item by its dota_npc_items.txt name
PrecacheModel void PrecacheModel(string a, handle b) ( modelName, context ) - Manually precache a single model
PrecacheResource void PrecacheResource(string a, string b, handle c) Manually precache a single resource
PrecacheUnitByNameAsync void PrecacheUnitByNameAsync(string a, handle b) Asynchronously precaches a DOTA unit by its dota_npc_units.txt name, provides a callback when it's finished.
PrecacheUnitByNameSync void PrecacheUnitByNameSync(string a, handle b) Precaches a DOTA unit by its dota_npc_units.txt name
PrintLinkedConsoleMessage void PrintLinkedConsoleMessage(string a, string b) Print a console message with a linked console command
RandomFloat float RandomFloat(float a, float b) Get a random float within a range
RandomInt int RandomInt(int a, int b) Get a random int within a range
RandomVector Vector RandomVector(float a) Get a random 2D vector. Argument (float) is the minimum length of the returned vector.
RegisterSpawnGroupFilterProxy void RegisterSpawnGroupFilterProxy(string a) Create a C proxy for a script-based spawn group filter
ReloadMOTD void ReloadMOTD() Reloads the MotD file
RemoveSpawnGroupFilterProxy void RemoveSpawnGroupFilterProxy(string a) Remove the C proxy for a script-based spawn group filter
RollPercentage bool RollPercentage(int a) Rolls a number from 1 to 100 and returns true if the roll is less than or equal to the number specified
RotateOrientation QAngle RotateOrientation(QAngle a, QAngle b) Rotate a QAngle by another QAngle.
RotatePosition Vector RotatePosition(Vector a, QAngle b, Vector c) Rotate a Vector around a point.
RotateQuaternionByAxisAngle Quaternion RotateQuaternionByAxisAngle(Quaternion a, Vector b, float c) Rotates a quaternion by the specified angle around the specified vector axis
RotationDelta QAngle RotationDelta(QAngle a, QAngle b) Find the delta between two QAngles.
rr_AddDecisionRule bool rr_AddDecisionRule(handle a) Add a rule to the decision database.
rr_CommitAIResponse bool rr_CommitAIResponse(handle a, handle b) Commit the result of QueryBestResponse back to the given entity to play. Call with params (entity, airesponse)
rr_GetResponseTargets handle rr_GetResponseTargets() Retrieve a table of all available expresser targets, in the form { name : handle, name: handle }.
rr_QueryBestResponse bool rr_QueryBestResponse(handle a, handle b, handle c) Params: ( hEnt, hQuery, hResult ) // Static : tests 'query' against entity's response system and returns the best response found (or nil if none found).
Say void Say(handle entity, string message, bool teamOnly) Have Entity say string, and teamOnly or not
ScreenShake void ScreenShake(Vector a, float b, float c, float d, float e, int f, bool g) Start a screenshake with the following parameters. vecCenter, flAmplitude, flFrequency, flDuration, flRadius, eCommand( SHAKE_START = 0, SHAKE_STOP = 1 ), bAirShake
SendFrostivusTimeElapsedToGC void SendFrostivusTimeElapsedToGC() 暂无描述
SendFrostyPointsMessageToGC void SendFrostyPointsMessageToGC(handle a) 暂无描述
SendToConsole void SendToConsole(string a) Send a string to the console as a client command
SendToServerConsole void SendToServerConsole(string a) Send a string to the console as a server command
SetOpvarFloatAll void SetOpvarFloatAll(string a, string b, string c, float d) Sets an opvar value for all players
SetOpvarFloatPlayer void SetOpvarFloatPlayer(string a, string b, string c, float d, handle e) Sets an opvar value for a single player ( szStackName, szOperatorName, szOpvarName, flOpvarValue, hEnt )
SetQuestName void SetQuestName(string a) Set the current quest name.
SetQuestPhase void SetQuestPhase(int a) Set the current quest phase.
SetRenderingEnabled void SetRenderingEnabled(ehandle a, bool b) Set rendering on/off for an ehandle
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) Show a generic popup dialog to a specific player.
ShowMessage void ShowMessage(string a) Print a hud message on all clients
SpawnEntityFromTableSynchronous handle SpawnEntityFromTableSynchronous(string a, handle b) Synchronously spawns a single entity from a table
SpawnEntityGroupFromTable bool SpawnEntityGroupFromTable(handle groupSpawnTables, bool bAsync, handle hCallback) Hierarchically spawn an entity group from a set of spawn tables.
SpawnEntityListFromTableAsynchronous int SpawnEntityListFromTableAsynchronous(handle a, handle b) Asynchronously spawn an entity group from a list of spawn table's. A callback will be triggered when the spawning is complete
SpawnEntityListFromTableSynchronous handle SpawnEntityListFromTableSynchronous(handle a) Synchronously spawn an entity group from a list of spawn table's.
SplineQuaternions Quaternion SplineQuaternions(Quaternion a, Quaternion b, float c) (quaternion,quaternion,float) very basic interpolation of v0 to v1 over t on [0,1]
SplineVectors Vector SplineVectors(Vector a, Vector b, float c) (vector,vector,float) very basic interpolation of v0 to v1 over t on [0,1]
StartSoundEvent void StartSoundEvent(string a, handle b) Start a sound event
StopEffect void StopEffect(handle a, string b) (hEntity, szEffectName)
StopListeningToAllGameEvents void StopListeningToAllGameEvents(handle a) Stop listening to all game events within a specific context.
StopListeningToGameEvent bool StopListeningToGameEvent(int a) Stop listening to a particular game event.
StopSoundEvent void StopSoundEvent(string a, handle b) Stops a sound event
StopSoundOn void StopSoundOn(string soundName, handle playingEntity) Stop named sound on Entity
StringToFile bool StringToFile(string a, string b) Store a string to a file for later reading
Time float Time() Get the current server time
TraceCollideable bool TraceCollideable(handle a) Pass table - Inputs: start, end, ent, (optional mins, maxs) -- outputs: pos, fraction, hit, startsolid, normal
TraceHull bool TraceHull(handle a) Pass table - Inputs: start, end, min, max, mask, ignore -- outputs: pos, fraction, hit, enthit, startsolid
TraceLine bool TraceLine(handle a) Pass table - Inputs: startpos, endpos, mask, ignore -- outputs: pos, fraction, hit, enthit, startsolid
UnloadSpawnGroup void UnloadSpawnGroup(string a) Unload a spawn group by name
UnloadSpawnGroupByHandle void UnloadSpawnGroupByHandle(int a) Unload a spawn group by handle
UpdateEventPoints void UpdateEventPoints(handle a) 暂无描述
UTIL_Remove void UTIL_Remove(handle a) Removes the specified entity
UTIL_RemoveImmediate void UTIL_RemoveImmediate(handle a) Immediately removes the specified entity
VectorToAngles QAngle VectorToAngles(Vector a) Get Qangles (with no roll) for a Vector.
Warning void Warning(string a) Print a warning


CBaseEntity

The base class for stuff

Function Signature Description
ApplyAbsVelocityImpulse void ApplyAbsVelocityImpulse(Vector a) Apply a Velocity Impulse
ApplyLocalAngularVelocityImpulse void ApplyLocalAngularVelocityImpulse(Vector a) Apply an Ang Velocity Impulse
EmitSound void EmitSound(string soundName)
EmitSoundParams void EmitSoundParams(string soundName, int pitch, float volume, float soundTime) Plays/modifies a sound from this entity. changes sound if Pitch and/or Volume or SoundTime is > 0.
EyeAngles QAngle EyeAngles() Get the qangles that this entity is looking at.
EyePosition Vector EyePosition() Get vector to eye position - absolute coords
FirstMoveChild handle FirstMoveChild() 暂无描述
GatherCriteria void GatherCriteria(handle a) Returns a table containing the criteria that would be used for response queries on this entity. This is the same as the table that is passed to response rule script function callbacks.
GetAbsOrigin Vector GetAbsOrigin() 暂无描述
GetAngles QAngle GetAngles() 暂无描述
GetAnglesAsVector Vector GetAnglesAsVector() Get entity pitch, yaw, roll as a vector
GetAngularVelocity Vector GetAngularVelocity() Get the local angular velocity - returns a vector of pitch,yaw,roll
GetBaseVelocity Vector GetBaseVelocity() Get Base velocity
GetBoundingMaxs Vector GetBoundingMaxs() Get a vector containing max bounds, centered on object
GetBoundingMins Vector GetBoundingMins() Get a vector containing min bounds, centered on object
GetBounds table GetBounds() Get a table containing the 'Mins' & 'Maxs' vector bounds, centered on object
GetCenter Vector GetCenter() Get vector to center of object - absolute coords
GetChildren handle GetChildren() Get the entities parented to this entity.
GetContext table GetContext(string a) GetContext( name ): looks up a context and returns it if available. May return string, float, or nil (if the context isn't found)
GetForwardVector Vector GetForwardVector() Get the forward vector of the entity
GetHealth int GetHealth() 暂无描述
GetLocalAngularVelocity QAngle GetLocalAngularVelocity() Maybe local angvel
GetLocalVelocity Vector GetLocalVelocity() Get Entity relative velocity
GetMaxHealth int GetMaxHealth() 暂无描述
GetModelName string GetModelName() Returns the name of the model
GetMoveParent handle GetMoveParent() If in hierarchy, retrieves the entity's parent
GetOrigin Vector GetOrigin() 暂无描述
GetOwner handle GetOwner() Gets this entity's owner
GetOwnerEntity handle GetOwnerEntity() Get the owner entity, if there is one
GetRightVector Vector GetRightVector() Get the right vector of the entity
GetRootMoveParent handle GetRootMoveParent() If in hierarchy, walks up the hierarchy to find the root parent
GetSoundDuration float GetSoundDuration(string soundName, string actormodelname) Returns float duration of the sound. Takes soundname and optional actormodelname.
GetTeam int GetTeam() 暂无描述
GetUpVector Vector GetUpVector() Get the up vector of the entity
GetVelocity Vector GetVelocity() 暂无描述
IsAlive bool IsAlive() 暂无描述。
IsPlayer bool IsPlayer() Is this a player entity?
Kill void Kill() 暂无描述
NextMovePeer handle NextMovePeer() 暂无描述
OverrideFriction void OverrideFriction(float a, float b) Takes duration, value for a temporary override
PrecacheScriptSound void PrecacheScriptSound(string a) Precache a sound for later playing.
SetAbsOrigin void SetAbsOrigin(Vector origin) SetAbsOrigin
SetAngles void SetAngles(float pitch, float yaw, float roll) Set entity pitch, yaw, roll
SetAngularVelocity void SetAngularVelocity(float pitch, float yaw, float roll) Set the local angular velocity - takes float pitch,yaw,roll velocities
SetContext void SetContext(string a, string b, float c) SetContext( name , value, duration ): store any key/value pair in this entity's dialog contexts. Value must be a string. Will last for duration (set 0 to mean 'forever').
SetContextNum void SetContextNum(string a, float b, float c) SetContext( name , value, duration ): store any key/value pair in this entity's dialog contexts. Value must be a number (int or float). Will last for duration (set 0 to mean 'forever').
SetContextThink void SetContextThink(string a, handle b, float c) Set a think function on this entity.
SetForwardVector void SetForwardVector(Vector forwardVec) Set the orientation of the entity to have this forward forwardVec
SetFriction void SetFriction(float a) Set PLAYER friction, ignored for objects
SetGravity void SetGravity(float a) Set PLAYER gravity, ignored for objects
SetHealth void SetHealth(int hp) 暂无描述
SetMaxHealth void SetMaxHealth(int maxHP) 暂无描述
SetModel void SetModel(string modelName) 暂无描述
SetOrigin void SetOrigin(Vector origin) 暂无描述
SetOwner void SetOwner(handle owningEntity) Sets this entity's owner
SetParent void SetParent(handle a, string b) Set the parent for this entity.
SetRenderColor void SetRenderColor(int a, int b, int c) SetRenderColor( r, g, b ): Sets the render color of the entity.
SetSize void SetSize(Vector a, Vector b) 暂无描述
SetTeam void SetTeam(int team) 暂无描述
SetVelocity void SetVelocity(Vector a) 暂无描述
StopSound void StopSound(string soundName) Stops a named sound playing from this entity.
Trigger void Trigger() Fires off this entity's OnTrigger responses


CEntities

暂无描述

Global accessor variable: Entities

Function Signature Description
CreateByClassname handle CreateByClassname(string className) Creates an entity by classname
FindAllByClassname table FindAllByClassname(string a) Finds all entities by class name. Returns an array containing all the found entities.
FindAllByClassnameWithin table FindAllByClassnameWithin(string a, Vector b, float c) Find entities by class name within a radius.
FindAllByModel table FindAllByModel(string modelName) Find entities by model name.
FindAllByName table FindAllByName(string name) Find all entities by name. Returns an array containing all the found entities in it.
FindAllByNameWithin table FindAllByNameWithin(string name, Vector origin, float maxRadius) Find entities by name within a radius.
FindAllByTarget table FindAllByTarget(string targetName) Find entities by targetname.
FindAllInSphere table FindAllInSphere(Vector origin, float maxRadius) Find entities within a radius.
FindByClassname handle FindByClassname(handle startFrom, string className) Find entities by class name. Pass nil to start an iteration, or reference to a previously found entity to continue a search
FindByClassnameNearest handle FindByClassnameNearest(string className, Vector origin, float maxRadius) Find entities by class name nearest to a point.
FindByClassnameWithin handle FindByClassnameWithin(handle startFrom, string className, Vector origin, float maxRadius) Find entities by class name within a radius. Pass nil to start an iteration, or reference to a previously found entity to continue a search
FindByModel handle FindByModel(handle startFrom, string modelName) Find entities by model name. Pass nil to start an iteration, or reference to a previously found entity to continue a search
FindByModelWithin handle FindByModelWithin(handle startFrom, string modelName, Vector origin, float maxRadius) Find entities by model name within a radius. Pass nil to start an iteration, or reference to a previously found entity to continue a search
FindByName handle FindByName(handle lastEnt, string searchString) Find entities by name. Pass nil to start an iteration, or reference to a previously found entity to continue a search
FindByNameNearest handle FindByNameNearest(string name, Vector origin, float maxRadius) Find entities by name nearest to a point.
FindByNameWithin handle FindByNameWithin(handle startFrom, string name, Vector origin, float maxRadius) Find entities by name within a radius. Pass nil to start an iteration, or reference to a previously found entity to continue a search
FindByTarget handle FindByTarget(handle startFrom, string targetName) Find entities by targetname. Pass nil to start an iteration, or reference to a previously found entity to continue a search
FindInSphere handle FindInSphere(handle startFrom, Vector origin, float maxRadius) Find entities within a radius. Pass nil to start an iteration, or reference to a previously found entity to continue a search
First handle First() Begin an iteration over the list of entities
Next handle Next(handle startFrom) Continue an iteration over the list of entities, providing reference to a previously found entity


CEntityInstance

暂无描述

Function Signature Description
ConnectOutput void ConnectOutput(string a, string b) Adds an I/O connection that will call the named function on this entity when the specified output fires.
Destroy void Destroy() 暂无描述
DisconnectOutput void DisconnectOutput(string a, string b) Removes a connected script function from an I/O event on this entity.
DisconnectRedirectedOutput void DisconnectRedirectedOutput(string a, string b, handle c) Removes a connected script function from an I/O event on the passed entity.
entindex int entindex() 暂无描述
FireOutput void FireOutput(string a, handle b, handle c, table d, float e) Fire an entity output
GetClassname string GetClassname() 暂无描述
GetDebugName string GetDebugName() Get the entity name w/help if not defined (i.e. classname/etc)
GetEntityHandle ehandle GetEntityHandle() Get the entity as an EHANDLE
GetEntityIndex int GetEntityIndex() 暂无描述
GetIntAttr int GetIntAttr(string a) Get Integer Attribute
GetName string GetName() 暂无描述
GetOrCreatePrivateScriptScope handle GetOrCreatePrivateScriptScope() Retrieve, creating if necessary, the private per-instance script-side data associated with an entity
GetOrCreatePublicScriptScope handle GetOrCreatePublicScriptScope() Retrieve, creating if necessary, the public script-side data associated with an entity
GetPrivateScriptScope handle GetPrivateScriptScope() Retrieve the private per-instance script-side data associated with an entity
GetPublicScriptScope handle GetPublicScriptScope() Retrieve the public script-side data associated with an entity
RedirectOutput void RedirectOutput(string a, string b, handle c) Adds an I/O connection that will call the named function on the passed entity when the specified output fires.
RemoveSelf void RemoveSelf() Delete this entity
SetIntAttr void SetIntAttr(string a, int b) Set Integer Attribute


CDOTABaseAbility

extends CBaseEntity

暂无描述

Function Signature Description
CastAbility void CastAbility() 暂无描述
ContinueCasting bool ContinueCasting() 暂无描述
CreateVisibilityNode void CreateVisibilityNode(Vector a, float b, float c) 暂无描述
DecrementModifierRefCount void DecrementModifierRefCount() 暂无描述
EndChannel void EndChannel(bool a) Param: bool bInterrupted
EndCooldown void EndCooldown() Clear the cooldown remaining on this ability.
GetAbilityDamage int GetAbilityDamage() 暂无描述
GetAbilityDamageType int GetAbilityDamageType() 暂无描述
GetAbilityIndex int GetAbilityIndex() 暂无描述
GetAbilityName string GetAbilityName() 暂无描述
GetAbilityTargetFlags int GetAbilityTargetFlags() 暂无描述
GetAbilityTargetTeam int GetAbilityTargetTeam() 暂无描述
GetAbilityTargetType int GetAbilityTargetType() 暂无描述
GetAbilityType int GetAbilityType() 暂无描述
GetAnimationIgnoresModelScale bool GetAnimationIgnoresModelScale() 暂无描述
GetAssociatedPrimaryAbilities string GetAssociatedPrimaryAbilities() 暂无描述
GetAssociatedSecondaryAbilities string GetAssociatedSecondaryAbilities() 暂无描述
GetAutoCastState bool GetAutoCastState() 暂无描述
GetBackswingTime float GetBackswingTime() 暂无描述
GetBehavior int GetBehavior() 暂无描述
GetCaster handle GetCaster() 暂无描述
GetCastPoint float GetCastPoint() 暂无描述
GetCastRange int GetCastRange() 暂无描述
GetChannelledManaCostPerSecond int GetChannelledManaCostPerSecond(int a) 暂无描述
GetChannelStartTime float GetChannelStartTime() 暂无描述
GetChannelTime float GetChannelTime() 暂无描述
GetCloneSource handle GetCloneSource() 暂无描述
GetConceptRecipientType int GetConceptRecipientType() 暂无描述
GetCooldown float GetCooldown(int a) Get the cooldown duration for this ability at a given level, not the amount of cooldown actually left.
GetCooldownTime float GetCooldownTime() 暂无描述
GetCooldownTimeRemaining float GetCooldownTimeRemaining() 暂无描述
GetCursorPosition Vector GetCursorPosition() 暂无描述
GetCursorTarget handle GetCursorTarget() 暂无描述
GetCursorTargetingNothing bool GetCursorTargetingNothing() 暂无描述
GetDuration float GetDuration() 暂无描述
GetGoldCost int GetGoldCost(int a) 暂无描述
GetGoldCostForUpgrade int GetGoldCostForUpgrade(int a) 暂无描述
GetHeroLevelRequiredToUpgrade int GetHeroLevelRequiredToUpgrade() 暂无描述
GetIntrinsicModifierName string GetIntrinsicModifierName() 暂无描述
GetLevel int GetLevel() Get the current level of the ability
GetLevelSpecialValueFor table GetLevelSpecialValueFor(string a, int b) 暂无描述
GetManaCost int GetManaCost(int a) 暂无描述
GetMaxLevel int GetMaxLevel() 暂无描述
GetModifierValue float GetModifierValue() 暂无描述
GetModifierValueBonus float GetModifierValueBonus() 暂无描述
GetPlaybackRateOverride float GetPlaybackRateOverride() 暂无描述
GetSharedCooldownName string GetSharedCooldownName() 暂无描述
GetSpecialValueFor table GetSpecialValueFor(string a) 暂无描述
GetStolenActivityModifier string GetStolenActivityModifier() 暂无描述
GetToggleState bool GetToggleState() 暂无描述
HeroXPChange bool HeroXPChange(float a) 暂无描述
IncrementModifierRefCount void IncrementModifierRefCount() 暂无描述
IsActivated bool IsActivated() 暂无描述
IsAttributeBonus bool IsAttributeBonus() 暂无描述
IsChanneling bool IsChanneling() Returns whether the ability is currently channeling.
IsCooldownReady bool IsCooldownReady() 暂无描述
IsCosmetic bool IsCosmetic() 暂无描述
IsFullyCastable bool IsFullyCastable() Returns whether the ability can be cast.
IsHidden bool IsHidden() 暂无描述
IsHiddenWhenStolen bool IsHiddenWhenStolen() 暂无描述
IsInAbilityPhase bool IsInAbilityPhase() Returns whether the ability is currently casting.
IsItem bool IsItem() 暂无描述
IsOwnersGoldEnough bool IsOwnersGoldEnough(int a) 暂无描述
IsOwnersGoldEnoughForUpgrade bool IsOwnersGoldEnoughForUpgrade() 暂无描述
IsOwnersManaEnough bool IsOwnersManaEnough() 暂无描述
IsPassive bool IsPassive() 暂无描述
IsSharedWithTeammates bool IsSharedWithTeammates() 暂无描述
IsStealable bool IsStealable() 暂无描述
IsStolen bool IsStolen() 暂无描述
IsToggle bool IsToggle() 暂无描述
IsTrained bool IsTrained() 暂无描述
MarkAbilityButtonDirty void MarkAbilityButtonDirty() Mark the ability button for this ability as needing a refresh
NumModifiersUsingAbility int NumModifiersUsingAbility() 暂无描述
OnAbilityPhaseInterrupted void OnAbilityPhaseInterrupted() 暂无描述
OnAbilityPhaseStart bool OnAbilityPhaseStart() 暂无描述
OnAbilityPinged void OnAbilityPinged() 暂无描述
OnChannelFinish void OnChannelFinish(bool a) 暂无描述
OnChannelThink void OnChannelThink(float a) 暂无描述
OnHeroCalculateStatBonus void OnHeroCalculateStatBonus() 暂无描述
OnHeroLevelUp void OnHeroLevelUp() 暂无描述
OnInventoryContentsChanged void OnInventoryContentsChanged() 暂无描述
OnOwnerDied void OnOwnerDied() 暂无描述
OnOwnerSpawned void OnOwnerSpawned() 暂无描述
OnSpellStart void OnSpellStart() 暂无描述
OnToggle void OnToggle() 暂无描述
OnUpgrade void OnUpgrade() 暂无描述
PayGoldCost void PayGoldCost() 暂无描述
PayGoldCostForUpgrade void PayGoldCostForUpgrade() 暂无描述
PayManaCost void PayManaCost() 暂无描述
PlaysDefaultAnimWhenStolen bool PlaysDefaultAnimWhenStolen() 暂无描述
ProcsMagicStick bool ProcsMagicStick() 暂无描述
RefCountsModifiers bool RefCountsModifiers() 暂无描述
RefundManaCost void RefundManaCost() 暂无描述
ResetToggleOnRespawn bool ResetToggleOnRespawn() 暂无描述
SetAbilityIndex void SetAbilityIndex(int a) 暂无描述
SetActivated void SetActivated(bool a) 暂无描述
SetChanneling void SetChanneling(bool a) 暂无描述
SetHidden void SetHidden(bool a) 暂无描述
SetInAbilityPhase void SetInAbilityPhase(bool a) 暂无描述
SetLevel void SetLevel(int a) Sets the level of this ability.
SetOverrideCastPoint void SetOverrideCastPoint(float a) 暂无描述
SetRefCountsModifiers void SetRefCountsModifiers(bool a) 暂无描述
SetStolen void SetStolen(bool a) 暂无描述
ShouldUseResources bool ShouldUseResources() 暂无描述
SpeakAbilityConcept void SpeakAbilityConcept(int a) 暂无描述
SpeakTrigger bool SpeakTrigger() 暂无描述
StartCooldown void StartCooldown(float a) param: flCooldown
ToggleAbility void ToggleAbility() 暂无描述
ToggleAutoCast void ToggleAutoCast() 暂无描述
UpgradeAbility void UpgradeAbility() 暂无描述
UseResources void UseResources(bool a, bool b, bool c) 暂无描述


CDOTA_Ability_Animation_Attack

extends CDOTABaseAbility

暂无描述

Function Signature Description
SetPlaybackRate void SetPlaybackRate(float a) Override playbackrate


CDOTA_Ability_Animation_TailSpin

extends CDOTABaseAbility

暂无描述

Function Signature Description
SetPlaybackRate void SetPlaybackRate(float a) Override playbackrate


CDOTA_Ability_Nian_Leap

extends CDOTABaseAbility

暂无描述

Function Signature Description
SetPlaybackRate void SetPlaybackRate(float a) Override playbackrate


CDOTA_Ability_Nian_Dive

extends CDOTABaseAbility

暂无描述

Function Signature Description
SetPlaybackRate void SetPlaybackRate(float a) Override playbackrate


CDOTA_Ability_Nian_Roar

extends CDOTABaseAbility

暂无描述

Function Signature Description
GetCastCount int GetCastCount() Number of times Nian has used the roar


CDOTA_Item

暂无描述

Function Signature Description
GetContainer handle GetContainer() Get the container for this item.
GetCost int GetCost() 暂无描述
GetCurrentCharges int GetCurrentCharges() Get the number of charges this item currently has.
GetInitialCharges int GetInitialCharges() Get the initial number of charges this item has.
GetPurchaser handle GetPurchaser() Get the purchaser for this item.
GetPurchaseTime float GetPurchaseTime() Get the purchase time of this item
GetShareability int GetShareability() 暂无描述
IsPermanent bool IsPermanent() Is this a permanent item?
LaunchLoot void LaunchLoot(bool a, float b, float c, Vector d) 暂无描述
SetCurrentCharges void SetCurrentCharges(int a) Set the number of charges on this item
SetPurchaser void SetPurchaser(handle a) Set the purchaser of record for this item.
SetPurchaseTime void SetPurchaseTime(float a) Set the purchase time of this item
SetStacksWithOtherOwners void SetStacksWithOtherOwners(bool a) 暂无描述
StacksWithOtherOwners bool StacksWithOtherOwners() 暂无描述
Think void Think() Think this item


CDOTA_Item_Physical

暂无描述

Function Signature Description
GetContainedItem handle GetContainedItem() Returned the contained item.
GetCreationTime float GetCreationTime() Returns the game time when this item was created in the world
SetContainedItem void SetContainedItem(handle a) Set the contained item.


CDOTA_Item_DataDriven

'

Function Signature Description
ApplyDataDrivenModifier void ApplyDataDrivenModifier(handle source, handle target, string modifier_name, handle modifierArgs)


CDOTA_Unit_Nian

暂无描述

Function Signature Description
GetHorn handle GetHorn() Is the Nian horn?
GetTail handle GetTail() Is the Nian's tail broken?
IsHornAlive bool IsHornAlive() Is the Nian's horn broken?
IsTailAlive bool IsTailAlive() Is the Nian's tail broken?


CBasePlayer

暂无描述

Function Signature Description
IsNoclipping bool IsNoclipping() Returns true if the player is in noclip mode.


CDOTAPlayer

暂无描述

Function Signature Description
GetAssignedHero handle GetAssignedHero() Get the player's hero.
GetControlledRPGUnit handle GetControlledRPGUnit() Get the RPG unit this player controls.
GetPlayerID int GetPlayerID() Get the player's official PlayerID; notably is -1 when the player isn't yet on a team.
MakeRandomHeroSelection void MakeRandomHeroSelection() Randoms this player's hero.
SetKillCamUnit void SetKillCamUnit(handle a) Set the kill cam unit for this hero.
SetMusicStatus void SetMusicStatus(int nMusicStatus, float flIntensity) Set the music status for this player, note this will only really apply if dota_music_battle_enable is off.


CDOTA_PlayerResource

暂无描述

Global accessor variable: PlayerResource

Function Signature Description
AddAegisPickup void AddAegisPickup(int a) 暂无描述
AddClaimedFarm void AddClaimedFarm(int a, float b) 暂无描述
AddGoldSpentOnSupport void AddGoldSpentOnSupport(int a, int b) 暂无描述
AddRunePickup void AddRunePickup(int a) 暂无描述
AreUnitsSharedWithPlayerID bool AreUnitsSharedWithPlayerID(int a, int b) 暂无描述
ClearKillsMatrix void ClearKillsMatrix(int a) 暂无描述
ClearLastHitMultikill void ClearLastHitMultikill(int a) 暂无描述
ClearLastHitStreak void ClearLastHitStreak(int a) 暂无描述
ClearRawPlayerDamageMatrix void ClearRawPlayerDamageMatrix(int a) 暂无描述
ClearStreak void ClearStreak(int a) 暂无描述
GetAegisPickups int GetAegisPickups(int a) 暂无描述
GetAssists int GetAssists(int a) 暂无描述
GetBroadcasterChannel <> GetBroadcasterChannel(int a) 暂无描述
GetBroadcasterChannelSlot <> GetBroadcasterChannelSlot(int a) 暂无描述
GetClaimedDenies int GetClaimedDenies(int a) 暂无描述
GetClaimedFarm float GetClaimedFarm(int a) 暂无描述
GetClaimedMisses int GetClaimedMisses(int a) 暂无描述
GetConnectionState <> GetConnectionState(int a) 暂无描述
GetCreepDamageTaken int GetCreepDamageTaken(int a) 暂无描述
GetCustomBuybackCooldown float GetCustomBuybackCooldown(int a) 暂无描述
GetCustomBuybackCost int GetCustomBuybackCost(int a) 暂无描述
GetDamageDoneToHero int GetDamageDoneToHero(int a, int b) 暂无描述
GetDeaths int GetDeaths(int a) 暂无描述
GetDenies int GetDenies(int a) 暂无描述
GetEventPointsForPlayerID int GetEventPointsForPlayerID(int a) 暂无描述
GetEventPremiumPointsGranted int GetEventPremiumPointsGranted(int a) 暂无描述
GetEventRankGranted int GetEventRankGranted(int a) 暂无描述
GetGold int GetGold(int a) 暂无描述
GetGoldBagsCollected int GetGoldBagsCollected(int a) 暂无描述
GetGoldLostToDeath int GetGoldLostToDeath(int a) 暂无描述
GetGoldPerMin float GetGoldPerMin(int a) 暂无描述
GetGoldSpentOnBuybacks int GetGoldSpentOnBuybacks(int a) 暂无描述
GetGoldSpentOnConsumables int GetGoldSpentOnConsumables(int a) 暂无描述
GetGoldSpentOnItems int GetGoldSpentOnItems(int a) 暂无描述
GetGoldSpentOnSupport int GetGoldSpentOnSupport(int a) 暂无描述
GetHealing float GetHealing(int a) 暂无描述
GetHeroDamageTaken int GetHeroDamageTaken(int a) 暂无描述
GetKills int GetKills(int a) 暂无描述
GetKillsDoneToHero int GetKillsDoneToHero(int a, int b) 暂无描述
GetLastHitMultikill int GetLastHitMultikill(int a) 暂无描述
GetLastHits int GetLastHits(int a) 暂无描述
GetLastHitStreak int GetLastHitStreak(int a) 暂无描述
GetLevel int GetLevel(int playerID) 暂无描述
GetMisses int GetMisses(int a) 暂无描述
GetNearbyCreepDeaths int GetNearbyCreepDeaths(int a) 暂无描述
GetNthCourierForTeam handle GetNthCourierForTeam(int a, int b) 暂无描述
GetNthPlayerIDOnTeam int GetNthPlayerIDOnTeam(int a, int b) 暂无描述
GetNumConsumablesPurchased int GetNumConsumablesPurchased(int a) 暂无描述
GetNumCouriersForTeam int GetNumCouriersForTeam(int a) 暂无描述
GetNumItemsPurchased int GetNumItemsPurchased(int a) 暂无描述
GetPlayer handle GetPlayer(int a) 暂无描述
GetPlayerLoadedCompletely bool GetPlayerLoadedCompletely(int a) 暂无描述
GetPlayerName string GetPlayerName(int a) 暂无描述
GetPlayerReservedState bool GetPlayerReservedState(int a) 暂无描述
GetRawPlayerDamage int GetRawPlayerDamage(int a) 暂无描述
GetReliableGold int GetReliableGold(int a) 暂无描述
GetRespawnSeconds int GetRespawnSeconds(int a) 暂无描述
GetRoshanKills int GetRoshanKills(int a) 暂无描述
GetRunePickups int GetRunePickups(int a) 暂无描述
GetSelectedHeroEntity handle GetSelectedHeroEntity(int a) 暂无描述
GetSelectedHeroID int GetSelectedHeroID(int a) 暂无描述
GetSelectedHeroName string GetSelectedHeroName(int a) 暂无描述
GetSteamAccountID <> GetSteamAccountID(int a) 暂无描述
GetStreak int GetStreak(int a) 暂无描述
GetStuns float GetStuns(int a) 暂无描述
GetTeam int GetTeam(int a) 暂无描述
GetTeamKills int GetTeamKills(int a) 暂无描述
GetTimeOfLastConsumablePurchase float GetTimeOfLastConsumablePurchase(int a) 暂无描述
GetTimeOfLastDeath float GetTimeOfLastDeath(int a) 暂无描述
GetTimeOfLastItemPurchase float GetTimeOfLastItemPurchase(int a) 暂无描述
GetTotalEarnedGold int GetTotalEarnedGold(int a) 暂无描述
GetTotalEarnedXP int GetTotalEarnedXP(int a) 暂无描述
GetTotalGoldSpent int GetTotalGoldSpent(int a) 暂无描述
GetTowerDamageTaken int GetTowerDamageTaken(int a) 暂无描述
GetTowerKills int GetTowerKills(int a) 暂无描述
GetUnitShareMaskForPlayer int GetUnitShareMaskForPlayer(int a, int b) 暂无描述
GetUnreliableGold int GetUnreliableGold(int a) 暂无描述
GetXPPerMin float GetXPPerMin(int a) 暂无描述
HasRandomed bool HasRandomed(int a) 暂无描述
HasRepicked bool HasRepicked(int playerID) 暂无描述
HasSelectedHero bool HasSelectedHero(int a) 暂无描述
HaveAllPlayersJoined bool HaveAllPlayersJoined() 暂无描述
HeroLevelUp void HeroLevelUp(int a) 暂无描述
IncrementAssists void IncrementAssists(int playerID) 暂无描述
IncrementClaimedDenies void IncrementClaimedDenies(int a) 暂无描述
IncrementClaimedMisses void IncrementClaimedMisses(int a) 暂无描述
IncrementDeaths void IncrementDeaths(int playerID) 暂无描述
IncrementDenies void IncrementDenies(int a) 暂无描述
IncrementGoldBagsCollected void IncrementGoldBagsCollected(int a) 暂无描述
IncrementKills void IncrementKills(int playerID, int kills) 暂无描述
IncrementLastHitMultikill void IncrementLastHitMultikill(int a) 暂无描述
IncrementLastHits void IncrementLastHits(int a) 暂无描述
IncrementLastHitStreak void IncrementLastHitStreak(int a) 暂无描述
IncrementMisses void IncrementMisses(int a) 暂无描述
IncrementNearbyCreepDeaths void IncrementNearbyCreepDeaths(int a) 暂无描述
IncrementStreak void IncrementStreak(int a) 暂无描述
IncrementTotalEarnedXP void IncrementTotalEarnedXP(int a, int b) 暂无描述
IsBroadcaster bool IsBroadcaster(int a) 暂无描述
IsDisableHelpSetForPlayerID bool IsDisableHelpSetForPlayerID(int a, int b) 暂无描述
IsFakeClient bool IsFakeClient(int a) 暂无描述
IsHeroSelected bool IsHeroSelected(string a) 暂无描述
IsHeroSharedWithPlayerID bool IsHeroSharedWithPlayerID(int a, int b) 暂无描述
IsValidPlayer bool IsValidPlayer(int playerID) 暂无描述
IsValidPlayerID bool IsValidPlayerID(int playerID) 暂无描述
IsValidTeamPlayer bool IsValidTeamPlayer(int playerID) 暂无描述
IsValidTeamPlayerID bool IsValidTeamPlayerID(int playerID) 暂无描述
ModifyGold int ModifyGold(int playerID, int goldAmmt, bool reliable, int d) 暂无描述
ReplaceHeroWith handle ReplaceHeroWith(int a, string b, int c, int d) (playerID, heroClassName, gold, XP) - replaces the player's hero with a new one of the specified class, gold and XP
ResetBuybackCostTime void ResetBuybackCostTime(int a) 暂无描述
ResetTotalEarnedGold void ResetTotalEarnedGold(int a) 暂无描述
SetBuybackCooldownTime void SetBuybackCooldownTime(int a, float b) 暂无描述
SetBuybackGoldLimitTime void SetBuybackGoldLimitTime(int a, float b) 暂无描述
SetCameraTarget void SetCameraTarget(int a, handle b) (playerID, entity) - force the given player's camera to follow the given entity
SetCustomBuybackCooldown void SetCustomBuybackCooldown(int a, float b) Set the buyback cooldown for this player.
SetCustomBuybackCost void SetCustomBuybackCost(int a, int b) Set the buyback cost for this player.
SetGold void SetGold(int a, int b, bool c) 暂无描述
SetHasRandomed void SetHasRandomed(int playerID) 暂无描述
SetHasRepicked void SetHasRepicked(int playerID) 暂无描述
SetLastBuybackTime void SetLastBuybackTime(int a, int b) 暂无描述
SetPlayerReservedState void SetPlayerReservedState(int a, bool b) 暂无描述
SetUnitShareMaskForPlayer void SetUnitShareMaskForPlayer(int a, int b, int c, bool d) 暂无描述
SpendGold void SpendGold(int a, int b, int c) 暂无描述
UpdateTeamSlot void UpdateTeamSlot(int a, int b) 暂无描述
WhoSelectedHero int WhoSelectedHero(string a) 暂无描述


CDOTA_BaseNPC

'

Function Signature Description
AddAbility void AddAbility(string a) Add an ability to this unit by name.
AddItem void AddItem(handle a) Add an item to this unit's inventory.
AddNewModifier void AddNewModifier(handle caster, handle optionalSourceAbility, string modifierName, handle modifierData)
AddNoDraw void AddNoDraw() Adds the no draw flag.
AlertNearbyUnits void AlertNearbyUnits(handle a, handle b) 暂无描述
AngerNearbyUnits void AngerNearbyUnits() 暂无描述
AttackNoEarlierThan void AttackNoEarlierThan(float a) 暂无描述
AttackReady bool AttackReady() 暂无描述
BoundingRadius2D float BoundingRadius2D() 暂无描述
CastAbilityImmediately void CastAbilityImmediately(handle a, int b) Cast an ability immediately.
CastAbilityNoTarget void CastAbilityNoTarget(handle ability, int playerIndex) Cast an ability with no target. ( hAbility, iPlayerIndex )
CastAbilityOnPosition void CastAbilityOnPosition(Vector a, handle b, int c) Cast an ability on a position.
CastAbilityOnTarget void CastAbilityOnTarget(handle target, handle ability, int playerIndex) Cast an ability on a target entity.
CastAbilityToggle void CastAbilityToggle(handle a, int b) Toggle an ability. ( hAbility, iPlayerIndex )
DisassembleItem void DisassembleItem(handle a) Disassemble the passed item in this unit's inventory.
DropItemAtPosition void DropItemAtPosition(Vector a, handle b) Drop an item at a given point.
DropItemAtPositionImmediate void DropItemAtPositionImmediate(handle a, Vector b) Immediately drop a carried item at a given position.
EjectItemFromStash void EjectItemFromStash(handle a) Drops the selected item out of this unit's stash.
FindAbilityByName handle FindAbilityByName(string a) Retrieve an ability by name from the unit.
ForceKill void ForceKill(bool a) Kill this unit immediately.
GetAbilityByIndex handle GetAbilityByIndex(int a) Retrieve an ability by index from the unit.
GetAbilityCount int GetAbilityCount() 暂无描述
GetAcquisitionRange float GetAcquisitionRange() Gets the range at which this unit will auto-acquire.
GetAdditionalBattleMusicWeight float GetAdditionalBattleMusicWeight() Combat involving this creature will have this weight added to the music calcuations
GetAttackAnimationPoint float GetAttackAnimationPoint() 暂无描述
GetAttackDamage int GetAttackDamage() Returns a random integer between the minimum and maximum base damage of the unit.
GetAttackRange float GetAttackRange() Gets this unit's attack range after all modifiers.
GetAttackRangeBuffer float GetAttackRangeBuffer() Gets the attack range buffer.
GetAttackSpeed float GetAttackSpeed() 暂无描述
GetAttacksPerSecond float GetAttacksPerSecond() 暂无描述
GetAttackTarget handle GetAttackTarget() 暂无描述
GetAverageTrueAttackDamage int GetAverageTrueAttackDamage() Returns the average value of the minimum and maximum damage values.
GetBaseAttackRange int GetBaseAttackRange() Gets this unit's attack range before modifiers.
GetBaseAttackTime float GetBaseAttackTime() 暂无描述
GetBaseDamageMax int GetBaseDamageMax() Gets the minimum base damage.
GetBaseDamageMin int GetBaseDamageMin() Gets the minimum base damage.
GetBaseDayTimeVisionRange int GetBaseDayTimeVisionRange() Returns the vision range before modifiers.
GetBaseHealthRegen float GetBaseHealthRegen() 暂无描述
GetBaseMagicalResistanceValue float GetBaseMagicalResistanceValue() Returns base magical armor value.
GetBaseMaxHealth float GetBaseMaxHealth() Gets the base max health value.
GetBaseMoveSpeed float GetBaseMoveSpeed() 暂无描述
GetBaseNightTimeVisionRange int GetBaseNightTimeVisionRange() Returns the vision range before modifiers.
GetCastPoint float GetCastPoint(bool a) Parameter: bAttack
GetCollisionPadding float GetCollisionPadding() Returns the size of the collision padding around the hull.
GetConstantBasedManaRegen float GetConstantBasedManaRegen() This Mana regen is derived from constant bonuses like Basilius.
GetCreationTime float GetCreationTime() 暂无描述
GetCurrentActiveAbility handle GetCurrentActiveAbility() Get the ability this unit is currently casting.
GetCurrentVisionRange int GetCurrentVisionRange() Gets the current vision range.
GetCursorCastTarget handle GetCursorCastTarget() 暂无描述
GetCursorPosition Vector GetCursorPosition() 暂无描述
GetCursorTargetingNothing bool GetCursorTargetingNothing() 暂无描述
GetDayTimeVisionRange int GetDayTimeVisionRange() Returns the vision range after modifiers.
GetDeathXP int GetDeathXP() Get the XP bounty on this unit
GetForceAttackTarget handle GetForceAttackTarget() 暂无描述
GetGoldBounty int GetGoldBounty() Get the gold bounty on this unit
GetHasteFactor float GetHasteFactor() 暂无描述
GetHealth int GetHealth() Get the health of this unit.
GetHealthDeficit int GetHealthDeficit() Returns integer amount of health missing from max.
GetHealthPercent int GetHealthPercent() Get the current health percent of the unit.
GetHealthRegen float GetHealthRegen() 暂无描述
GetHullRadius float GetHullRadius() Get the collision hull radius of this NPC
GetIdealSpeed float GetIdealSpeed() Returns speed after all modifiers.
GetIncreasedAttackSpeed float GetIncreasedAttackSpeed() 暂无描述
GetInitialGoalEntity handle GetInitialGoalEntity() Returns the initial waypoint goal for this NPC
GetItemInSlot handle GetItemInSlot(int a) Returns nth item in inventory slot (index is zero based)
GetLastIdleChangeTime float GetLastIdleChangeTime() Get the last game time that this unit switched to/from idle state.
GetLevel int GetLevel() Returns the level of this unit.
GetMagicalArmorValue float GetMagicalArmorValue() Returns current magical armor value.
GetMainControllingPlayer int GetMainControllingPlayer() Returns the player ID of the controlling player.
GetMana float GetMana() Get the mana on this unit.
GetManaPercent int GetManaPercent() Get the percent of mana remaining.
GetManaRegen float GetManaRegen() 暂无描述
GetMaxHealth int GetMaxHealth() Get the maximum health of this unit.
GetMaxMana float GetMaxMana() Get the maximum mana of this unit.
GetModelRadius float GetModelRadius() 暂无描述
GetModifierCount int GetModifierCount() How many modifiers does this unit have?
GetModifierNameByIndex string GetModifierNameByIndex(int a) Get a modifier name by index.
GetMoveSpeedModifier float GetMoveSpeedModifier(float a) 暂无描述
GetMustReachEachGoalEntity bool GetMustReachEachGoalEntity() Get whether this NPC is required to reach each goal entity, rather than being allowed to 'unkink' their path
GetNightTimeVisionRange int GetNightTimeVisionRange() Returns the vision range after modifiers.
GetOpposingTeamNumber int GetOpposingTeamNumber() 暂无描述
GetPaddedCollisionRadius float GetPaddedCollisionRadius() Get the collision hull radius (including padding) of this NPC
GetPercentageBasedManaRegen float GetPercentageBasedManaRegen() This Mana regen is derived from % bonuses (from items like Void Stone).
GetPhysicalArmorBaseValue float GetPhysicalArmorBaseValue() Returns base physical armor value.
GetPhysicalArmorValue float GetPhysicalArmorValue() Returns current physical armor value.
GetPlayerOwner handle GetPlayerOwner() Returns the player that owns this unit
GetPlayerOwnerID int GetPlayerOwnerID() Get the owner player ID for this unit.
GetProjectileSpeed int GetProjectileSpeed() 暂无描述
GetRangeToUnit float GetRangeToUnit(handle a) 暂无描述
GetSecondsPerAttack float GetSecondsPerAttack() 暂无描述
GetStatsBasedManaRegen float GetStatsBasedManaRegen() Returns mana regen rate per intelligence.
GetTeamNumber int GetTeamNumber() Get the team number of this unit.
GetTotalPurchasedUpgradeGoldCost int GetTotalPurchasedUpgradeGoldCost() Get how much gold has been spent on ability upgrades.
GetUnitLabel string GetUnitLabel() 暂无描述
GetUnitName string GetUnitName() 暂无描述
GiveMana void GiveMana(float a) Give mana to this unit, this can be used for mana gained by abilities or item usage.
HasAbility bool HasAbility(string a) See whether this unit has an ability by name.
HasAttackCapability bool HasAttackCapability() 暂无描述
HasFlyingVision bool HasFlyingVision() 暂无描述
HasFlyMovementCapability bool HasFlyMovementCapability() 暂无描述
HasGroundMovementCapability bool HasGroundMovementCapability() 暂无描述
HasInventory bool HasInventory() 暂无描述
HasItemInInventory bool HasItemInInventory(string a) See whether this unit has an item by name.
HasModifier bool HasModifier(string a) Sees if this unit has a given modifier
HasMovementCapability bool HasMovementCapability() 暂无描述
HasScepter bool HasScepter() 暂无描述
Heal void Heal(float a, handle b) Heal this unit.
Hold void Hold() Hold position.
Interrupt void Interrupt() 暂无描述
InterruptChannel void InterruptChannel() 暂无描述
InterruptMotionControllers void InterruptMotionControllers(bool a) Parameter boolean determines finding clear space.
IsAlive bool IsAlive() Is this unit alive?
IsAncient bool IsAncient() Is this creature an Ancient?
IsAttackImmune bool IsAttackImmune() 暂无描述
IsAttacking bool IsAttacking() 暂无描述
IsAttackingEntity bool IsAttackingEntity(handle a) 暂无描述
IsBlind bool IsBlind() 暂无描述
IsBlockDisabled bool IsBlockDisabled() 暂无描述
IsCommandRestricted bool IsCommandRestricted() 暂无描述
IsControllableByAnyPlayer bool IsControllableByAnyPlayer() Is this unit controlled by any non-bot player?
IsCreature bool IsCreature() Is this a Creature type NPC
IsDeniable bool IsDeniable() 暂无描述
IsDisarmed bool IsDisarmed() 暂无描述
IsDominated bool IsDominated() 暂无描述
IsEvadeDisabled bool IsEvadeDisabled() 暂无描述
IsFrozen bool IsFrozen() 暂无描述
IsHardDisarmed bool IsHardDisarmed() 暂无描述
IsHero bool IsHero() Is this a hero or hero illusion?
IsHexed bool IsHexed() 暂无描述
IsIdle bool IsIdle() Is this creature currently idle?
IsIllusion bool IsIllusion() 暂无描述
IsInvisible bool IsInvisible() 暂无描述
IsInvulnerable bool IsInvulnerable() 暂无描述
IsLowAttackPriority bool IsLowAttackPriority() 暂无描述
IsMagicImmune bool IsMagicImmune() 暂无描述
IsMechanical bool IsMechanical() Is the unit mechanical?
IsMovementImpaired bool IsMovementImpaired() 暂无描述
IsMuted bool IsMuted() 暂无描述
IsNeutralUnitType bool IsNeutralUnitType() Is this a neutral?
IsNightmared bool IsNightmared() 暂无描述
IsOpposingTeam bool IsOpposingTeam(int a) 暂无描述
IsOutOfGame bool IsOutOfGame() 暂无描述
IsOwnedByAnyPlayer bool IsOwnedByAnyPlayer() Is this unit owned by any non-bot player?
IsPhantom bool IsPhantom() Is this a phantom unit?
IsPhantomBlocker bool IsPhantomBlocker() 暂无描述
IsPhased bool IsPhased() 暂无描述
IsPositionInRange bool IsPositionInRange(Vector a, float b) 暂无描述
IsRangedAttacker bool IsRangedAttacker() Is this unit a ranged attacker?
IsRealHero bool IsRealHero() Returns true if the hero is a true Hero, not a creep or an Illusion of a hero
IsRooted bool IsRooted() 暂无描述
IsSilenced bool IsSilenced() 暂无描述
IsSoftDisarmed bool IsSoftDisarmed() 暂无描述
IsSpeciallyDeniable bool IsSpeciallyDeniable() 暂无描述
IsStunned bool IsStunned() 暂无描述
IsSummoned bool IsSummoned() Is this unit summoned?
IsTower bool IsTower() Is this a tower?
IsUnableToMiss bool IsUnableToMiss() 暂无描述
IsUnselectable bool IsUnselectable() 暂无描述
Kill void Kill(handle a, handle b) Kills this NPC, with the params Ability and Attacker
MakeIllusion void MakeIllusion() 暂无描述
MakePhantomBlocker void MakePhantomBlocker() 暂无描述
MakeVisibleDueToAttack void MakeVisibleDueToAttack(int a) 暂无描述
MakeVisibleToTeam void MakeVisibleToTeam(int a, float b) 暂无描述
ModifyHealth void ModifyHealth(int a, handle b, bool c, int d) Sets the health to a specific value, with optional flags or inflictors.
MoveToNPC void MoveToNPC(handle a) Move to follow a unit.
MoveToNPCToGiveItem void MoveToNPCToGiveItem(handle a, handle b) Give an item to another unit.
MoveToPosition void MoveToPosition(Vector a) Issue a Move-To command
MoveToPositionAggressive void MoveToPositionAggressive(Vector a) Issue an Attack-Move-To command
MoveToTargetToAttack void MoveToTargetToAttack(handle a) Move to a target to attack.
NoHealthBar bool NoHealthBar() 暂无描述
NoTeamMoveTo bool NoTeamMoveTo() 暂无描述
NoTeamSelect bool NoTeamSelect() 暂无描述
NotOnMinimap bool NotOnMinimap() 暂无描述
NotOnMinimapForEnemies bool NotOnMinimapForEnemies() 暂无描述
NoUnitCollision bool NoUnitCollision() 暂无描述
PassivesDisabled bool PassivesDisabled() 暂无描述
PerformAttack void PerformAttack(handle a, bool b, bool c, bool d, bool e) Performs an attack on a target. Params: Target, bUseCastAttackOrb, bProcessProcs, bSkipCooldown, bIgnoreInvis
PickupDroppedItem void PickupDroppedItem(handle a) Pick up a dropped item.
PickupRune void PickupRune(handle a) Pick up a rune.
ProvidesVision bool ProvidesVision() 暂无描述
ReduceMana void ReduceMana(float a) Remove mana from this unit, this can be used for involuntary mana loss, not for mana that is spent.
RemoveAbility void RemoveAbility(string a) Remove an ability from this unit by name.
RemoveItem void RemoveItem(handle a) Removes the passed item from this unit's inventory.
RemoveModifierByName void RemoveModifierByName(string a) Removes a modifier
RemoveModifierByNameAndCaster void RemoveModifierByNameAndCaster(string a, handle b) Removes a modifier that was cast by the given caster
RemoveNoDraw void RemoveNoDraw() Remove the no draw flag.
RespawnUnit void RespawnUnit() Respawns the target unit if it can be respawned.
SellItem void SellItem(handle a) Sells the passed item in this unit's inventory.
SetAdditionalBattleMusicWeight void SetAdditionalBattleMusicWeight(float a) Combat involving this creature will have this weight added to the music calcuations
SetAttackCapability void SetAttackCapability(int a) 暂无描述
SetAttacking void SetAttacking(handle a) 暂无描述
SetBaseAttackTime void SetBaseAttackTime(float a) 暂无描述
SetBaseDamageMax void SetBaseDamageMax(int a) Sets the minimum base damage.
SetBaseDamageMin void SetBaseDamageMin(int a) Sets the minimum base damage.
SetBaseHealthRegen void SetBaseHealthRegen(float a) 暂无描述
SetBaseMagicalResistanceValue void SetBaseMagicalResistanceValue(float a) Sets base magical armor value.
SetBaseManaRegen void SetBaseManaRegen(float a) 暂无描述
SetBaseMaxHealth void SetBaseMaxHealth(float a) Set a new base max health value.
SetBaseMoveSpeed void SetBaseMoveSpeed(int a) 暂无描述
SetControllableByPlayer void SetControllableByPlayer(int a, bool b) Set this unit controllable by the player with the passed ID.
SetCursorCastTarget void SetCursorCastTarget(handle a) 暂无描述
SetCursorPosition void SetCursorPosition(Vector a) 暂无描述
SetCursorTargetingNothing void SetCursorTargetingNothing(bool a) 暂无描述
SetDayTimeVisionRange void SetDayTimeVisionRange(int a) Set the base vision range.
SetDeathXP void SetDeathXP(int a) Set the XP bounty on this unit
SetForceAttackTarget void SetForceAttackTarget(handle a) 暂无描述
SetHasInventory void SetHasInventory(bool a) 暂无描述
SetHullRadius void SetHullRadius(float a) Set the collision hull radius of this NPC
SetIdleAcquire void SetIdleAcquire(bool a) 暂无描述
SetInitialGoalEntity void SetInitialGoalEntity(handle a) Sets the initial waypoint goal for this NPC
SetMana void SetMana(float a) Set the mana on this unit.
SetMaximumGoldBounty void SetMaximumGoldBounty(int a) Set the maximum gold bounty for this unit.
SetMinimumGoldBounty void SetMinimumGoldBounty(int a) Set the minimum gold bounty for this unit.
SetMoveCapability void SetMoveCapability(int a) 暂无描述
SetMustReachEachGoalEntity void SetMustReachEachGoalEntity(bool a) Set whether this NPC is required to reach each goal entity, rather than being allowed to 'unkink' their path
SetNeverMoveToClearSpace void SetNeverMoveToClearSpace(bool a) If set to true, we will never attempt to move this unit to clear space, even when it unphases.
SetNightTimeVisionRange void SetNightTimeVisionRange(int a) Set the base vision range.
SetOriginalModel void SetOriginalModel(string originalModel) Sets the original model of this entity, which it will tend to fall back to anytime its state changes
SetPhysicalArmorBaseValue void SetPhysicalArmorBaseValue(float a) Sets base physical armor value.
SetRangedProjectileName void SetRangedProjectileName(string a) 暂无描述
SetStolenScepter void SetStolenScepter(bool a) 暂无描述
SetUnitName void SetUnitName(string a) 暂无描述
ShouldIdleAcquire bool ShouldIdleAcquire() 暂无描述
SpendMana void SpendMana(float a, handle b) Spend mana from this unit, this can be used for spending mana from abilities or item usage.
Stop void Stop() Stop the current order.
SwapAbilities void SwapAbilities(string a, string b, bool c, bool d) Swaps the slots of the two passed abilities and sets them enabled/disabled: const char* AbilityName1, const char* AbilityName2, bool bEnable1, bool bEnable2. The boolean controls which ability is active. The ability order is never swapped when swapping abilities, only the boolean statements are flipped.
TimeUntilNextAttack float TimeUntilNextAttack() 暂无描述
TriggerModifierDodge bool TriggerModifierDodge() 暂无描述
TriggerSpellAbsorb bool TriggerSpellAbsorb(handle a) Query whether the passed ability will trigger spell absorb on this unit.
UnitCanRespawn bool UnitCanRespawn() 暂无描述


CDOTA_BaseNPC_Hero

'

Function Signature Description
AddExperience bool AddExperience(float amount, bool applyBotDifficultyScaling)
Buyback void Buyback() Spend the gold and buyback with this hero.
CalculateStatBonus void CalculateStatBonus() Recalculate all stats after the hero gains stats.
CanEarnGold bool CanEarnGold() Returns boolean value result of buyback gold limit time less than game time.
ClearLastHitMultikill void ClearLastHitMultikill() Value is stored in PlayerResource.
ClearLastHitStreak void ClearLastHitStreak() Value is stored in PlayerResource.
ClearStreak void ClearStreak() Value is stored in PlayerResource.
GetAbilityPoints int GetAbilityPoints() Gets the current unspent ability point's.
GetAgility float GetAgility() 暂无描述
GetAgilityGain float GetAgilityGain() 暂无描述
GetAssists int GetAssists() Value is stored in PlayerResource.
GetAttacker int GetAttacker(int a) 暂无描述
GetBaseAgility float GetBaseAgility() 暂无描述
GetBaseDamageMax int GetBaseDamageMax() Hero damage is also affected by attributes.
GetBaseDamageMin int GetBaseDamageMin() Hero damage is also affected by attributes.
GetBaseIntellect float GetBaseIntellect() 暂无描述
GetBaseStrength float GetBaseStrength() 暂无描述
GetBonusDamageFromPrimaryStat int GetBonusDamageFromPrimaryStat() 暂无描述
GetBuybackCooldownTime float GetBuybackCooldownTime() Return float value for the amount of time left on cooldown for this hero's buyback.
GetBuybackCost int GetBuybackCost() Return integer value for the gold cost of a buyback.
GetBuybackGoldLimitTime float GetBuybackGoldLimitTime() Returns the amount of time gold gain is limited after buying back.
GetCurrentXP int GetCurrentXP() Returns the amount of XP
GetDeathGoldCost int GetDeathGoldCost() 暂无描述
GetDeaths int GetDeaths() Value is stored in PlayerResource.
GetDenies int GetDenies() Value is stored in PlayerResource.
GetGold int GetGold() Returns gold amount for the player owning this hero
GetGoldBounty int GetGoldBounty() 暂无描述
GetHealthRegen float GetHealthRegen() Hero health regen is affected by attributes.
GetIncreasedAttackSpeed float GetIncreasedAttackSpeed() Hero attack speed is also affected by agility.
GetIntellect float GetIntellect() 暂无描述
GetIntellectGain float GetIntellectGain() 暂无描述
GetKills int GetKills() Value is stored in PlayerResource.
GetLastHits int GetLastHits() Value is stored in PlayerResource.
GetManaRegen float GetManaRegen() Hero mana regen is affected by attributes.
GetMostRecentDamageTime float GetMostRecentDamageTime() 暂无描述
GetMultipleKillCount int GetMultipleKillCount() 暂无描述
GetNumAttackers int GetNumAttackers() 暂无描述
GetPhysicalArmorValue float GetPhysicalArmorValue() Hero armor is affected by attributes.
GetPlayerID int GetPlayerID() Returns player ID of the player owning this hero
GetPrimaryAttribute int GetPrimaryAttribute() 0 = strength, 1 = agility, 2 = intelligence.
GetPrimaryStatValue float GetPrimaryStatValue() 暂无描述
GetRespawnTime float GetRespawnTime() 暂无描述
GetStatsBasedManaRegen float GetStatsBasedManaRegen() Returns only the regen based on Intelligence.
GetStreak int GetStreak() Value is stored in PlayerResource.
GetStrength float GetStrength() 暂无描述
GetStrengthGain float GetStrengthGain() 暂无描述
GetTimeUntilRespawn float GetTimeUntilRespawn() 暂无描述
HasAnyAvailableInventorySpace bool HasAnyAvailableInventorySpace() 暂无描述
HasFlyingVision bool HasFlyingVision() 暂无描述
HasOwnerAbandoned bool HasOwnerAbandoned() 暂无描述
HasRoomForItem int HasRoomForItem(string a, bool b, bool c) Args: const char* pItemName, bool bIncludeStashCombines, bool bAllowSelling
HeroLevelUp void HeroLevelUp(bool a) Levels up the hero, true or false to play effects.
IncrementAssists void IncrementAssists() Value is stored in PlayerResource.
IncrementDeaths void IncrementDeaths() Value is stored in PlayerResource.
IncrementDenies void IncrementDenies() Value is stored in PlayerResource.
IncrementKills void IncrementKills(int kills) Passed ID is for the victim, killer ID is ID of the current hero. Value is stored in PlayerResource.
IncrementLastHitMultikill void IncrementLastHitMultikill() Value is stored in PlayerResource.
IncrementLastHits void IncrementLastHits() Value is stored in PlayerResource.
IncrementLastHitStreak void IncrementLastHitStreak() Value is stored in PlayerResource.
IncrementNearbyCreepDeaths void IncrementNearbyCreepDeaths() Value is stored in PlayerResource.
IncrementStreak void IncrementStreak() Value is stored in PlayerResource.
IsBuybackDisabledByReapersScythe bool IsBuybackDisabledByReapersScythe() 暂无描述
IsReincarnating bool IsReincarnating() 暂无描述
KilledHero void KilledHero(handle a, handle b) Args: Hero, Inflictor
ModifyAgility void ModifyAgility(float a) Adds passed value to base attribute value, then calls CalculateStatBonus.
ModifyGold int ModifyGold(int goldAmmt, bool reliable, int reason) Gives this hero some gold. Args: int nGoldChange, bool bReliable, int reason
ModifyIntellect void ModifyIntellect(float a) Adds passed value to base attribute value, then calls CalculateStatBonus.
ModifyStrength void ModifyStrength(float a) Adds passed value to base attribute value, then calls CalculateStatBonus.
PerformTaunt void PerformTaunt() 暂无描述
RecordLastHit void RecordLastHit() 暂无描述
RespawnHero void RespawnHero(bool buyback, bool unknown1, bool unknown2)
SetAbilityPoints void SetAbilityPoints(int a) Sets the current unspent ability point's.
SetBaseAgility void SetBaseAgility(float a) 暂无描述
SetBaseIntellect void SetBaseIntellect(float a) 暂无描述
SetBaseStrength void SetBaseStrength(float a) 暂无描述
SetBuybackCooldownTime void SetBuybackCooldownTime(float a) Sets the buyback cooldown time.
SetBuyBackDisabledByReapersScythe void SetBuyBackDisabledByReapersScythe(bool a) 暂无描述
SetBuybackGoldLimitTime void SetBuybackGoldLimitTime(float a) Set the amount of time gold gain is limited after buying back.
SetCustomDeathXP void SetCustomDeathXP(int a) Sets a custom experience value for this hero.
Tip:GameRules boolean must be set for this to work!
SetGold void SetGold(int a, bool b) Sets the gold amount for the player owning this hero
SetPlayerID void SetPlayerID(int a) 暂无描述
SetRespawnPosition void SetRespawnPosition(Vector a) 暂无描述
SetTimeUntilRespawn void SetTimeUntilRespawn(float a) 暂无描述
ShouldDoFlyHeightVisual bool ShouldDoFlyHeightVisual() 暂无描述
SpendGold void SpendGold(int a, int b) Args: int nGold, int nReason
UnitCanRespawn bool UnitCanRespawn() 暂无描述
UpgradeAbility void UpgradeAbility(handle a) This upgrades the passed ability if it exists and the hero has enough ability point's.
WillReincarnate bool WillReincarnate() 暂无描述


CDOTA_BaseNPC_Creature

暂无描述

Function Signature Description
AddItemDrop void AddItemDrop(handle a) Add the specified item drop to this creature
CreatureLevelUp void CreatureLevelUp(int a) Level the creature up by the specified number of levels
IsChampion bool IsChampion() Is this unit a champion?
SetArmorGain void SetArmorGain(float a) Set the armor gained per level on this creature.
SetAttackTimeGain void SetAttackTimeGain(float a) Set the attack time gained per level on this creature.
SetBountyGain void SetBountyGain(int a) Set the bounty gold gained per level on this creature.
SetChampion void SetChampion(bool a) Flag this unit as a champion creature.
SetDamageGain void SetDamageGain(int a) Set the damage gained per level on this creature.
SetDisableResistanceGain void SetDisableResistanceGain(float a) Set the disable resistance gained per level on this creature.
SetHPGain void SetHPGain(int a) Set the hit point's gained per level on this creature.
SetHPRegenGain void SetHPRegenGain(float a) Set the hit point's regen gained per level on this creature.
SetMagicResistanceGain void SetMagicResistanceGain(float a) Set the magic resistance gained per level on this creature.
SetManaGain void SetManaGain(int a) Set the mana point's gained per level on this creature.
SetManaRegenGain void SetManaRegenGain(float a) Set the mana point's regen gained per level on this creature.
SetMoveSpeedGain void SetMoveSpeedGain(int a) Set the move speed gained per level on this creature.
SetXPGain void SetXPGain(int a) Set the xp reward gained per level on this creature.


CDOTA_BaseNPC_Building

暂无描述

Function Signature Description
GetInvulnCount int GetInvulnCount() Get the invulnerability count for a building.
SetInvulnCount void SetInvulnCount(int a) Set the invulnerability counter of this building.


CRPG_Unit

暂无描述

Function Signature Description
ActionState handle ActionState() return the ActionState object for this unit.
ClearMovementTarget void ClearMovementTarget() Clear any movement target entity/position.
FindSensedEnemies table FindSensedEnemies() returns list of all enemy units within this unit's sight cone or sensing sphere
GetMaxSpeed float GetMaxSpeed() returns unit's max speed
GetMaxStamina float GetMaxStamina() returns maximum stamina amount.
GetMovementTargetEntity handle GetMovementTargetEntity() Returs the movement target entity, if set.
GetSensingSphereRange float GetSensingSphereRange() returns range of unit's 360 degree sensing sphere
GetSightConeAngle float GetSightConeAngle() returns angle in which the unit can see things up to sight range
GetSightConeRange float GetSightConeRange() returns range of unit's sight cone
GetStamina float GetStamina() returns current stamina amount.
GetTurnRate float GetTurnRate() returns unit's turn rate in degrees per second
GetUnitName string GetUnitName() get the unit name for this unit.
GrantItem void GrantItem(string a, bool b) ( sItemName ) - grant an item to the unit by name.
IsBlocking bool IsBlocking() is this unit blocking?
IsFacing bool IsFacing(Vector a, float b) ( vecTargetPosition, flAngleTolerance ) - returns true if the unit is within flAngleTolerance degrees of the target position
SetBlocking void SetBlocking(bool a) ( bShouldBlock ) - Set the blocking state of this unit.
SetMaxSpeed void SetMaxSpeed(float a) ( flMaxSpeed ) - sets unit's max speed
SetMovementTargetEntity void SetMovementTargetEntity(handle a, float b) ( hTargetEntity, flTargetRange ) - Try to move this unit to the given range from the target entity.
SetMovementTargetPosition void SetMovementTargetPosition(Vector a, float b) ( vecTargetPosition, flTargetRange ) - Try to move this unit to the given range from the target point.
SetSensingSphereRange void SetSensingSphereRange(float a) ( flSightRange ) - set range of unit's 360 degree sensing sphere
SetSightConeAngle void SetSightConeAngle(float a) ( flAngleDegrees ) - sets angle in which the unit can see things up to sight range
SetSightConeRange void SetSightConeRange(float a) ( fRange ) - set range of unit's sight cone
SetTurnRate void SetTurnRate(float a) ( flTurnRate ) - sets unit's turn rate in degrees per second


CDOTABaseGameMode

暂无描述

Function Signature Description
ClientLoadGridNav void ClientLoadGridNav() Tell clients that they need to load gridnav information. Used for things like allowing clients to identify valid locations to place buildings.
SetAlwaysShowPlayerInventory void SetAlwaysShowPlayerInventory(bool a) Show the player hero's inventory in the HUD, regardless of what unit is selected.
SetBotThinkingEnabled void SetBotThinkingEnabled(bool a) Enables/Disables bot thinking. Requires a very Dota PvP-like map with 3 lanes, a shop, etc.
SetBuybackEnabled void SetBuybackEnabled(bool a) Enables or disables buyback completely
SetCameraDistanceOverride void SetCameraDistanceOverride(float a) Set a different camera distance; dota default is 1134.
SetCustomBuybackCooldownEnabled void SetCustomBuybackCooldownEnabled(bool a) Turns on capability to define custom buyback cooldowns.
SetCustomBuybackCostEnabled void SetCustomBuybackCostEnabled(bool a) Turns on capability to define custom buyback costs.
SetCustomHeroMaxLevel void SetCustomHeroMaxLevel(int maxLevel) Allows definition of the max level heroes can achieve (default is 25).
SetCustomXPRequiredToReachNextLevel void SetCustomXPRequiredToReachNextLevel(handle a) Allows definition of a table of hero XP values.
SetFogOfWarDisabled void SetFogOfWarDisabled(bool a) Turn the fog of war on or off.
SetGoldSoundDisabled void SetGoldSoundDisabled(bool a) Turn the sound when gold is acquired off/on. Takes a bool.
SetOverrideSelectionEntity void SetOverrideSelectionEntity(handle unit) Set an override for the default selection entity, instead of each player's hero.
SetRecommendedItemsDisabled void SetRecommendedItemsDisabled(bool a) Turn the panel for showing recommended items at the shop off/on. Takes a bool.
SetRemoveIllusionsOnDeath void SetRemoveIllusionsOnDeath(bool a) Make it so illusions are immediately removed upon death, rather than sticking around for a few seconds.
SetTopBarTeamValue void SetTopBarTeamValue(int a, int b) Set the team values on the top game bar.
SetTopBarTeamValuesOverride void SetTopBarTeamValuesOverride(bool a) Override the values of the team values on the top game bar.
SetTopBarTeamValuesVisible void SetTopBarTeamValuesVisible(bool a) Turning on/off the team values on the top game bar.
SetTowerBackdoorProtectionEnabled void SetTowerBackdoorProtectionEnabled(bool a) Enables/Disables tower backdoor protection
SetUseCustomHeroLevels void SetUseCustomHeroLevels(bool a) Turn on custom-defined XP values for hero level ups. The table should be defined before switching this on.


CDotaQuest

暂无描述

Function Signature Description
AddSubquest void AddSubquest(handle a) Add a subquest to this quest
CompleteQuest void CompleteQuest() Mark this quest complete
GetSubquest handle GetSubquest(int a) Finds a subquest from this quest by index
GetSubquestByName handle GetSubquestByName(string a) Finds a subquest from this quest by name
RemoveSubquest void RemoveSubquest(handle a) Remove a subquest from this quest
SetTextReplaceString void SetTextReplaceString(string a) Set the text replace string for this quest
SetTextReplaceValue void SetTextReplaceValue(int a, int b) Set a quest value


CDotaSubquestBase

暂无描述

Function Signature Description
CompleteSubquest void CompleteSubquest() Mark this subquest complete
SetTextReplaceString void SetTextReplaceString(string a) Set the text replace string for this subquest
SetTextReplaceValue void SetTextReplaceValue(int a, int b) Set a subquest value


CPhysicsComponent

暂无描述

Function Signature Description
ExpensiveInstantRayCast bool ExpensiveInstantRayCast(Vector a, Vector b, handle c) Do an instant (i.e. blocking) Ray Cast. Will do a handle/queue version later. Don't plan to use this for real!


CPointTemplate

暂无描述

Function Signature Description
DeleteCreatedSpawnGroups void DeleteCreatedSpawnGroups() DeleteCreatedSpawnGroups() : Deletes any spawn groups that this point_template has spawned. Note: The point_template will not be deleted by this.
ForceSpawn void ForceSpawn() ForceSpawn() : Spawns all of the entities the point_template is pointing at.
GetSpawnedEntities handle GetSpawnedEntities() GetSpawnedEntities() : Get the list of the most recent spawned entities
SetSpawnCallback void SetSpawnCallback(handle a, handle b) SetSpawnCallback( hCallbackFunc, hCallbackScope, hCallbackData ) : Set a callback for when the template spawns entities. The spawned entities will be passed in as an array.


CBodyComponent

暂无描述

Function Signature Description
AddImpulseAtPosition void AddImpulseAtPosition(Vector a, Vector b) Apply an impulse at a worldspace position to the physics
AddVelocity void AddVelocity(Vector a, Vector b) Add linear and angular velocity to the physics object
DetachFromParent void DetachFromParent() Detach from its parent
GetSequence <> GetSequence() Returns the active sequence
IsAttachedToParent bool IsAttachedToParent() Is attached to parent
LookupSequence <> LookupSequence(string a) Returns a sequence id given a name
SequenceDuration float SequenceDuration(string a) Returns the duration in seconds of the specified sequence
SetAngularVelocity void SetAngularVelocity(Vector a) 暂无描述
SetAnimation void SetAnimation(string a) Pass string for the animation to play on this model
SetBodyGroup void SetBodyGroup(string a) 暂无描述
SetMaterialGroup void SetMaterialGroup(utlstringtoken a) 暂无描述
SetVelocity void SetVelocity(Vector velocity) 暂无描述


CBaseAnimating

A class containing functions involved in animations

Function Signature Description
GetAttachmentAngles Vector GetAttachmentAngles(int a) Get the attachement id's angles as a p,y,r vector
GetAttachmentOrigin Vector GetAttachmentOrigin(int a) Get the attachement id's origin vector
IsSequenceFinished bool IsSequenceFinished() Ask whether the main sequence is done playing
ScriptLookupAttachment int ScriptLookupAttachment(string a) Get the named attachment id
SetBodygroup void SetBodygroup(int a, int b) Sets a bodygroup
SetModelScale void SetModelScale(float scale) Sets the model's scale to scale,
so if a unit had its model scale at 1, and you use SetModelScale(10.0), it would set the scale to 10.0.
SetPoseParameter float SetPoseParameter(string a, float b) Set the specified pose parameter to the specified value


CBaseCombatCharacter

暂无描述

Function Signature Description
GetEquippedWeapons table GetEquippedWeapons() GetEquippedWeapons() : Returns an array of all the equipped weapons
GetWeaponCount int GetWeaponCount() GetWeaponCount() : Gets the number of weapons currently equipped


ProjectileManager

The projectile manager, it manages projectiles.

Function Signature Description
CreateLinearProjectile int CreateLinearProjectile(handle a) Creates a linear projectile and returns the projectile ID
CreateTrackingProjectile void CreateTrackingProjectile(handle a) Creates a tracking projectile
DestroyLinearProjectile void DestroyLinearProjectile(int a) Destroys the linear projectile matching the argument ID
ProjectileDodge void ProjectileDodge(handle a) Makes the specified unit dodge projectiles


CBaseTrigger

暂无描述

Function Signature Description
Disable void Disable() Disable the trigger
Enable void Enable() Enable the trigger
IsTouching bool IsTouching(handle a) Checks whether the passed entity is touching the trigger.


CEnvEntityMaker

暂无描述

Function Signature Description
SpawnEntity void SpawnEntity() Create an entity at the location of the maker
SpawnEntityAtEntityOrigin void SpawnEntityAtEntityOrigin(handle a) Create an entity at the location of a specified entity instance
SpawnEntityAtLocation void SpawnEntityAtLocation(Vector a, Vector b) Create an entity at a specified location and orientaton, orientation is Euler angle in degrees (pitch, yaw, roll)
SpawnEntityAtNamedEntityOrigin void SpawnEntityAtNamedEntityOrigin(string a) Create an entity at the location of a named entity


CDOTAVoteSystem

暂无描述

Function Signature Description
StartVote void StartVote(handle a) Starts a vote, based upon a table of parameters


CMarkupVolumeTagged

暂无描述

Function Signature Description
HasTag bool HasTag(string a) Does this volume have the given tag.


CScriptPrecacheContext

暂无描述

Function Signature Description
AddResource void AddResource(string a) Precaches a specific resource
GetValue table GetValue(string a) Reads a spawn key


CScriptKeyValues

暂无描述

Function Signature Description
GetValue table GetValue(string a) Reads a spawn key


CScriptParticleManager

暂无描述

Global accessor variable: ParticleManager

Function Signature Description
CreateParticle int CreateParticle(string particleName, int particleAttach, handle owningEntity) Creates a new particle effect
CreateParticleForPlayer int CreateParticleForPlayer(string particleName, int particleAttach, handle owningEntity, handle owningPlayer) Creates a new particle effect that only plays for the specified player
GetParticleReplacement string GetParticleReplacement(string a, handle b) 暂无描述
ReleaseParticleIndex void ReleaseParticleIndex(int particleId) Frees the specified particle index
SetParticleAlwaysSimulate void SetParticleAlwaysSimulate(int a) 暂无描述
SetParticleControl void SetParticleControl(int particleId, int controlIndex, Vector controlData) Set the control point data for a control on a particle effect
SetParticleControlEnt void SetParticleControlEnt(int a, int b, handle c, int d, string e, Vector f, bool g) 暂无描述


CScriptHeroList

暂无描述

Function Signature Description
GetAllHeroes table GetAllHeroes() Returns all the heroes in the world
GetHero handle GetHero(int heroId) Get the Nth hero in the Hero List
GetHeroCount int GetHeroCount() Returns the number of heroes in the world


CNativeOutputs

暂无描述

Function Signature Description
AddOutput void AddOutput(string a, string b) Add an output
Init void Init(int a) Initialize with number of outputs


CEnvProjectedTexture

暂无描述

Function Signature Description
SetFarRange void SetFarRange(float a) Set light maximum range
SetLinearAttenuation void SetLinearAttenuation(float a) Set light linear attenuation value
SetNearRange void SetNearRange(float a) Set light minimum range
SetQuadraticAttenuation void SetQuadraticAttenuation(float a) Set light quadratic attenuation value
SetVolumetrics void SetVolumetrics(bool a, float b, float c, int d, float e) Turn on/off light volumetrics: bool bOn, float flIntensity, float flNoise, int nPlanes, float flPlaneOffset


CInfoData

暂无描述

Function Signature Description
QueryColor Vector QueryColor(utlstringtoken a, Vector b) Query color data for this key
QueryFloat float QueryFloat(utlstringtoken a, float b) Query float data for this key
QueryInt int QueryInt(utlstringtoken a, int b) Query int data for this key
QueryNumber float QueryNumber(utlstringtoken a, float b) Query number data for this key
QueryString string QueryString(utlstringtoken a, string b) Query string data for this key
QueryVector Vector QueryVector(utlstringtoken a, Vector b) Query vector data for this key


CPhysicsProp

暂无描述

Function Signature Description
DisableMotion void DisableMotion() Enable motion for the prop
EnableMotion void EnableMotion() Enable motion for the prop


CDOTAGamerules

'

Function Signature Description
Defeated void Defeated() Kills the ancient, etc.
DidMatchSignoutTimeOut bool DidMatchSignoutTimeOut() true when we have waited some time after end of the game and not received signout
GetCustomGameDifficulty int GetCustomGameDifficulty() Returns the difficulty level of the custom game mode
GetDifficulty int GetDifficulty() Returns difficulty level of the custom game mode
GetDroppedItem handle GetDroppedItem(int dropIndex) Gets the Xth dropped item
GetGameModeEntity handle GetGameModeEntity() Get the game mode entity
GetGameTime float GetGameTime() Returns the number of seconds elapsed since map start. This time doesn't count up when the game is paused
GetMatchSignoutComplete bool GetMatchSignoutComplete() Have we received the post match signout message that includes reward information
GetNianFightStartTime float GetNianFightStartTime() Gets the start time for the Nian fight
GetNianTotalDamageTaken int GetNianTotalDamageTaken() For New Bloom, get total damage taken by the Nian / Year Beast
GetTimeOfDay float GetTimeOfDay() Get the time of day
IsDaytime bool IsDaytime() Is it day time.
MakeTeamLose void MakeTeamLose(int team) Makes ths specified team lose
NumDroppedItems int NumDroppedItems() Returns the number of items currently dropped on the ground
Playtesting_UpdateAddOnKeyValues void Playtesting_UpdateAddOnKeyValues() Updates custom hero, unit and ability KeyValues in memory with the latest values from disk
ResetDefeated void ResetDefeated() Restart after killing the ancient, etc.
ResetToHeroSelection void ResetToHeroSelection() Restart the game at hero selection
SendCustomMessage void SendCustomMessage(string message, int teamID, int unknown(1?)) Displays a line of text in the left textbox (where usually deaths/denies/buysbacks are announced). This function takes restricted HTML as input! (<br>,<u>,<font>)
SetCreepMinimapIconScale void SetCreepMinimapIconScale(float scale) Scale the creep icons on the minimap.
SetCustomGameDifficulty void SetCustomGameDifficulty(int a) Set the difficulty level of the custom game mode
SetFirstBloodActive void SetFirstBloodActive(bool a) Sets whether First Blood has been triggered.
SetGameWinner void SetGameWinner(int team) Makes ths specified team win
SetGoldPerTick void SetGoldPerTick(int a) Set the auto gold increase per timed interval.
SetGoldTickTime void SetGoldTickTime(float a) Set the time interval between auto gold increases.
SetHeroMinimapIconSize void SetHeroMinimapIconSize(int iconSize) (nMinimapHeroIconSize) - Set the hero minimap icon size.
SetHeroRespawnEnabled void SetHeroRespawnEnabled(bool canRespawn) Control if the normal DOTA hero respawn rules apply.
SetHeroSelectionTime void SetHeroSelectionTime(float time) Sets the amount of time players have to pick their hero.
SetNianFightStartTime void SetNianFightStartTime(float a) Sets the start time for the Nian fight
SetOverlayHealthBarUnit void SetOverlayHealthBarUnit(handle unit, int style) Show this unit's health on the overlay health bar
SetPostGameTime void SetPostGameTime(float time) Sets the amount of time players have between the game ending and the server disconnecting them.
SetPreGameTime void SetPreGameTime(float time) Sets the amount of time players have between picking their hero and game start.
SetRuneMinimapIconScale void SetRuneMinimapIconScale(float scale) Scale the rune icons on the minimap.
SetRuneSpawnTime void SetRuneSpawnTime(float time) Sets the amount of time between rune spawns.
SetSafeToLeave void SetSafeToLeave(bool safeToLeave) Mark this game as safe to leave.
SetSameHeroSelectionEnabled void SetSameHeroSelectionEnabled(bool enabled) When true, players can repeatedly pick the same hero.
SetTimeOfDay void SetTimeOfDay(float time) Set the time of day.
SetTreeRegrowTime void SetTreeRegrowTime(float time) Sets the tree regrow time in seconds.
SetUseBaseGoldBountyOnHeroes void SetUseBaseGoldBountyOnHeroes(bool a) Heroes will use the basic NPC functionality for determining their bounty, rather than DOTA specific formulas.
SetUseCustomHeroXPValues void SetUseCustomHeroXPValues(bool a) Allows heroes in the map to give a specific amount of XP (this value must be set).
SetUseUniversalShopMode void SetUseUniversalShopMode(bool enabled) When true, all items are available at as long as any shop is in range, including Secret Shop items
State_Get <> State_Get() Get the current Gamerules state


CToneMapControllerComponent

暂无描述

Function Signature Description
GetBloomScale float GetBloomScale() Gets bloomscale for this tonemap controller
GetMaxExposure float GetMaxExposure() Gets max exposure for this tonemap controller
GetMinExposure float GetMinExposure() Gets min exposure for this tonemap controller
SetBloomScale void SetBloomScale(float a) Sets bloom scale for this tonemap controller
SetMaxExposure void SetMaxExposure(float a) Sets max exposure for this tonemap controller
SetMinExposure void SetMinExposure(float a) Sets min exposure for this tonemap controller


CDebugOverlayScriptHelper

暂无描述

Function Signature Description
Axis void Axis(Vector a, Quaternion b, float c, bool d, float e) Draws an axis. Specify origin + orientation in world space.
Box void Box(Vector a, Vector b, int c, int d, int e, int f, bool g, float h) Draws a world-space axis-aligned box. Specify bounds in world space.
BoxAngles void BoxAngles(Vector a, Vector b, Vector c, Quaternion d, int e, int f, int g, int h, bool i, float j) Draws an oriented box at the origin. Specify bounds in local space.
Capsule void Capsule(Vector a, Quaternion b, float c, float d, int e, int f, int g, int h, bool i, float j) Draws a capsule. Specify base in world space.
Circle void Circle(Vector a, Quaternion b, float c, int d, int e, int f, int g, bool h, float i) Draws a circle. Specify center in world space.
CircleScreenOriented void CircleScreenOriented(Vector a, float b, int c, int d, int e, int f, bool g, float h) Draws a circle oriented to the screen. Specify center in world space.
Cone void Cone(Vector a, Vector b, float c, float d, int e, int f, int g, int h, bool i, float j) Draws a wireframe cone. Specify endpoint and direction in world space.
Cross void Cross(Vector a, float b, int c, int d, int e, int f, bool g, float h) Draws a screen-aligned cross. Specify origin in world space.
Cross3D void Cross3D(Vector a, float b, int c, int d, int e, int f, bool g, float h) Draws a world-aligned cross. Specify origin in world space.
Cross3DOriented void Cross3DOriented(Vector a, Quaternion b, float c, int d, int e, int f, int g, bool h, float i) Draws an oriented cross. Specify origin in world space.
DrawTickMarkedLine void DrawTickMarkedLine(Vector a, Vector b, float c, int d, int e, int f, int g, int h, bool i, float j) Draws a dashed line. Specify endpoint's in world space.
EntityAttachments void EntityAttachments(ehandle a, float b) Draws the attachments of the entity
EntityAxis void EntityAxis(ehandle a, float b, bool c, float d) Draws the axis of the entity origin
EntityBounds void EntityBounds(ehandle a, int b, int c, int d, int e, bool f, float g) Draws bounds of an entity
EntitySkeleton void EntitySkeleton(ehandle a, float b) Draws the skeleton of the entity
EntityText void EntityText(ehandle a, int b, string c, int d, int e, int f, int g, float h) Draws text on an entity
FilledRect2D void FilledRect2D(Vector2D a, Vector2D b, int c, int d, int e, int f, float g) Draws a screen-space filled 2D rectangle. Coordinates are in pixels.
HorzArrow void HorzArrow(Vector a, Vector b, float c, int d, int e, int f, int g, bool h, float i) Draws a horizontal arrow. Specify endpoint's in world space.
Line void Line(Vector a, Vector b, int c, int d, int e, int f, bool g, float h) Draws a line between two point's
Line2D void Line2D(Vector2D a, Vector2D b, int c, int d, int e, int f, float g) Draws a line between two point's in screenspace
PopDebugOverlayScope void PopDebugOverlayScope() Pops the identifier used to group overlays. Overlays marked with this identifier can be deleted in a big batch.
PushAndClearDebugOverlayScope void PushAndClearDebugOverlayScope(utlstringtoken a) Pushes an identifier used to group overlays. Deletes all existing overlays using this overlay id.
PushDebugOverlayScope void PushDebugOverlayScope(utlstringtoken a) Pushes an identifier used to group overlays. Overlays marked with this identifier can be deleted in a big batch.
RemoveAllInScope void RemoveAllInScope(utlstringtoken a) Removes all overlays marked with a specific identifier, regardless of their lifetime.
SolidCone void SolidCone(Vector a, Vector b, float c, float d, int e, int f, int g, int h, bool i, float j) Draws a solid cone. Specify endpoint and direction in world space.
Sphere void Sphere(Vector a, float b, int c, int d, int e, int f, bool g, float h) Draws a wireframe sphere. Specify center in world space.
SweptBox void SweptBox(Vector a, Vector b, Vector c, Vector d, Quaternion e, int f, int g, int h, int i, float j) Draws a swept box. Specify endpoint's in world space and the bounds in local space.
Text void Text(Vector a, int b, string c, float d, int e, int f, int g, int h, float i) Draws 2D text. Specify origin in world space.
Texture void Texture(string a, Vector2D b, Vector2D c, int d, int e, int f, int g, Vector2D h, Vector2D i, float j) Draws a screen-space texture. Coordinates are in pixels.
Triangle void Triangle(Vector a, Vector b, Vector c, int d, int e, int f, int g, bool h, float i) Draws a filled triangle. Specify vertices in world space.
UnitTestCycleOverlayRenderType void UnitTestCycleOverlayRenderType() Toggles the overlay render type, for unit tests
VectorText3D void VectorText3D(Vector a, Quaternion b, string c, int d, int e, int f, int g, bool h, float i) Draws 3D text. Specify origin + orientation in world space.
VertArrow void VertArrow(Vector a, Vector b, float c, int d, int e, int f, int g, bool h, float i) Draws a vertical arrow. Specify endpoint's in world space.
YawArrow void YawArrow(Vector a, float b, float c, float d, int e, int f, int g, int h, bool i, float j) Draws a arrow associated with a specific yaw. Specify endpoint's in world space.


CBaseFlex

Animated characters who have vertex flex capability (Hi hex6)

Function Signature Description
GetCurrentScene handle GetCurrentScene() Returns the instance of the oldest active scene entity (if any).
GetSceneByIndex handle GetSceneByIndex(int a) Returns the instance of the scene entity at the specified index.


CSceneEntity

暂无描述

Function Signature Description
AddBroadcastTeamTarget void AddBroadcastTeamTarget(int a) Adds a team (by index) to the broadcast list
Cancel void Cancel() Cancel scene playback
EstimateLength float EstimateLength() Returns length of this scene in seconds.
FindCamera handle FindCamera() Get the camera
FindNamedEntity handle FindNamedEntity(string a) given an entity reference, such as !target, get actual entity from scene object
IsPaused bool IsPaused() If this scene is currently paused.
IsPlayingBack bool IsPlayingBack() If this scene is currently playing.
LoadSceneFromString bool LoadSceneFromString(string a, string b) given a dummy scene name and a vcd string, load the scene
RemoveBroadcastTeamTarget void RemoveBroadcastTeamTarget(int a) Removes a team (by index) from the broadcast list
Start void Start(handle a) Start scene playback, takes activatorEntity as param


GridNav

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

Function Signature Description
GridPosToWorldCenterX float GridPosToWorldCenterX(int a) Get the X position of the center of a given X index
GridPosToWorldCenterY float GridPosToWorldCenterY(int a) Get the Y position of the center of a given Y index
IsBlocked bool IsBlocked(Vector a) Checks whether the given position is blocked
IsNearbyTree bool IsNearbyTree(Vector position, float radius, bool c)
IsTraversable bool IsTraversable(Vector a) Checks whether the given position is traversable
RegrowAllTrees void RegrowAllTrees()
WorldToGridPosX int WorldToGridPosX(float a) Get the X index of a given world X position
WorldToGridPosY int WorldToGridPosY(float a) Get the Y index of a given world Y position


Convars

暂无描述

Global accessor variable: ConVars

Function Signature Description
GetBool table GetBool(string variableName) GetBool(name) : returns the convar as a boolean flag.
GetCommandClient handle GetCommandClient() GetCommandClient() : returns the player who issued this console command.
GetDOTACommandClient handle GetDOTACommandClient() GetDOTACommandClient() : returns the DOTA player who issued this console command.
GetFloat table GetFloat(string name) GetFloat(name) : returns the convar as a float. May return nil if no such convar.
GetInt table GetInt(string a) GetInt(name) : returns the convar as an int. May return nil if no such convar.
GetStr table GetStr(string variableName) GetStr(name) : returns the convar as a string. May return nil if no such convar.
RegisterCommand void RegisterCommand(string variableName, handle function, string helpText, int flags) RegisterCommand(name, fn, helpString, flags) : register a console command.
RegisterConvar void RegisterConvar(string name, string defaultValue, string helpText, int flags) RegisterConvar(name, defaultValue, helpString, flags): register a new console variable.
SetBool void SetBool(string variableName, bool value) SetBool(name, val) : sets the value of the convar to the bool.
SetFloat void SetFloat(string variableName, float value) SetFloat(name, val) : sets the value of the convar to the float.
SetInt void SetInt(string a, int b) SetInt(name, val) : sets the value of the convar to the int.
SetStr void SetStr(string a, string b) SetStr(name, val) : sets the value of the convar to the string.