User:Tet: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 49: Line 49:
''C-side of entity framework''
''C-side of entity framework''


{|
 
| ShowMessage
=== CEntities ===
| <code>void ShowMessage( cstring )</code>
''!The global list of entities''
| Print a hud message on all clients
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| GetMapName
| First
| <code>cstring GetMapName()</code>
| <code>hscript First()</code>
| Get the name of the map.
| Begin an iteration over the list of entities
|-
|-
| SendToConsole
| Next
| <code>void SendToConsole( cstring )</code>
| <code>hscript Next( hscript )</code>
| Send a string to the console as a client command
| Continue an iteration over the list of entities, providing reference to a previously found entity
|-
|-
| SendToServerConsole
| CreateByClassname
| <code>void SendToServerConsole( cstring )</code>
| <code>hscript CreateByClassname( cstring )</code>
| Send a string to the console as a server command
| Creates an entity by classname
|-
|-
| PrintLinkedConsoleMessage
| FindByClassname
| <code>void PrintLinkedConsoleMessage( cstring, cstring )</code>
| <code>hscript FindByClassname( hscript, cstring )</code>
| Print a console message with a linked console command
| Find entities by class name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
|-
| InitLogFile
| FindAllByClassname
| <code>void InitLogFile( cstring, cstring )</code>
| <code>variant FindAllByClassname( cstring )</code>
| If the given file doesn't exist, creates it with the given contents; does nothing if it exists
| Find entities by class name.
|-
|-
| AppendToLogFile
| FindByName
| <code>void AppendToLogFile( cstring, cstring )</code>
| <code>hscript FindByName( hscript, cstring )</code>
| Appends a string to a log file on the server
| Find entities by name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
|-
| GetWorldMinX
| FindAllByName
| <code>float GetWorldMinX()</code>
| <code>variant FindAllByName( cstring )</code>
| Gets the world's minimum X position.
| Find entities by name; returns an array of everything found.
|-
|-
| GetWorldMinY
| FindInSphere
| <code>float GetWorldMinY()</code>
| <code>hscript FindInSphere( hscript, vector, float )</code>
| Gets the world's maximum Y position.
| Find entities within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
|-
| GetWorldMaxX
| FindAllInSphere
| <code>float GetWorldMaxX()</code>
| <code>variant FindAllInSphere( vector, float )</code>
| Gets the world's minimum X position.
| Find entities within a radius.
|-
|-
| GetWorldMaxY
| FindByTarget
| <code>float GetWorldMaxY()</code>
| <code>hscript FindByTarget( hscript, cstring )</code>
| Gets the world's maximum Y position.
| Find entities by targetname. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
|-
| Time
| FindAllByTarget
| <code>float Time()</code>
| <code>variant FindAllByTarget( cstring )</code>
| Get the current server time
| Find entities by targetname.
|-
|-
| GetSystemTime
| FindByModel
| <code>cstring GetSystemTime()</code>
| <code>hscript FindByModel( hscript, cstring )</code>
| Get the current real world time
| Find entities by model name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
|-
| GetSystemDate
| FindAllByModel
| <code>cstring GetSystemDate()</code>
| <code>variant FindAllByModel( cstring )</code>
| Get the current real world date
| Find entities by model name.
|-
|-
| UTIL_RemoveImmediate
| FindByNameNearest
| <code>void UTIL_RemoveImmediate( hscript )</code>
| <code>hscript FindByNameNearest( cstring, vector, float )</code>
| Immediately removes the specified entity
| Find entities by name nearest to a point.
|-
|-
| DoEntFire
| FindByNameWithin
| <code>void DoEntFire( cstring, cstring, cstring, float, hscript, hscript )</code>
| <code>hscript FindByNameWithin( hscript, cstring, vector, float )</code>
| #EntFire:Generate and entity i/o event
| Find entities by name within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
|-
| EntFireByHandle
| FindAllByNameWithin
| <code>void EntFireByHandle( hscript, cstring, cstring, float, hscript, hscript )</code>
| <code>variant FindAllByNameWithin( cstring, vector, float )</code>
| Generate and entity i/o event
| Find entities by name within a radius.
|-
|-
| IsValidEntity
| FindByClassnameNearest
| <code>bool IsValidEntity( hscript )</code>
| <code>hscript FindByClassnameNearest( cstring, vector, float )</code>
| Checks to see if the given hScript is a valid entity
| Find entities by class name nearest to a point.
|-
|-
| IsMarkedForDeletion
| FindByClassnameWithin
| <code>bool IsMarkedForDeletion( hscript )</code>
| <code>hscript FindByClassnameWithin( hscript, cstring, vector, float )</code>
| Returns true if the entity is valid and marked for deletion.
| Find entities by class name within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
|-
| DoUniqueString
| FindAllByClassnameWithin
| <code>cstring DoUniqueString( cstring )</code>
| <code>variant FindAllByClassnameWithin( cstring, vector, float )</code>
| #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 tables when not sure what keys are already in use in that table.
| Find entities by class name within a radius.
|}
 
 
=== Convars ===
''!Access to convar functions''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| ListenToGameEvent
| GetFloat
| <code>int ListenToGameEvent( cstring, hscript, hscript )</code>
| <code>variant GetFloat( cstring )</code>
| Register as a listener for a game event from script.
| GetFloat(name) : returns the convar as a float. May return null if no such convar.
|-
|-
| StopListeningToGameEvent
| GetStr
| <code>bool StopListeningToGameEvent( int )</code>
| <code>variant GetStr( cstring )</code>
| Stop listening to a particular game event.
| GetFloat(name) : returns the convar as a string. May return null if no such convar.
|-
|-
| FireGameEvent
| GetBool
| <code>void FireGameEvent( cstring, hscript )</code>
| <code>variant GetBool( cstring )</code>
| Fire a game event.
| GetBool(name) : returns the convar as a boolean flag.
|-
|-
| FireGameEventLocal
| RegisterCommand
| <code>void FireGameEventLocal( cstring, hscript )</code>
| <code>void RegisterCommand( cstring, hscript, cstring, int )</code>
| Fire a game event without broadcasting to the client.
| RegisterCommand(name, fn, helpString, flags) : register a console command.
|-
|-
| PauseGame
| RegisterConvar
| <code>void PauseGame( bool )</code>
| <code>void RegisterConvar( cstring, cstring, cstring, int )</code>
| Pause or unpause the game.
| RegisterConvar(name, defaultValue, helpString, flags): register a new console variable.
|-
|-
| EntIndexToHScript
| GetCommandClient
| <code>hscript EntIndexToHScript( int )</code>
| <code>hscript GetCommandClient()</code>
| Turn an entity index integer to an HScript representing that entity's script instance.
| GetCommandClient() : returns the player who issued this console command.
|-
|-
| PlayerInstanceFromIndex
| GetDOTACommandClient
| <code>hscript PlayerInstanceFromIndex( int )</code>
| <code>hscript GetDOTACommandClient()</code>
| Get a script instance of a player by index.
| GetDOTACommandClient() : returns the DOTA player who issued this console command.
|-
|}
| GetListenServerHost
 
| <code>hscript GetListenServerHost()</code>
 
| Get the local player on a listen server.
=== CScriptHeroList ===
''!The global list of heroes''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| ScreenShake
| GetHero
| <code>void ScreenShake( vector, float, float, float, float, int, bool )</code>
| <code>hscript GetHero( int )</code>
| Start a screenshake with the following parameters. vecCenter, flAmplitude, flFrequency, flDuration, flRadius, eCommand( SHAKE_START = 0, SHAKE_STOP = 1 ), bAirShake
| Get the Nth hero in the Hero List
|-
|-
| SpawnEntityFromTable
| GetHeroCount
| <code>bool SpawnEntityFromTable( cstring, hscript, hscript, hscript, hscript )</code>
| <code>int GetHeroCount()</code>
| Spawns a single entity from a table
| Returns the number of heroes in the world
|-
|-
| SpawnEntityFromTableSync
| GetAllHeroes
| <code>hscript SpawnEntityFromTableSync( cstring, hscript )</code>
| <code>variant GetAllHeroes()</code>
| Spawns a single entity from a table
| Returns all the heroes in the world
|}
 
 
=== CDOTAGamerules ===
''!DOTA GameRules''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| SpawnEntityGroupFromTable
| State_Get
| <code>bool SpawnEntityGroupFromTable( hscript, bool, hscript )</code>
| <code>unknown_variant_type State_Get()</code>
| Hierarchically spawn an entity group from a set of spawn tables.
| Get the current Gamerules state
|-
|-
| PrecacheEntityFromTable
| GetGameTime
| <code>bool PrecacheEntityFromTable( hscript )</code>
| <code>float GetGameTime()</code>
| Precache an entity from KeyValues in table
| Returns the number of seconds elapsed since map start. This time doesn't count up when the game is paused
|-
|-
| PrecacheResource
| GetDifficulty
| <code>void PrecacheResource( cstring, cstring )</code>
| <code>int GetDifficulty()</code>
| Manually precache a single resource
| Returns difficulty level of the custom game mode
|-
|-
| VectorToAngles
| GetCustomGameDifficulty
| <code>qangle VectorToAngles( vector )</code>
| <code>int GetCustomGameDifficulty()</code>
| Get Qangles (with no roll) for a Vector.
| Returns the difficulty level of the custom game mode
|-
|-
| RotatePosition
| Defeated
| <code>vector RotatePosition( vector, qangle, vector )</code>
| <code>void Defeated()</code>
| Rotate a Vector around a point.
| Kills the ancient, etc.
|-
|-
| RotateOrientation
| ResetDefeated
| <code>qangle RotateOrientation( qangle, qangle )</code>
| <code>void ResetDefeated()</code>
| Rotate a QAngle by another QAngle.
| Restart after killing the ancient, etc.
|-
|-
| RotationDelta
| SetGameWinner
| <code>qangle RotationDelta( qangle, qangle )</code>
| <code>void SetGameWinner( int )</code>
| Find the delta between two angles.
| Makes ths specified team win
|-
|-
| EmitSoundOn
| MakeTeamLose
| <code>void EmitSoundOn( cstring, hscript )</code>
| <code>void MakeTeamLose( int )</code>
| Play named sound on Entity
| Makes ths specified team lose
|-
|-
| EmitSoundOnClient
| ResetMap
| <code>void EmitSoundOnClient( cstring, hscript )</code>
| <code>void ResetMap( int )</code>
| Play named sound only on the client for the passed in player
| Resets the map in one of several ways
|-
|-
| EmitGlobalSound
| GetDroppedItem
| <code>void EmitGlobalSound( cstring )</code>
| <code>hscript GetDroppedItem( int )</code>
| Play named sound for all players
| Gets the Xth dropped item
|-
|-
| StopSoundOn
| NumDroppedItems
| <code>void StopSoundOn( cstring, hscript )</code>
| <code>int NumDroppedItems()</code>
| Stop named sound on Entity
| Returns the number of items currently dropped on the ground
|-
|-
| GetPhysVelocity
| SendCustomMessage
| <code>vector GetPhysVelocity( hscript )</code>
| <code>void SendCustomMessage( cstring, int, int )</code>
| Get Velocity for VPHYS or normal object
| Sends a string to the defined team.
|-
|-
| GetPhysAngularVelocity
| SetHeroRespawnEnabled
| <code>vector GetPhysAngularVelocity( hscript )</code>
| <code>void SetHeroRespawnEnabled( bool )</code>
| Get Angular Velocity for VPHYS or normal object
| Control if the normal DOTA hero respawn rules apply.
|-
|-
| Say
| Playtesting_UpdateCustomKeyValues
| <code>void Say( hscript, cstring, bool )</code>
| <code>void Playtesting_UpdateCustomKeyValues()</code>
| Have Entity say string, and teamOnly or not
| Updates custom hero, unit and ability KeyValues in memory with the latest values from disk
|-
|-
| AddThinkToEnt
| ResetToHeroSelection
| <code>void AddThinkToEnt( hscript, cstring )</code>
| <code>void ResetToHeroSelection()</code>
| Adds a late bound think function to the C++ think tables for the obj
| Restart the game at hero selection
|-
|-
| LoadKeyValues
| SetTreeRegrowTime
| <code>variant LoadKeyValues( cstring )</code>
| <code>void SetTreeRegrowTime( float )</code>
| Creates a table from the specified keyvalues text file
| Sets the tree regrow time in seconds.
|-
|-
| LoadKeyValuesFromString
| SetHeroSelectionTime
| <code>variant LoadKeyValuesFromString( cstring )</code>
| <code>void SetHeroSelectionTime( float )</code>
| Creates a table from the specified keyvalues string
| Sets the amount of time players have to pick their hero.
|-
|-
| DebugDrawScreenTextLine
| SetPreGameTime
| <code>void DebugDrawScreenTextLine( float, float, int, cstring, int, int, int, int, float )</code>
| <code>void SetPreGameTime( float )</code>
| Draw text with a line offset (x, y, lineOffset, text, r, g, b, a, duration)
| Sets the amount of time players have between picking their hero and game start.
|-
|-
| DebugDrawText
| SetPostGameTime
| <code>void DebugDrawText( vector, cstring, bool, float )</code>
| <code>void SetPostGameTime( float )</code>
| Draw text in 3d (origin, text, bViewCheck, duration)
| Sets the amount of time players have between the game ending and the server disconnecting them.
|-
|-
| DebugDrawBox
| SetRuneSpawnTime
| <code>void DebugDrawBox( vector, vector, vector, int, int, int, int, float )</code>
| <code>void SetRuneSpawnTime( float )</code>
| Draw a debug overlay box (origin, mins, maxs, forward, r, g, b, a, duration )
| Sets the amount of time between rune spawns.
|-
|-
| DebugDrawLine
| SetSameHeroSelectionEnabled
| <code>void DebugDrawLine( vector, vector, int, int, int, bool, float )</code>
| <code>void SetSameHeroSelectionEnabled( bool )</code>
| Draw a debug overlay line (origin, target, r, g, b, ztest, duration)
| When true, players can repeatedly pick the same hero.
|-
|-
| DebugDrawCircle
| SetUseUniversalShopMode
| <code>void DebugDrawCircle( vector, vector, float, float, bool, float )</code>
| <code>void SetUseUniversalShopMode( bool )</code>
| Draw a debug circle (center, vRgb, a, rad, a, ztest, duration)
| When true, all items are available at as long as any shop is in range.
|-
|-
| DebugDrawLine_vCol
| SetTimeOfDay
| <code>void DebugDrawLine_vCol( vector, vector, vector, bool, float )</code>
| <code>void SetTimeOfDay( float )</code>
| Draw a debug line using color vec (start, end, vRgb, a, ztest, duration)
| Set the time of day.
|-
|-
| DebugDrawBoxDirection
| SetOverlayHealthBarUnit
| <code>void DebugDrawBoxDirection( vector, vector, vector, vector, vector, float, float )</code>
| <code>void SetOverlayHealthBarUnit( hscript, int )</code>
| Draw a debug forward box (cent, min, max, forward, vRgb, a, duration)
| Show this unit's health on the overlay health bar
|-
|-
| DebugDrawClear
| SetHeroMinimapIconSize
| <code>void DebugDrawClear()</code>
| <code>void SetHeroMinimapIconSize( int )</code>
| Try to clear all the debug overlay info
| (nMinimapHeroIconSize) - Set the hero minimap icon size.
|-
|-
| GetFrameCount
| SetCreepMinimapIconScale
| <code>int GetFrameCount()</code>
| <code>void SetCreepMinimapIconScale( float )</code>
| Returns the engines current frame count
| (flMinimapCreepIconScale) - Scale the creep icons on the minimap.
|-
|-
| IsDedicatedServer
| SetRuneMinimapIconScale
| <code>bool IsDedicatedServer()</code>
| <code>void SetRuneMinimapIconScale( float )</code>
| Returns true if this server is a dedicated server.
| (flMinimapRuneIconScale) - Scale the rune icons on the minimap.
|-
|-
| CreateUnitByName
| SetSafeToLeave
| <code>hscript CreateUnitByName( cstring, vector, bool, hscript, hscript, int )</code>
| <code>void SetSafeToLeave( bool )</code>
| Creates a DOTA unit by its dota_npc_units.txt name
| (bSafeToLeave) - Mark this game as safe to leave.
|-
|-
| PrecacheUnitByName
| SetUseCustomHeroXPValues
| <code>bool PrecacheUnitByName( cstring )</code>
| <code>void SetUseCustomHeroXPValues( bool )</code>
| Precaches a DOTA unit by its dota_npc_units.txt name
| Allows heroes in the map to give a specific amount of XP (this value must be set).
|-
|-
| CreateHeroForPlayer
| SetCustomGameDifficulty
| <code>hscript CreateHeroForPlayer( cstring, hscript )</code>
| <code>void SetCustomGameDifficulty( int )</code>
| Creates a DOTA hero by its dota_npc_units.txt name and sets it as the given player's controlled hero
| Set the difficulty level of the custom game mode
|}
 
 
=== CDOTAVoteSystem ===
''!DOTA Vote System''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| CreateItem
| StartVote
| <code>hscript CreateItem( cstring, hscript, hscript )</code>
| <code>void StartVote( hscript )</code>
| Create a DOTA item
| Starts a vote, based upon a table of parameters
|-
|}
| CreateItemOnPosition
 
| <code>hscript CreateItemOnPosition( vector )</code>
 
| Create a physical item at a given location
=== CBaseEntity ===
''Root class of all server-side entities''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| FindClearSpaceForUnit
| ConnectOutput
| <code>void FindClearSpaceForUnit( hscript, vector, bool )</code>
| <code>void ConnectOutput( cstring, cstring )</code>
| Place a unit somewhere not already occupied.
| Adds an I/O connection that will call the named function when the specified output fires
|-
|-
| FindUnitsInRadius
| DisconnectOutput
| <code>variant FindUnitsInRadius( int, vector, hscript, float, int, int, int, int, bool )</code>
| <code>void DisconnectOutput( cstring, cstring )</code>
| Finds the units in a given radius with the given flags.
| Removes a connected script function from an I/O event.
|-
|-
| PrecacheUnit
| GetHealth
| <code>void PrecacheUnit( cstring )</code>
| <code>int GetHealth()</code>
| Precaches all the resources for a given unit.
|-
| GetFrostyPointsForRound
| <code>int GetFrostyPointsForRound( int, int, int )</code>
|  
|  
|-
|-
| GetGoldFrostyPointsForRound
| SetHealth
| <code>int GetGoldFrostyPointsForRound( int, int, int )</code>
| <code>void SetHealth( int )</code>
|  
|  
|-
|-
| GetFrostyBoostAmount
| GetMaxHealth
| <code>float GetFrostyBoostAmount( int, int )</code>
| <code>int GetMaxHealth()</code>
|  
|  
|-
|-
| GetGoldFrostyBoostAmount
| SetMaxHealth
| <code>float GetGoldFrostyBoostAmount( int, int )</code>
| <code>void SetMaxHealth( int )</code>
|  
|  
|-
|-
| SendFrostyPointsMessageToGC
| IsAlive
| <code>void SendFrostyPointsMessageToGC( hscript )</code>
| <code>bool IsAlive()</code>
|  
|  
|-
|-
| SendFrostivusTimeElapsedToGC
| Remove
| <code>void SendFrostivusTimeElapsedToGC()</code>
| <code>void Remove()</code>
|  
|  
|-
|-
| ExecuteOrderFromTable
| SetModel
| <code>void ExecuteOrderFromTable( hscript )</code>
| <code>void SetModel( cstring )</code>
| Issue an order from a script table
|  
|-
|-
| ShowGenericPopup
| GetModelName
| <code>void ShowGenericPopup( cstring, cstring, cstring, cstring, int )</code>
| <code>cstring GetModelName()</code>
| Show a generic popup dialog for all players.
| Returns the name of the model
|-
|-
| ShowGenericPopupToPlayer
| EmitSound
| <code>void ShowGenericPopupToPlayer( hscript, cstring, cstring, cstring, cstring, int )</code>
| <code>void EmitSound( cstring )</code>
| Show a generic popup dialog to a specific player.
| Plays a sound from this entity.
|}
 
=== CEntities ===
''!The global list of entities''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| First
| EmitSoundParams
| <code>hscript First()</code>
| <code>void EmitSoundParams( cstring, int, float )</code>
| Begin an iteration over the list of entities
| Plays/modifies a sound from this entity. changes sound if nPitch and/or flVol is > 0.
|-
|-
| Next
| StopSound
| <code>hscript Next( hscript )</code>
| <code>void StopSound( cstring )</code>
| Continue an iteration over the list of entities, providing reference to a previously found entity
| Stops a named sound playing from this entity.
|-
|-
| CreateByClassname
| PrecacheSoundScript
| <code>hscript CreateByClassname( cstring )</code>
| <code>void PrecacheSoundScript( cstring )</code>
| Creates an entity by classname
| Precache a sound for later playing.
|-
|-
| FindByClassname
| GetSoundDuration
| <code>hscript FindByClassname( hscript, cstring )</code>
| <code>float GetSoundDuration( cstring, cstring )</code>
| Find entities by class name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
| Returns float duration of the sound. Takes soundname and optional actormodelname.
|-
|-
| FindAllByClassname
| GetClassname
| <code>variant FindAllByClassname( cstring )</code>
| <code>cstring GetClassname()</code>
| Find entities by class name.
|  
|-
|-
| FindByName
| GetName
| <code>hscript FindByName( hscript, cstring )</code>
| <code>cstring GetName()</code>
| Find entities by name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|  
|-
|-
| FindAllByName
| GetPreTemplateName
| <code>variant FindAllByName( cstring )</code>
| <code>cstring GetPreTemplateName()</code>
| Find entities by name; returns an array of everything found.
| Get the entity name stripped of template unique decoration
|-
|-
| FindInSphere
| GetAbsOrigin
| <code>hscript FindInSphere( hscript, vector, float )</code>
| <code>vector GetAbsOrigin()</code>
| Find entities within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|  
|-
|-
| FindAllInSphere
| SetAbsOrigin
| <code>variant FindAllInSphere( vector, float )</code>
| <code>void SetAbsOrigin( vector )</code>
| Find entities within a radius.
|  
|-
|-
| FindByTarget
| GetOrigin
| <code>hscript FindByTarget( hscript, cstring )</code>
| <code>vector GetOrigin()</code>
| Find entities by targetname. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|  
|-
|-
| FindAllByTarget
| SetAbsOrigin
| <code>variant FindAllByTarget( cstring )</code>
| <code>void SetAbsOrigin( vector )</code>
| Find entities by targetname.
| SetOrigin
|-
|-
| FindByModel
| SetOrigin
| <code>hscript FindByModel( hscript, cstring )</code>
| <code>void SetOrigin( vector )</code>
| Find entities by model name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|  
|-
|-
| FindAllByModel
| GetForwardVector
| <code>variant FindAllByModel( cstring )</code>
| <code>vector GetForwardVector()</code>
| Find entities by model name.
| Get the forward vector of the entity
|-
|-
| FindByNameNearest
| GetRightVector
| <code>hscript FindByNameNearest( cstring, vector, float )</code>
| <code>vector GetRightVector()</code>
| Find entities by name nearest to a point.
| Get the right vector of the entity
|-
|-
| FindByNameWithin
| GetUpVector
| <code>hscript FindByNameWithin( hscript, cstring, vector, float )</code>
| <code>vector GetUpVector()</code>
| Find entities by name within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
| Get the up vector of the entity
|-
|-
| FindAllByNameWithin
| SetForwardVector
| <code>variant FindAllByNameWithin( cstring, vector, float )</code>
| <code>void SetForwardVector( vector )</code>
| Find entities by name within a radius.
| Set the orientation of the entity to have this forward vector
|-
|-
| FindByClassnameNearest
| GetVelocity
| <code>hscript FindByClassnameNearest( cstring, vector, float )</code>
| <code>vector GetVelocity()</code>
| Find entities by class name nearest to a point.
|  
|-
|-
| FindByClassnameWithin
| SetVelocity
| <code>hscript FindByClassnameWithin( hscript, cstring, vector, float )</code>
| <code>void SetVelocity( vector )</code>
| Find entities by class name within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|  
|-
|-
| FindAllByClassnameWithin
| SetAngularVelocity
| <code>variant FindAllByClassnameWithin( cstring, vector, float )</code>
| <code>void SetAngularVelocity( float, float, float )</code>
| Find entities by class name within a radius.
| Set the local angular velocity - takes float pitch,yaw,roll velocities
|}
 
 
=== Convars ===
''!Access to convar functions''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| GetFloat
| GetAngularVelocity
| <code>variant GetFloat( cstring )</code>
| <code>vector GetAngularVelocity()</code>
| GetFloat(name) : returns the convar as a float. May return null if no such convar.
| Get the local angular velocity - returns a vector of pitch,yaw,roll
|-
|-
| GetStr
| GetCenter
| <code>variant GetStr( cstring )</code>
| <code>vector GetCenter()</code>
| GetFloat(name) : returns the convar as a string. May return null if no such convar.
| Get vector to center of object - absolute coords
|-
|-
| GetBool
| EyePosition
| <code>variant GetBool( cstring )</code>
| <code>vector EyePosition()</code>
| GetBool(name) : returns the convar as a boolean flag.
| Get vector to eye position - absolute coords
|-
|-
| RegisterCommand
| SetAngles
| <code>void RegisterCommand( cstring, hscript, cstring, int )</code>
| <code>void SetAngles( float, float, float )</code>
| RegisterCommand(name, fn, helpString, flags) : register a console command.
| Set entity pitch, yaw, roll
|-
|-
| RegisterConvar
| GetAngles
| <code>void RegisterConvar( cstring, cstring, cstring, int )</code>
| <code>vector GetAngles()</code>
| RegisterConvar(name, defaultValue, helpString, flags): register a new console variable.
| Get entity pitch, yaw, roll as a vector
|-
|-
| GetCommandClient
| SetSize
| <code>hscript GetCommandClient()</code>
| <code>void SetSize( vector, vector )</code>
| GetCommandClient() : returns the player who issued this console command.
|  
|-
|-
| GetDOTACommandClient
| GetBoundingMins
| <code>hscript GetDOTACommandClient()</code>
| <code>vector GetBoundingMins()</code>
| GetDOTACommandClient() : returns the DOTA player who issued this console command.
| Get a vector containing min bounds, centered on object
|}
 
 
=== CScriptHeroList ===
''!The global list of heroes''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| GetHero
| GetBoundingMaxs
| <code>hscript GetHero( int )</code>
| <code>vector GetBoundingMaxs()</code>
| Get the Nth hero in the Hero List
| Get a vector containing max bounds, centered on object
|-
|-
| GetHeroCount
| Destroy
| <code>int GetHeroCount()</code>
| <code>void Destroy()</code>
| Returns the number of heroes in the world
|  
|-
|-
| GetAllHeroes
| SetOwner
| <code>variant GetAllHeroes()</code>
| <code>void SetOwner( hscript )</code>
| Returns all the heroes in the world
|  
|}
 
 
=== CDOTAGamerules ===
''!DOTA GameRules''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| State_Get
| GetTeam
| <code>unknown_variant_type State_Get()</code>
| <code>int GetTeam()</code>
| Get the current Gamerules state
|  
|-
|-
| GetGameTime
| SetTeam
| <code>float GetGameTime()</code>
| <code>void SetTeam( int )</code>
| Returns the number of seconds elapsed since map start. This time doesn't count up when the game is paused
|  
|-
|-
| GetDifficulty
| GetMoveParent
| <code>int GetDifficulty()</code>
| <code>hscript GetMoveParent()</code>
| Returns difficulty level of the custom game mode
| If in hierarchy, retrieves the entity's parent
|-
|-
| GetCustomGameDifficulty
| GetRootMoveParent
| <code>int GetCustomGameDifficulty()</code>
| <code>hscript GetRootMoveParent()</code>
| Returns the difficulty level of the custom game mode
| If in hierarchy, walks up the hierarchy to find the root parent
|-
|-
| Defeated
| FirstMoveChild
| <code>void Defeated()</code>
| <code>hscript FirstMoveChild()</code>
| Kills the ancient, etc.
|  
|-
|-
| ResetDefeated
| NextMovePeer
| <code>void ResetDefeated()</code>
| <code>hscript NextMovePeer()</code>
| Restart after killing the ancient, etc.
|  
|-
|-
| SetGameWinner
| __KeyValueFromString
| <code>void SetGameWinner( int )</code>
| <code>bool __KeyValueFromString( cstring, cstring )</code>
| Makes ths specified team win
| @
|-
|-
| MakeTeamLose
| __KeyValueFromFloat
| <code>void MakeTeamLose( int )</code>
| <code>bool __KeyValueFromFloat( cstring, float )</code>
| Makes ths specified team lose
| @
|-
|-
| ResetMap
| __KeyValueFromInt
| <code>void ResetMap( int )</code>
| <code>bool __KeyValueFromInt( cstring, int )</code>
| Resets the map in one of several ways
| @
|-
|-
| GetDroppedItem
| __KeyValueFromVector
| <code>hscript GetDroppedItem( int )</code>
| <code>bool __KeyValueFromVector( cstring, vector )</code>
| Gets the Xth dropped item
| @
|-
|-
| NumDroppedItems
| Trigger
| <code>int NumDroppedItems()</code>
| <code>void Trigger()</code>
| Returns the number of items currently dropped on the ground
| Fires off this entity's OnTrigger responses
|-
|-
| SendCustomMessage
| ValidateScriptScope
| <code>void SendCustomMessage( cstring, int, int )</code>
| <code>bool ValidateScriptScope()</code>
| Sends a string to the defined team.
| Ensure that an entity's script scope has been created
|-
|-
| SetHeroRespawnEnabled
| GetScriptScope
| <code>void SetHeroRespawnEnabled( bool )</code>
| <code>hscript GetScriptScope()</code>
| Control if the normal DOTA hero respawn rules apply.
| Retrieve the script-side data associated with an entity
|-
|-
| Playtesting_UpdateCustomKeyValues
| GetScriptId
| <code>void Playtesting_UpdateCustomKeyValues()</code>
| <code>cstring GetScriptId()</code>
| Updates custom hero, unit and ability KeyValues in memory with the latest values from disk
| Retrieve the unique identifier used to refer to the entity within the scripting system
|-
|-
| ResetToHeroSelection
| GetOwner
| <code>void ResetToHeroSelection()</code>
| <code>hscript GetOwner()</code>
| Restart the game at hero selection
| Gets this entity's owner
|-
|-
| SetTreeRegrowTime
| SetOwner
| <code>void SetTreeRegrowTime( float )</code>
| <code>void SetOwner( hscript )</code>
| Sets the tree regrow time in seconds.
| Sets this entity's owner
|-
|-
| SetHeroSelectionTime
| entindex
| <code>void SetHeroSelectionTime( float )</code>
| <code>unknown_variant_type entindex()</code>
| Sets the amount of time players have to pick their hero.
|  
|-
|}
| SetPreGameTime
 
| <code>void SetPreGameTime( float )</code>
 
| Sets the amount of time players have between picking their hero and game start.
=== CDOTA_PlayerResource extends CBaseEntity ===
''Interface to player data''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| SetPostGameTime
| SetHasRepicked
| <code>void SetPostGameTime( float )</code>
| <code>void SetHasRepicked( int )</code>
| Sets the amount of time players have between the game ending and the server disconnecting them.
|  
|-
|-
| SetRuneSpawnTime
| HasRepicked
| <code>void SetRuneSpawnTime( float )</code>
| <code>bool HasRepicked( int )</code>
| Sets the amount of time between rune spawns.
|  
|-
|-
| SetSameHeroSelectionEnabled
| SetHasRandomed
| <code>void SetSameHeroSelectionEnabled( bool )</code>
| <code>void SetHasRandomed( int )</code>
| When true, players can repeatedly pick the same hero.
|  
|-
|-
| SetUseUniversalShopMode
| HasRandomed
| <code>void SetUseUniversalShopMode( bool )</code>
| <code>bool HasRandomed( int )</code>
| When true, all items are available at as long as any shop is in range.
|  
|-
|-
| SetTimeOfDay
| IsValidTeamPlayerID
| <code>void SetTimeOfDay( float )</code>
| <code>bool IsValidTeamPlayerID( int )</code>
| Set the time of day.
|  
|-
|-
| SetOverlayHealthBarUnit
| IsValidTeamPlayer
| <code>void SetOverlayHealthBarUnit( hscript, int )</code>
| <code>bool IsValidTeamPlayer( int )</code>
| Show this unit's health on the overlay health bar
|  
|-
|-
| SetHeroMinimapIconSize
| IsValidPlayerID
| <code>void SetHeroMinimapIconSize( int )</code>
| <code>bool IsValidPlayerID( int )</code>
| (nMinimapHeroIconSize) - Set the hero minimap icon size.
|  
|-
|-
| SetCreepMinimapIconScale
| IsValidPlayer
| <code>void SetCreepMinimapIconScale( float )</code>
| <code>bool IsValidPlayer( int )</code>
| (flMinimapCreepIconScale) - Scale the creep icons on the minimap.
|  
|-
|-
| SetRuneMinimapIconScale
| GetLevel
| <code>void SetRuneMinimapIconScale( float )</code>
| <code>int GetLevel( int )</code>
| (flMinimapRuneIconScale) - Scale the rune icons on the minimap.
|  
|-
|-
| SetSafeToLeave
| IncrementKills
| <code>void SetSafeToLeave( bool )</code>
| <code>void IncrementKills( int, int )</code>
| (bSafeToLeave) - Mark this game as safe to leave.
|  
|-
|-
| SetUseCustomHeroXPValues
| IncrementAssists
| <code>void SetUseCustomHeroXPValues( bool )</code>
| <code>void IncrementAssists( int )</code>
| Allows heroes in the map to give a specific amount of XP (this value must be set).
|  
|-
|-
| SetCustomGameDifficulty
| IncrementDeaths
| <code>void SetCustomGameDifficulty( int )</code>
| <code>void IncrementDeaths( int )</code>
| Set the difficulty level of the custom game mode
|  
|}
 
 
=== CDOTAVoteSystem ===
''!DOTA Vote System''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| StartVote
| GetKills
| <code>void StartVote( hscript )</code>
| <code>int GetKills( int )</code>
| Starts a vote, based upon a table of parameters
|  
|}
 
 
=== CBaseEntity ===
''Root class of all server-side entities''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| ConnectOutput
| GetAssists
| <code>void ConnectOutput( cstring, cstring )</code>
| <code>int GetAssists( int )</code>
| Adds an I/O connection that will call the named function when the specified output fires
|  
|-
|-
| DisconnectOutput
| GetDeaths
| <code>void DisconnectOutput( cstring, cstring )</code>
| <code>int GetDeaths( int )</code>
| Removes a connected script function from an I/O event.
|-
| GetHealth
| <code>int GetHealth()</code>
|  
|  
|-
|-
| SetHealth
| GetStuns
| <code>void SetHealth( int )</code>
| <code>float GetStuns( int )</code>
|  
|  
|-
|-
| GetMaxHealth
| GetHealing
| <code>int GetMaxHealth()</code>
| <code>float GetHealing( int )</code>
|  
|  
|-
|-
| SetMaxHealth
| GetTowerKills
| <code>void SetMaxHealth( int )</code>
| <code>int GetTowerKills( int )</code>
|  
|  
|-
|-
| IsAlive
| GetRoshanKills
| <code>bool IsAlive()</code>
| <code>int GetRoshanKills( int )</code>
|  
|  
|-
|-
| Remove
| GetTeamKills
| <code>void Remove()</code>
| <code>int GetTeamKills( int )</code>
|  
|  
|-
|-
| SetModel
| IncrementStreak
| <code>void SetModel( cstring )</code>
| <code>void IncrementStreak( int )</code>
|  
|  
|-
|-
| GetModelName
| ClearStreak
| <code>cstring GetModelName()</code>
| <code>void ClearStreak( int )</code>
| Returns the name of the model
|  
|-
|-
| EmitSound
| GetStreak
| <code>void EmitSound( cstring )</code>
| <code>int GetStreak( int )</code>
| Plays a sound from this entity.
|  
|-
|-
| EmitSoundParams
| ModifyGold
| <code>void EmitSoundParams( cstring, int, float )</code>
| <code>int ModifyGold( int, int, bool, int )</code>
| Plays/modifies a sound from this entity. changes sound if nPitch and/or flVol is > 0.
|  
|-
|-
| StopSound
| SetGold
| <code>void StopSound( cstring )</code>
| <code>void SetGold( int, int, bool )</code>
| Stops a named sound playing from this entity.
|  
|-
|-
| PrecacheSoundScript
| SpendGold
| <code>void PrecacheSoundScript( cstring )</code>
| <code>void SpendGold( int, int, int )</code>
| Precache a sound for later playing.
|-
| GetSoundDuration
| <code>float GetSoundDuration( cstring, cstring )</code>
| Returns float duration of the sound. Takes soundname and optional actormodelname.
|-
| GetClassname
| <code>cstring GetClassname()</code>
|  
|  
|-
|-
| GetName
| GetGold
| <code>cstring GetName()</code>
| <code>int GetGold( int )</code>
|  
|  
|-
|-
| GetPreTemplateName
| GetReliableGold
| <code>cstring GetPreTemplateName()</code>
| <code>int GetReliableGold( int )</code>
| Get the entity name stripped of template unique decoration
|  
|-
|-
| GetAbsOrigin
| GetUnreliableGold
| <code>vector GetAbsOrigin()</code>
| <code>int GetUnreliableGold( int )</code>
|  
|  
|-
|-
| SetAbsOrigin
| ResetTotalEarnedGold
| <code>void SetAbsOrigin( vector )</code>
| <code>void ResetTotalEarnedGold( int )</code>
|  
|  
|-
|-
| GetOrigin
| GetTotalEarnedGold
| <code>vector GetOrigin()</code>
| <code>int GetTotalEarnedGold( int )</code>
|  
|  
|-
|-
| SetAbsOrigin
| GetTotalGoldSpent
| <code>void SetAbsOrigin( vector )</code>
| <code>int GetTotalGoldSpent( int )</code>
| SetOrigin
|-
| SetOrigin
| <code>void SetOrigin( vector )</code>
|  
|  
|-
|-
| GetForwardVector
| AddGoldSpentOnSupport
| <code>vector GetForwardVector()</code>
| <code>void AddGoldSpentOnSupport( int, int )</code>
| Get the forward vector of the entity
|  
|-
|-
| GetRightVector
| GetGoldSpentOnSupport
| <code>vector GetRightVector()</code>
| <code>int GetGoldSpentOnSupport( int )</code>
| Get the right vector of the entity
|  
|-
|-
| GetUpVector
| GetGoldSpentOnConsumables
| <code>vector GetUpVector()</code>
| <code>int GetGoldSpentOnConsumables( int )</code>
| Get the up vector of the entity
|  
|-
|-
| SetForwardVector
| GetGoldSpentOnItems
| <code>void SetForwardVector( vector )</code>
| <code>int GetGoldSpentOnItems( int )</code>
| Set the orientation of the entity to have this forward vector
|-
| GetVelocity
| <code>vector GetVelocity()</code>
|  
|  
|-
|-
| SetVelocity
| GetGoldLostToDeath
| <code>void SetVelocity( vector )</code>
| <code>int GetGoldLostToDeath( int )</code>
|  
|  
|-
|-
| SetAngularVelocity
| GetGoldSpentOnBuybacks
| <code>void SetAngularVelocity( float, float, float )</code>
| <code>int GetGoldSpentOnBuybacks( int )</code>
| Set the local angular velocity - takes float pitch,yaw,roll velocities
|  
|-
|-
| GetAngularVelocity
| GetGoldPerMin
| <code>vector GetAngularVelocity()</code>
| <code>float GetGoldPerMin( int )</code>
| Get the local angular velocity - returns a vector of pitch,yaw,roll
|  
|-
|-
| GetCenter
| GetXPPerMin
| <code>vector GetCenter()</code>
| <code>float GetXPPerMin( int )</code>
| Get vector to center of object - absolute coords
|  
|-
|-
| EyePosition
| GetAegisPickups
| <code>vector EyePosition()</code>
| <code>int GetAegisPickups( int )</code>
| Get vector to eye position - absolute coords
|  
|-
|-
| SetAngles
| AddAegisPickup
| <code>void SetAngles( float, float, float )</code>
| <code>void AddAegisPickup( int )</code>
| Set entity pitch, yaw, roll
|  
|-
|-
| GetAngles
| GetRunePickups
| <code>vector GetAngles()</code>
| <code>int GetRunePickups( int )</code>
| Get entity pitch, yaw, roll as a vector
|  
|-
|-
| SetSize
| AddRunePickup
| <code>void SetSize( vector, vector )</code>
| <code>void AddRunePickup( int )</code>
|  
|  
|-
|-
| GetBoundingMins
| GetNumConsumablesPurchased
| <code>vector GetBoundingMins()</code>
| <code>int GetNumConsumablesPurchased( int )</code>
| Get a vector containing min bounds, centered on object
|  
|-
|-
| GetBoundingMaxs
| GetNumItemsPurchased
| <code>vector GetBoundingMaxs()</code>
| <code>int GetNumItemsPurchased( int )</code>
| Get a vector containing max bounds, centered on object
|  
|-
|-
| Destroy
| GetTimeOfLastItemPurchase
| <code>void Destroy()</code>
| <code>float GetTimeOfLastItemPurchase( int )</code>
|  
|  
|-
|-
| SetOwner
| GetTimeOfLastConsumablePurchase
| <code>void SetOwner( hscript )</code>
| <code>float GetTimeOfLastConsumablePurchase( int )</code>
|  
|  
|-
|-
| GetTeam
| GetTimeOfLastDeath
| <code>int GetTeam()</code>
| <code>float GetTimeOfLastDeath( int )</code>
|  
|  
|-
|-
| SetTeam
| GetRespawnSeconds
| <code>void SetTeam( int )</code>
| <code>int GetRespawnSeconds( int )</code>
|  
|  
|-
|-
| GetMoveParent
| IncrementTotalEarnedXP
| <code>hscript GetMoveParent()</code>
| <code>void IncrementTotalEarnedXP( int, int )</code>
| If in hierarchy, retrieves the entity's parent
|  
|-
|-
| GetRootMoveParent
| GetTotalEarnedXP
| <code>hscript GetRootMoveParent()</code>
| <code>int GetTotalEarnedXP( int )</code>
| If in hierarchy, walks up the hierarchy to find the root parent
|  
|-
|-
| FirstMoveChild
| AddClaimedFarm
| <code>hscript FirstMoveChild()</code>
| <code>void AddClaimedFarm( int, float )</code>
|  
|  
|-
|-
| NextMovePeer
| GetClaimedFarm
| <code>hscript NextMovePeer()</code>
| <code>float GetClaimedFarm( int )</code>
|  
|  
|-
|-
| __KeyValueFromString
| GetRawPlayerDamage
| <code>bool __KeyValueFromString( cstring, cstring )</code>
| <code>int GetRawPlayerDamage( int )</code>
| @
|  
|-
|-
| __KeyValueFromFloat
| ClearRawPlayerDamageMatrix
| <code>bool __KeyValueFromFloat( cstring, float )</code>
| <code>void ClearRawPlayerDamageMatrix( int )</code>
| @
|  
|-
|-
| __KeyValueFromInt
| ClearKillsMatrix
| <code>bool __KeyValueFromInt( cstring, int )</code>
| <code>void ClearKillsMatrix( int )</code>
| @
|  
|-
|-
| __KeyValueFromVector
| GetTowerDamageTaken
| <code>bool __KeyValueFromVector( cstring, vector )</code>
| <code>int GetTowerDamageTaken( int )</code>
| @
|  
|-
|-
| Trigger
| GetCreepDamageTaken
| <code>void Trigger()</code>
| <code>int GetCreepDamageTaken( int )</code>
| Fires off this entity's OnTrigger responses
|  
|-
|-
| ValidateScriptScope
| GetHeroDamageTaken
| <code>bool ValidateScriptScope()</code>
| <code>int GetHeroDamageTaken( int )</code>
| Ensure that an entity's script scope has been created
|  
|-
|-
| GetScriptScope
| GetDamageDoneToHero
| <code>hscript GetScriptScope()</code>
| <code>int GetDamageDoneToHero( int, int )</code>
| Retrieve the script-side data associated with an entity
|  
|-
|-
| GetScriptId
| GetKillsDoneToHero
| <code>cstring GetScriptId()</code>
| <code>int GetKillsDoneToHero( int, int )</code>
| Retrieve the unique identifier used to refer to the entity within the scripting system
|  
|-
|-
| GetOwner
| GetSelectedHeroName
| <code>hscript GetOwner()</code>
| <code>cstring GetSelectedHeroName( int )</code>
| Gets this entity's owner
|  
|-
|-
| SetOwner
| GetSelectedHeroID
| <code>void SetOwner( hscript )</code>
| <code>int GetSelectedHeroID( int )</code>
| Sets this entity's owner
|  
|-
|-
| entindex
| IsHeroSelected
| <code>unknown_variant_type entindex()</code>
| <code>bool IsHeroSelected( cstring )</code>
|  
|  
|}
=== CDOTA_PlayerResource extends CBaseEntity ===
''Interface to player data''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| SetHasRepicked
| WhoSelectedHero
| <code>void SetHasRepicked( int )</code>
| <code>int WhoSelectedHero( cstring )</code>
|  
|  
|-
|-
| HasRepicked
| GetSelectedHeroEntity
| <code>bool HasRepicked( int )</code>
| <code>hscript GetSelectedHeroEntity( int )</code>
|  
|  
|-
|-
| SetHasRandomed
| HasSelectedHero
| <code>void SetHasRandomed( int )</code>
| <code>bool HasSelectedHero( int )</code>
|  
|  
|-
|-
| HasRandomed
| GetPlayer
| <code>bool HasRandomed( int )</code>
| <code>hscript GetPlayer( int )</code>
|  
|  
|-
|-
| IsValidTeamPlayerID
| GetNthPlayerIDOnTeam
| <code>bool IsValidTeamPlayerID( int )</code>
| <code>int GetNthPlayerIDOnTeam( int, int )</code>
|  
|  
|-
|-
| IsValidTeamPlayer
| IncrementLastHits
| <code>bool IsValidTeamPlayer( int )</code>
| <code>void IncrementLastHits( int )</code>
|  
|  
|-
|-
| IsValidPlayerID
| GetLastHits
| <code>bool IsValidPlayerID( int )</code>
| <code>int GetLastHits( int )</code>
|  
|  
|-
|-
| IsValidPlayer
| IncrementGoldBagsCollected
| <code>bool IsValidPlayer( int )</code>
| <code>void IncrementGoldBagsCollected( int )</code>
|  
|  
|-
|-
| GetLevel
| GetGoldBagsCollected
| <code>int GetLevel( int )</code>
| <code>int GetGoldBagsCollected( int )</code>
|  
|  
|-
|-
| IncrementKills
| IncrementLastHitStreak
| <code>void IncrementKills( int, int )</code>
| <code>void IncrementLastHitStreak( int )</code>
|  
|  
|-
|-
| IncrementAssists
| ClearLastHitStreak
| <code>void IncrementAssists( int )</code>
| <code>void ClearLastHitStreak( int )</code>
|  
|  
|-
|-
| IncrementDeaths
| GetLastHitStreak
| <code>void IncrementDeaths( int )</code>
| <code>int GetLastHitStreak( int )</code>
|  
|  
|-
|-
| GetKills
| IncrementLastHitMultikill
| <code>int GetKills( int )</code>
| <code>void IncrementLastHitMultikill( int )</code>
|  
|  
|-
|-
| GetAssists
| ClearLastHitMultikill
| <code>int GetAssists( int )</code>
| <code>void ClearLastHitMultikill( int )</code>
|  
|  
|-
|-
| GetDeaths
| GetLastHitMultikill
| <code>int GetDeaths( int )</code>
| <code>int GetLastHitMultikill( int )</code>
|  
|  
|-
|-
| GetStuns
| IncrementNearbyCreepDeaths
| <code>float GetStuns( int )</code>
| <code>void IncrementNearbyCreepDeaths( int )</code>
|  
|  
|-
|-
| GetHealing
| GetNearbyCreepDeaths
| <code>float GetHealing( int )</code>
| <code>int GetNearbyCreepDeaths( int )</code>
|  
|  
|-
|-
| GetTowerKills
| IncrementDenies
| <code>int GetTowerKills( int )</code>
| <code>void IncrementDenies( int )</code>
|  
|  
|-
|-
| GetRoshanKills
| GetDenies
| <code>int GetRoshanKills( int )</code>
| <code>int GetDenies( int )</code>
|  
|  
|-
|-
| GetTeamKills
| IncrementClaimedMisses
| <code>int GetTeamKills( int )</code>
| <code>void IncrementClaimedMisses( int )</code>
|  
|  
|-
|-
| IncrementStreak
| GetClaimedMisses
| <code>void IncrementStreak( int )</code>
| <code>int GetClaimedMisses( int )</code>
|  
|  
|-
|-
| ClearStreak
| IncrementClaimedDenies
| <code>void ClearStreak( int )</code>
| <code>void IncrementClaimedDenies( int )</code>
|  
|  
|-
|-
| GetStreak
| GetClaimedDenies
| <code>int GetStreak( int )</code>
| <code>int GetClaimedDenies( int )</code>
|  
|  
|-
|-
| ModifyGold
| IncrementMisses
| <code>int ModifyGold( int, int, bool, int )</code>
| <code>void IncrementMisses( int )</code>
|  
|  
|-
|-
| SetGold
| GetMisses
| <code>void SetGold( int, int, bool )</code>
| <code>int GetMisses( int )</code>
|  
|  
|-
|-
| SpendGold
| UpdateTeamSlot
| <code>void SpendGold( int, int, int )</code>
| <code>void UpdateTeamSlot( int, int )</code>
|  
|  
|-
|-
| GetGold
| GetTeam
| <code>int GetGold( int )</code>
| <code>int GetTeam( int )</code>
|  
|  
|-
|-
| GetReliableGold
| IsBroadcaster
| <code>int GetReliableGold( int )</code>
| <code>bool IsBroadcaster( int )</code>
|  
|  
|-
|-
| GetUnreliableGold
| GetBroadcasterChannel
| <code>int GetUnreliableGold( int )</code>
| <code>uint GetBroadcasterChannel( int )</code>
|  
|  
|-
|-
| ResetTotalEarnedGold
| GetBroadcasterChannelSlot
| <code>void ResetTotalEarnedGold( int )</code>
| <code>uint GetBroadcasterChannelSlot( int )</code>
|  
|  
|-
|-
| GetTotalEarnedGold
| GetSteamAccountID
| <code>int GetTotalEarnedGold( int )</code>
| <code>uint GetSteamAccountID( int )</code>
|  
|  
|-
|-
| GetTotalGoldSpent
| IsFakeClient
| <code>int GetTotalGoldSpent( int )</code>
| <code>bool IsFakeClient( int )</code>
|  
|  
|-
|-
| AddGoldSpentOnSupport
| HaveAllPlayersJoined
| <code>void AddGoldSpentOnSupport( int, int )</code>
| <code>bool HaveAllPlayersJoined()</code>
|  
|  
|-
|-
| GetGoldSpentOnSupport
| GetPlayerLoadedCompletely
| <code>int GetGoldSpentOnSupport( int )</code>
| <code>bool GetPlayerLoadedCompletely( int )</code>
|  
|  
|-
|-
| GetGoldSpentOnConsumables
| SetPlayerReservedState
| <code>int GetGoldSpentOnConsumables( int )</code>
| <code>void SetPlayerReservedState( int, bool )</code>
|  
|  
|-
|-
| GetGoldSpentOnItems
| GetPlayerReservedState
| <code>int GetGoldSpentOnItems( int )</code>
| <code>bool GetPlayerReservedState( int )</code>
|  
|  
|-
|-
| GetGoldLostToDeath
| GetConnectionState
| <code>int GetGoldLostToDeath( int )</code>
| <code>unknown_variant_type GetConnectionState( int )</code>
|  
|  
|-
|-
| GetGoldSpentOnBuybacks
| HeroLevelUp
| <code>int GetGoldSpentOnBuybacks( int )</code>
| <code>void HeroLevelUp( int )</code>
|  
|  
|-
|-
| GetGoldPerMin
| SetLastBuybackTime
| <code>float GetGoldPerMin( int )</code>
| <code>void SetLastBuybackTime( int, int )</code>
|  
|  
|-
|-
| GetXPPerMin
| GetPlayerName
| <code>float GetXPPerMin( int )</code>
| <code>cstring GetPlayerName( int )</code>
|  
|  
|-
|-
| GetAegisPickups
| GetUnitShareMaskForPlayer
| <code>int GetAegisPickups( int )</code>
| <code>int GetUnitShareMaskForPlayer( int, int )</code>
|  
|  
|-
|-
| AddAegisPickup
| IsHeroSharedWithPlayerID
| <code>void AddAegisPickup( int )</code>
| <code>bool IsHeroSharedWithPlayerID( int, int )</code>
|  
|  
|-
|-
| GetRunePickups
| AreUnitsSharedWithPlayerID
| <code>int GetRunePickups( int )</code>
| <code>bool AreUnitsSharedWithPlayerID( int, int )</code>
|  
|  
|-
|-
| AddRunePickup
| IsDisableHelpSetForPlayerID
| <code>void AddRunePickup( int )</code>
| <code>bool IsDisableHelpSetForPlayerID( int, int )</code>
|  
|  
|-
|-
| GetNumConsumablesPurchased
| SetUnitShareMaskForPlayer
| <code>int GetNumConsumablesPurchased( int )</code>
| <code>void SetUnitShareMaskForPlayer( int, int, int, bool )</code>
|  
|  
|-
|-
| GetNumItemsPurchased
| GetNumCouriersForTeam
| <code>int GetNumItemsPurchased( int )</code>
| <code>int GetNumCouriersForTeam( int )</code>
|  
|  
|-
|-
| GetTimeOfLastItemPurchase
| GetNthCourierForTeam
| <code>float GetTimeOfLastItemPurchase( int )</code>
| <code>hscript GetNthCourierForTeam( int, int )</code>
|  
|  
|-
|-
| GetTimeOfLastConsumablePurchase
| SetBuybackCooldownTime
| <code>float GetTimeOfLastConsumablePurchase( int )</code>
| <code>void SetBuybackCooldownTime( int, float )</code>
|  
|  
|-
|-
| GetTimeOfLastDeath
| SetBuybackGoldLimitTime
| <code>float GetTimeOfLastDeath( int )</code>
| <code>void SetBuybackGoldLimitTime( int, float )</code>
|  
|  
|-
|-
| GetRespawnSeconds
| ResetBuybackCostTime
| <code>int GetRespawnSeconds( int )</code>
| <code>void ResetBuybackCostTime( int )</code>
|  
|  
|-
|-
| IncrementTotalEarnedXP
| ReplaceHeroWith
| <code>void IncrementTotalEarnedXP( int, int )</code>
| <code>hscript ReplaceHeroWith( int, cstring, int, int )</code>
|  
| (playerID, heroClassName, gold, XP) - replaces the player's hero with a new one of the specified class, gold and XP
|-
|-
| GetTotalEarnedXP
| SetCustomBuybackCost
| <code>int GetTotalEarnedXP( int )</code>
| <code>void SetCustomBuybackCost( int, int )</code>
|  
| Set the buyback cost for this player.
|-
|-
| AddClaimedFarm
| SetCustomBuybackCooldown
| <code>void AddClaimedFarm( int, float )</code>
| <code>void SetCustomBuybackCooldown( int, float )</code>
|  
| Set the buyback cooldown for this player.
|-
|-
| GetClaimedFarm
| GetCustomBuybackCost
| <code>float GetClaimedFarm( int )</code>
| <code>int GetCustomBuybackCost( int )</code>
|  
|  
|-
|-
| GetRawPlayerDamage
| GetCustomBuybackCooldown
| <code>int GetRawPlayerDamage( int )</code>
| <code>float GetCustomBuybackCooldown( int )</code>
|
|-
| ClearRawPlayerDamageMatrix
| <code>void ClearRawPlayerDamageMatrix( int )</code>
|  
|  
|}
=== CDOTABaseGameMode extends CBaseEntity ===
''Base game mode class''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| ClearKillsMatrix
| BeginThink
| <code>void ClearKillsMatrix( int )</code>
| <code>bool BeginThink( cstring, hscript, float )</code>
|  
| Start a think callback. Takes a function and an interval
|-
|-
| GetTowerDamageTaken
| EndThink
| <code>int GetTowerDamageTaken( int )</code>
| <code>void EndThink( cstring )</code>
|  
| Stop a think callback.
|-
|-
| GetCreepDamageTaken
| SetAlwaysShowPlayerInventory
| <code>int GetCreepDamageTaken( int )</code>
| <code>void SetAlwaysShowPlayerInventory( bool )</code>
|  
| Show the player hero's inventory in the HUD, regardless of what unit is selected.
|-
|-
| GetHeroDamageTaken
| SetGoldSoundDisabled
| <code>int GetHeroDamageTaken( int )</code>
| <code>void SetGoldSoundDisabled( bool )</code>
|  
| Turn the sound when gold is acquired off/on. Takes a bool.
|-
|-
| GetDamageDoneToHero
| SetRecommendedItemsDisabled
| <code>int GetDamageDoneToHero( int, int )</code>
| <code>void SetRecommendedItemsDisabled( bool )</code>
|  
| Turn the panel for showing recommended items at the shop off/on. Takes a bool.
|-
|-
| GetKillsDoneToHero
| SetCameraDistanceOverride
| <code>int GetKillsDoneToHero( int, int )</code>
| <code>void SetCameraDistanceOverride( float )</code>
|  
| Set a different camera distance; dota default is 1134.
|-
|-
| GetSelectedHeroName
| SetOverrideSelectionEntity
| <code>cstring GetSelectedHeroName( int )</code>
| <code>void SetOverrideSelectionEntity( hscript )</code>
|  
| Set an override for the default selection entity, instead of each player's hero.
|-
|-
| GetSelectedHeroID
| SetRemoveIllusionsOnDeath
| <code>int GetSelectedHeroID( int )</code>
| <code>void SetRemoveIllusionsOnDeath( bool )</code>
|  
| Make it so illusions are immediately removed upon death, rather than sticking around for a few seconds.
|-
|-
| IsHeroSelected
| ClientLoadGridNav
| <code>bool IsHeroSelected( cstring )</code>
| <code>void ClientLoadGridNav()</code>
|  
| Tell clients that they need to load gridnav information. Used for things like allowing clients to identify valid locations to place buildings.
|-
|-
| WhoSelectedHero
| SetFogOfWarDisabled
| <code>int WhoSelectedHero( cstring )</code>
| <code>void SetFogOfWarDisabled( bool )</code>
|  
| Turn the fog of war on or off.
|-
|-
| GetSelectedHeroEntity
| SetCustomBuybackCostEnabled
| <code>hscript GetSelectedHeroEntity( int )</code>
| <code>void SetCustomBuybackCostEnabled( bool )</code>
|  
| Turns on capability to define custom buyback costs.
|-
|-
| HasSelectedHero
| SetCustomBuybackCooldownEnabled
| <code>bool HasSelectedHero( int )</code>
| <code>void SetCustomBuybackCooldownEnabled( bool )</code>
|  
| Turns on capability to define custom buyback cooldowns.
|-
|}
| GetPlayer
 
| <code>hscript GetPlayer( int )</code>
 
|
=== CBaseAnimating extends CBaseEntity ===
''Animating models''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| GetNthPlayerIDOnTeam
| LookupAttachment
| <code>int GetNthPlayerIDOnTeam( int, int )</code>
| <code>int LookupAttachment( cstring )</code>
|  
| Get the named attachement id
|-
|-
| IncrementLastHits
| GetAttachmentOrigin
| <code>void IncrementLastHits( int )</code>
| <code>vector GetAttachmentOrigin( int )</code>
|  
| Get the attachement id's origin vector
|-
|-
| GetLastHits
| GetAttachmentAngles
| <code>int GetLastHits( int )</code>
| <code>vector GetAttachmentAngles( int )</code>
|  
| Get the attachement id's angles as a p,y,r vector
|-
|-
| IncrementGoldBagsCollected
| IsSequenceFinished
| <code>void IncrementGoldBagsCollected( int )</code>
| <code>bool IsSequenceFinished()</code>
|  
| Ask whether the main sequence is done playing
|-
|-
| GetGoldBagsCollected
| SetBodygroup
| <code>int GetGoldBagsCollected( int )</code>
| <code>void SetBodygroup( int, int )</code>
|  
| Sets a bodygroup
|-
|-
| IncrementLastHitStreak
| SetModelScale
| <code>void IncrementLastHitStreak( int )</code>
| <code>void SetModelScale( float, float )</code>
|  
| Set the model scale
|}
 
 
=== CBaseFlex extends CBaseAnimating ===
''Animated characters who have vertex flex capability.''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| ClearLastHitStreak
| GetCurrentScene
| <code>void ClearLastHitStreak( int )</code>
| <code>hscript GetCurrentScene()</code>
|  
| Returns the instance of the oldest active scene entity (if any).
|-
|-
| GetLastHitStreak
| GetSceneByIndex
| <code>int GetLastHitStreak( int )</code>
| <code>hscript GetSceneByIndex( int )</code>
|  
| Returns the instance of the scene entity at the specified index.
|}
 
 
=== CDOTA_BaseNPC extends CBaseFlex ===
''A Dota NPC Unit''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| IncrementLastHitMultikill
| IsAncient
| <code>void IncrementLastHitMultikill( int )</code>
| <code>bool IsAncient()</code>
|  
| Is this creature an Ancient?
|-
|-
| ClearLastHitMultikill
| IsNeutralUnitType
| <code>void ClearLastHitMultikill( int )</code>
| <code>bool IsNeutralUnitType()</code>
|  
| Is this a neutral?
|-
|-
| GetLastHitMultikill
| IsSummoned
| <code>int GetLastHitMultikill( int )</code>
| <code>bool IsSummoned()</code>
|  
| Is this unit summoned?
|-
|-
| IncrementNearbyCreepDeaths
| IsCreature
| <code>void IncrementNearbyCreepDeaths( int )</code>
| <code>bool IsCreature()</code>
|  
| Is this a Creature type NPC
|-
|-
| GetNearbyCreepDeaths
| IsHero
| <code>int GetNearbyCreepDeaths( int )</code>
| <code>bool IsHero()</code>
|  
| Is this a hero or hero illusion?
|-
|-
| IncrementDenies
| IsRealHero
| <code>void IncrementDenies( int )</code>
| <code>bool IsRealHero()</code>
|  
| Is this a real hero?
|-
|-
| GetDenies
| IsTower
| <code>int GetDenies( int )</code>
| <code>bool IsTower()</code>
|  
| Is this a tower?
|-
|-
| IncrementClaimedMisses
| IsAlive
| <code>void IncrementClaimedMisses( int )</code>
| <code>bool IsAlive()</code>
|  
| Is this unit alive?
|-
|-
| GetClaimedMisses
| IsMechanical
| <code>int GetClaimedMisses( int )</code>
| <code>bool IsMechanical()</code>
|  
| Is the unit mechanical?
|-
|-
| IncrementClaimedDenies
| IsPhantom
| <code>void IncrementClaimedDenies( int )</code>
| <code>bool IsPhantom()</code>
|  
| Is this a phantom unit?
|-
|-
| GetClaimedDenies
| SetInitialGoalEntity
| <code>int GetClaimedDenies( int )</code>
| <code>void SetInitialGoalEntity( hscript )</code>
|  
| Sets the initial waypoint goal for this NPC
|-
|-
| IncrementMisses
| GetInitialGoalEntity
| <code>void IncrementMisses( int )</code>
| <code>hscript GetInitialGoalEntity()</code>
|  
| Returns the initial waypoint goal for this NPC
|-
|-
| GetMisses
| SetMustReachEachGoalEntity
| <code>int GetMisses( int )</code>
| <code>void SetMustReachEachGoalEntity( bool )</code>
|  
| Set whether this NPC is required to reach each goal entity, rather than being allowed to 'unkink' their path
|-
|-
| UpdateTeamSlot
| GetMustReachEachGoalEntity
| <code>void UpdateTeamSlot( int, int )</code>
| <code>bool GetMustReachEachGoalEntity()</code>
|  
| Get whether this NPC is required to reach each goal entity, rather than being allowed to 'unkink' their path
|-
|-
| GetTeam
| AddNewModifier
| <code>int GetTeam( int )</code>
| <code>void AddNewModifier( hscript, hscript, cstring, hscript )</code>
|  
| Add a modifier to this unit
|-
|-
| IsBroadcaster
| HasModifier
| <code>bool IsBroadcaster( int )</code>
| <code>bool HasModifier( cstring )</code>
|  
| Sees if this unit has a given modifier
|-
|-
| GetBroadcasterChannel
| RemoveModifierByName
| <code>uint GetBroadcasterChannel( int )</code>
| <code>void RemoveModifierByName( cstring )</code>
|  
| Removes a modifier
|-
|-
| GetBroadcasterChannelSlot
| RemoveModifierByNameAndCaster
| <code>uint GetBroadcasterChannelSlot( int )</code>
| <code>void RemoveModifierByNameAndCaster( cstring, hscript )</code>
|  
| Removes a modifier that was cast by the given caster
|-
|-
| GetSteamAccountID
| AddItem
| <code>uint GetSteamAccountID( int )</code>
| <code>void AddItem( hscript )</code>
|  
| Add an item to this unit's inventory.
|-
|-
| IsFakeClient
| AddAbility
| <code>bool IsFakeClient( int )</code>
| <code>void AddAbility( cstring )</code>
|  
| Add an ability to this unit by name.
|-
|-
| HaveAllPlayersJoined
| RemoveAbility
| <code>bool HaveAllPlayersJoined()</code>
| <code>void RemoveAbility( cstring )</code>
|  
| Remove an ability from this unit by name.
|-
|-
| GetPlayerLoadedCompletely
| HasAbility
| <code>bool GetPlayerLoadedCompletely( int )</code>
| <code>bool HasAbility( cstring )</code>
|  
| See whether this unit has an ability by name.
|-
|-
| SetPlayerReservedState
| FindAbilityByName
| <code>void SetPlayerReservedState( int, bool )</code>
| <code>hscript FindAbilityByName( cstring )</code>
|  
| Retrieve an ability by name from the unit.
|-
|-
| GetPlayerReservedState
| GetGoldBounty
| <code>bool GetPlayerReservedState( int )</code>
| <code>int GetGoldBounty()</code>
|  
| Get the gold bounty on this unit
|-
|-
| GetConnectionState
| SetDeathXP
| <code>unknown_variant_type GetConnectionState( int )</code>
| <code>void SetDeathXP( int )</code>
|  
| Set the XP bounty on this unit
|-
|-
| HeroLevelUp
| GetDeathXP
| <code>void HeroLevelUp( int )</code>
| <code>int GetDeathXP()</code>
|  
| Get the XP bounty on this unit
|-
|-
| SetLastBuybackTime
| GetUnitName
| <code>void SetLastBuybackTime( int, int )</code>
| <code>cstring GetUnitName()</code>
|  
| Get the name of this unit.
|-
|-
| GetPlayerName
| GetTeamNumber
| <code>cstring GetPlayerName( int )</code>
| <code>int GetTeamNumber()</code>
|  
| Get the team number of this unit.
|-
|-
| GetUnitShareMaskForPlayer
| GetPlayerOwner
| <code>int GetUnitShareMaskForPlayer( int, int )</code>
| <code>hscript GetPlayerOwner()</code>
|  
| Returns the player that owns this unit
|-
|-
| IsHeroSharedWithPlayerID
| SetMaximumGoldBounty
| <code>bool IsHeroSharedWithPlayerID( int, int )</code>
| <code>void SetMaximumGoldBounty( int )</code>
|  
| Set the maximum gold bounty for this unit.
|-
|-
| AreUnitsSharedWithPlayerID
| SetMinimumGoldBounty
| <code>bool AreUnitsSharedWithPlayerID( int, int )</code>
| <code>void SetMinimumGoldBounty( int )</code>
|  
| Set the minimum gold bounty for this unit.
|-
|-
| IsDisableHelpSetForPlayerID
| GetTotalPurchasedUpgradeGoldCost
| <code>bool IsDisableHelpSetForPlayerID( int, int )</code>
| <code>int GetTotalPurchasedUpgradeGoldCost()</code>
|  
| Get how much gold has been spent on ability upgrades.
|-
|-
| SetUnitShareMaskForPlayer
| ForceKill
| <code>void SetUnitShareMaskForPlayer( int, int, int, bool )</code>
| <code>void ForceKill( bool )</code>
|  
| Kill this unit immediately.
|-
|-
| GetNumCouriersForTeam
| GetBaseDamageMin
| <code>int GetNumCouriersForTeam( int )</code>
| <code>int GetBaseDamageMin()</code>
|  
| Get the minimum attack damage of this unit.
|-
|-
| GetNthCourierForTeam
| GetBaseDamageMax
| <code>hscript GetNthCourierForTeam( int, int )</code>
| <code>int GetBaseDamageMax()</code>
|  
| Get the maximum attack damage of this unit.
|-
|-
| SetBuybackCooldownTime
| Heal
| <code>void SetBuybackCooldownTime( int, float )</code>
| <code>void Heal( float, hscript )</code>
|  
| Heal this unit.
|-
|-
| SetBuybackGoldLimitTime
| GetMaxHealth
| <code>void SetBuybackGoldLimitTime( int, float )</code>
| <code>int GetMaxHealth()</code>
|  
| Get the maximum health of this unit.
|-
|-
| ResetBuybackCostTime
| GetHealthPercent
| <code>void ResetBuybackCostTime( int )</code>
| <code>int GetHealthPercent()</code>
|  
| Get the current health percent of the unit.
|-
|-
| ReplaceHeroWith
| SetMana
| <code>hscript ReplaceHeroWith( int, cstring, int, int )</code>
| <code>void SetMana( float )</code>
| (playerID, heroClassName, gold, XP) - replaces the player's hero with a new one of the specified class, gold and XP
| Set the mana on this unit.
|-
|-
| SetCustomBuybackCost
| GetMaxMana
| <code>void SetCustomBuybackCost( int, int )</code>
| <code>float GetMaxMana()</code>
| Set the buyback cost for this player.
| Get the maximum mana of this unit.
|-
|-
| SetCustomBuybackCooldown
| RespawnUnit
| <code>void SetCustomBuybackCooldown( int, float )</code>
| <code>void RespawnUnit()</code>
| Set the buyback cooldown for this player.
| Respawns the target unit if it can be respawned.
|-
|-
| GetCustomBuybackCost
| GetLevel
| <code>int GetCustomBuybackCost( int )</code>
| <code>int GetLevel()</code>
|  
| Returns the level of this unit.
|-
|-
| GetCustomBuybackCooldown
| GetItemInSlot
| <code>float GetCustomBuybackCooldown( int )</code>
| <code>hscript GetItemInSlot( int )</code>
|  
| Returns nth item in inventory slot (index is zero based)
|}
 
 
=== CDOTABaseGameMode extends CBaseEntity ===
''Base game mode class''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| BeginThink
| SetOriginalModel
| <code>bool BeginThink( cstring, hscript, float )</code>
| <code>void SetOriginalModel( cstring )</code>
| Start a think callback. Takes a function and an interval
| Sets the original model of this entity, which it will tend to fall back to anytime its state changes
|-
|-
| EndThink
| AddNoDraw
| <code>void EndThink( cstring )</code>
| <code>void AddNoDraw()</code>
| Stop a think callback.
| Adds the no draw flag.
|-
|-
| SetAlwaysShowPlayerInventory
| RemoveNoDraw
| <code>void SetAlwaysShowPlayerInventory( bool )</code>
| <code>void RemoveNoDraw()</code>
| Show the player hero's inventory in the HUD, regardless of what unit is selected.
| Remove the no draw flag.
|-
|-
| SetGoldSoundDisabled
| GetPlayerOwnerID
| <code>void SetGoldSoundDisabled( bool )</code>
| <code>int GetPlayerOwnerID()</code>
| Turn the sound when gold is acquired off/on. Takes a bool.
| Get the owner player ID for this unit.
|-
|-
| SetRecommendedItemsDisabled
| IsRangedAttacker
| <code>void SetRecommendedItemsDisabled( bool )</code>
| <code>bool IsRangedAttacker()</code>
| Turn the panel for showing recommended items at the shop off/on. Takes a bool.
| Is this unit a ranged attacker?
|-
|-
| SetCameraDistanceOverride
| GetCurrentActiveAbility
| <code>void SetCameraDistanceOverride( float )</code>
| <code>hscript GetCurrentActiveAbility()</code>
| Set a different camera distance; dota default is 1134.
| Get the ability this unit is currently casting.
|-
|-
| SetOverrideSelectionEntity
| MoveToPosition
| <code>void SetOverrideSelectionEntity( hscript )</code>
| <code>void MoveToPosition( vector )</code>
| Set an override for the default selection entity, instead of each player's hero.
| Issue a Move-To command
|-
|-
| SetRemoveIllusionsOnDeath
| MoveToPositionAggressive
| <code>void SetRemoveIllusionsOnDeath( bool )</code>
| <code>void MoveToPositionAggressive( vector )</code>
| Make it so illusions are immediately removed upon death, rather than sticking around for a few seconds.
| Issue an Attack-Move-To command
|-
| MoveToNPC
| <code>void MoveToNPC( hscript )</code>
| Move to follow a unit.
|-
|-
| ClientLoadGridNav
| MoveToTargetToAttack
| <code>void ClientLoadGridNav()</code>
| <code>void MoveToTargetToAttack( hscript )</code>
| Tell clients that they need to load gridnav information. Used for things like allowing clients to identify valid locations to place buildings.
| Move to a target to attack.
|-
|-
| SetFogOfWarDisabled
| Hold
| <code>void SetFogOfWarDisabled( bool )</code>
| <code>void Hold()</code>
| Turn the fog of war on or off.
| Hold position.
|-
|-
| SetCustomBuybackCostEnabled
| Stop
| <code>void SetCustomBuybackCostEnabled( bool )</code>
| <code>void Stop()</code>
| Turns on capability to define custom buyback costs.
| Stop the current order.
|-
|-
| SetCustomBuybackCooldownEnabled
| CastAbilityToggle
| <code>void SetCustomBuybackCooldownEnabled( bool )</code>
| <code>void CastAbilityToggle( hscript, int )</code>
| Turns on capability to define custom buyback cooldowns.
| Toggle an ability.
|}
 
 
=== CBaseAnimating extends CBaseEntity ===
''Animating models''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| LookupAttachment
| CastAbilityImmediately
| <code>int LookupAttachment( cstring )</code>
| <code>void CastAbilityImmediately( hscript, int )</code>
| Get the named attachement id
| Cast an ability immediately.
|-
|-
| GetAttachmentOrigin
| CastAbilityOnPosition
| <code>vector GetAttachmentOrigin( int )</code>
| <code>void CastAbilityOnPosition( vector, hscript, int )</code>
| Get the attachement id's origin vector
| Cast an ability on a position.
|-
|-
| GetAttachmentAngles
| CastAbilityOnTarget
| <code>vector GetAttachmentAngles( int )</code>
| <code>void CastAbilityOnTarget( hscript, hscript, int )</code>
| Get the attachement id's angles as a p,y,r vector
| Cast an ability on a target entity.
|-
|-
| IsSequenceFinished
| CastAbilityNoTarget
| <code>bool IsSequenceFinished()</code>
| <code>void CastAbilityNoTarget( hscript, int )</code>
| Ask whether the main sequence is done playing
| Cast an ability with no target.
|-
| DropItemAtPosition
| <code>void DropItemAtPosition( vector, hscript )</code>
| Drop an item at a given point.
|-
| MoveToNPCToGiveItem
| <code>void MoveToNPCToGiveItem( hscript, hscript )</code>
| Give an item to another unit.
|-
| PickupDroppedItem
| <code>void PickupDroppedItem( hscript )</code>
| Pick up a dropped item.
|-
|-
| SetBodygroup
| PickupRune
| <code>void SetBodygroup( int, int )</code>
| <code>void PickupRune( hscript )</code>
| Sets a bodygroup
| Pick up a rune.
|-
|-
| SetModelScale
| DropItemAtPositionImmediate
| <code>void SetModelScale( float, float )</code>
| <code>void DropItemAtPositionImmediate( hscript, vector )</code>
| Set the model scale
| Immediately drop a carried item at a given position.
|}
|}




=== CBaseFlex extends CBaseAnimating ===
=== CDOTA_BaseNPC_Building extends CDOTA_BaseNPC ===
''Animated characters who have vertex flex capability.''
''A building.''


{| class="standard-table" style="width: 100;"
{| class="standard-table" style="width: 100;"
Line 1,469: Line 1,456:
! Description
! Description
|-
|-
| GetCurrentScene
| GetInvulnCount
| <code>hscript GetCurrentScene()</code>
| <code>int GetInvulnCount()</code>
| Returns the instance of the oldest active scene entity (if any).
| Get the invulnerability count for a building.
|-
|-
| GetSceneByIndex
| SetInvulnCount
| <code>hscript GetSceneByIndex( int )</code>
| <code>void SetInvulnCount( int )</code>
| Returns the instance of the scene entity at the specified index.
| Set the invulnerability counter of this building.
|}
|}




=== CDOTA_BaseNPC extends CBaseFlex ===
=== CDOTABaseAbility extends CBaseEntity ===
''A Dota NPC Unit''
''An ability''


{| class="standard-table" style="width: 100;"
{| class="standard-table" style="width: 100;"
Line 1,487: Line 1,474:
! Description
! Description
|-
|-
| IsAncient
| GetAbilityName
| <code>bool IsAncient()</code>
| <code>cstring GetAbilityName()</code>
| Is this creature an Ancient?
| Returns the name of this ability.
|-
|-
| IsNeutralUnitType
| GetSpecialValueFor
| <code>bool IsNeutralUnitType()</code>
| <code>variant GetSpecialValueFor( cstring )</code>
| Is this a neutral?
| Gets a value from this ability's special value block for its current level.
|-
|-
| IsSummoned
| GetCastRange
| <code>bool IsSummoned()</code>
| <code>int GetCastRange()</code>
| Is this unit summoned?
| Gets the cast range of the ability.
|-
|-
| IsCreature
| IsFullyCastable
| <code>bool IsCreature()</code>
| <code>bool IsFullyCastable()</code>
| Is this a Creature type NPC
| Returns whether the ability can be cast.
|-
|-
| IsHero
| IsChanneling
| <code>bool IsHero()</code>
| <code>bool IsChanneling()</code>
| Is this a hero or hero illusion?
| Returns whether the ability is currently channeling.
|-
|-
| IsRealHero
| IsInAbilityPhase
| <code>bool IsRealHero()</code>
| <code>bool IsInAbilityPhase()</code>
| Is this a real hero?
| Returns whether the ability is currently casting.
|-
|-
| IsTower
| GetCooldown
| <code>bool IsTower()</code>
| <code>float GetCooldown( int )</code>
| Is this a tower?
| Get the cooldown duration for this ability at a given level, not the amount of cooldown actually left.
|-
|-
| IsAlive
| EndCooldown
| <code>bool IsAlive()</code>
| <code>void EndCooldown()</code>
| Is this unit alive?
| Clear the cooldown remaining on this ability.
|-
|-
| IsMechanical
| MarkAbilityButtonDirty
| <code>bool IsMechanical()</code>
| <code>void MarkAbilityButtonDirty()</code>
| Is the unit mechanical?
| Mark the ability button for this ability as needing a refresh
|-
|-
| IsPhantom
| SetLevel
| <code>bool IsPhantom()</code>
| <code>void SetLevel( int )</code>
| Is this a phantom unit?
| Sets the level of this ability.
|}
 
 
=== CDOTA_BaseNPC_Creature extends CDOTA_BaseNPC ===
''A Dota NPC Unit''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| SetInitialGoalEntity
| CreatureLevelUp
| <code>void SetInitialGoalEntity( hscript )</code>
| <code>void CreatureLevelUp( int )</code>
| Sets the initial waypoint goal for this NPC
| Level the creature up by the specified number of levels
|-
|-
| GetInitialGoalEntity
| AddItemDrop
| <code>hscript GetInitialGoalEntity()</code>
| <code>void AddItemDrop( hscript )</code>
| Returns the initial waypoint goal for this NPC
| Add the specified item drop to this creature
|-
|-
| SetMustReachEachGoalEntity
| SetChampion
| <code>void SetMustReachEachGoalEntity( bool )</code>
| <code>void SetChampion( bool )</code>
| Set whether this NPC is required to reach each goal entity, rather than being allowed to 'unkink' their path
| Flag this unit as a champion creature.
|-
|-
| GetMustReachEachGoalEntity
| IsChampion
| <code>bool GetMustReachEachGoalEntity()</code>
| <code>bool IsChampion()</code>
| Get whether this NPC is required to reach each goal entity, rather than being allowed to 'unkink' their path
| Is this unit a champion?
|-
|-
| AddNewModifier
| SetHPGain
| <code>void AddNewModifier( hscript, hscript, cstring, hscript )</code>
| <code>void SetHPGain( int )</code>
| Add a modifier to this unit
| Set the hit points gained per level on this creature.
|-
|-
| HasModifier
| SetManaGain
| <code>bool HasModifier( cstring )</code>
| <code>void SetManaGain( int )</code>
| Sees if this unit has a given modifier
| Set the mana points gained per level on this creature.
|-
|-
| RemoveModifierByName
| SetHPRegenGain
| <code>void RemoveModifierByName( cstring )</code>
| <code>void SetHPRegenGain( float )</code>
| Removes a modifier
| Set the hit points regen gained per level on this creature.
|-
|-
| RemoveModifierByNameAndCaster
| SetManaRegenGain
| <code>void RemoveModifierByNameAndCaster( cstring, hscript )</code>
| <code>void SetManaRegenGain( float )</code>
| Removes a modifier that was cast by the given caster
| Set the mana points regen gained per level on this creature.
|-
|-
| AddItem
| SetDamageGain
| <code>void AddItem( hscript )</code>
| <code>void SetDamageGain( int )</code>
| Add an item to this unit's inventory.
| Set the damage gained per level on this creature.
|-
|-
| AddAbility
| SetArmorGain
| <code>void AddAbility( cstring )</code>
| <code>void SetArmorGain( float )</code>
| Add an ability to this unit by name.
| Set the armor gained per level on this creature.
|-
|-
| RemoveAbility
| SetMagicResistanceGain
| <code>void RemoveAbility( cstring )</code>
| <code>void SetMagicResistanceGain( float )</code>
| Remove an ability from this unit by name.
| Set the magic resistance gained per level on this creature.
|-
|-
| HasAbility
| SetDisableResistanceGain
| <code>bool HasAbility( cstring )</code>
| <code>void SetDisableResistanceGain( float )</code>
| See whether this unit has an ability by name.
| Set the disable resistance gained per level on this creature.
|-
|-
| FindAbilityByName
| SetAttackTimeGain
| <code>hscript FindAbilityByName( cstring )</code>
| <code>void SetAttackTimeGain( float )</code>
| Retrieve an ability by name from the unit.
| Set the attack time gained per level on this creature.
|-
|-
| GetGoldBounty
| SetMoveSpeedGain
| <code>int GetGoldBounty()</code>
| <code>void SetMoveSpeedGain( int )</code>
| Get the gold bounty on this unit
| Set the move speed gained per level on this creature.
|-
|-
| SetDeathXP
| SetBountyGain
| <code>void SetDeathXP( int )</code>
| <code>void SetBountyGain( int )</code>
| Set the XP bounty on this unit
| Set the bounty gold gained per level on this creature.
|-
|-
| GetDeathXP
| SetXPGain
| <code>int GetDeathXP()</code>
| <code>void SetXPGain( int )</code>
| Get the XP bounty on this unit
| Set the xp reward gained per level on this creature.
|}
 
 
=== CDOTA_BaseNPC_Hero extends CDOTA_BaseNPC ===
''A Dota Hero NPC''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| GetUnitName
| ModifyGold
| <code>cstring GetUnitName()</code>
| <code>int ModifyGold( int, bool, int )</code>
| Get the name of this unit.
| Gives this hero some gold
|-
|-
| GetTeamNumber
| GetGold
| <code>int GetTeamNumber()</code>
| <code>int GetGold()</code>
| Get the team number of this unit.
| Returns gold amount for the player owning this hero
|-
|-
| GetPlayerOwner
| SetGold
| <code>hscript GetPlayerOwner()</code>
| <code>void SetGold( int, bool )</code>
| Returns the player that owns this unit
| Sets the gold amount for the player owning this hero
|-
|-
| SetMaximumGoldBounty
| GetCurrentXP
| <code>void SetMaximumGoldBounty( int )</code>
| <code>int GetCurrentXP()</code>
| Set the maximum gold bounty for this unit.
| Returns the amount of XP
|-
|-
| SetMinimumGoldBounty
| GetPlayerID
| <code>void SetMinimumGoldBounty( int )</code>
| <code>int GetPlayerID()</code>
| Set the minimum gold bounty for this unit.
| Returns player ID of the player owning this hero
|-
|-
| GetTotalPurchasedUpgradeGoldCost
| RespawnHero
| <code>int GetTotalPurchasedUpgradeGoldCost()</code>
| <code>void RespawnHero( bool, bool, bool )</code>
| Get how much gold has been spent on ability upgrades.
| Respawn this hero.
|-
|-
| ForceKill
| HeroLevelUp
| <code>void ForceKill( bool )</code>
| <code>void HeroLevelUp( bool )</code>
| Kill this unit immediately.
| Levels up the hero, true or false to play effects.
|-
|-
| GetBaseDamageMin
| GetAbilityPoints
| <code>int GetBaseDamageMin()</code>
| <code>int GetAbilityPoints()</code>
| Get the minimum attack damage of this unit.
| Gets the current unspent ability points.
|-
|-
| GetBaseDamageMax
| SetAbilityPoints
| <code>int GetBaseDamageMax()</code>
| <code>void SetAbilityPoints( int )</code>
| Get the maximum attack damage of this unit.
| Sets the current unspent ability points.
|-
|-
| Heal
| SetCustomDeathXP
| <code>void Heal( float, hscript )</code>
| <code>void SetCustomDeathXP( int )</code>
| Heal this unit.
| Sets a custom experience value for this hero. Note, GameRules boolean must be set for this to work!
|}
 
 
=== CDotaQuest extends CBaseEntity ===
''A quest''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| GetMaxHealth
| SetTextReplaceValue
| <code>int GetMaxHealth()</code>
| <code>void SetTextReplaceValue( int, int )</code>
| Get the maximum health of this unit.
| Set a quest value
|-
|-
| GetHealthPercent
| CompleteQuest
| <code>int GetHealthPercent()</code>
| <code>void CompleteQuest()</code>
| Get the current health percent of the unit.
| Mark this quest complete
|-
|-
| SetMana
| SetTextReplaceString
| <code>void SetMana( float )</code>
| <code>void SetTextReplaceString( cstring )</code>
| Set the mana on this unit.
| Set the text replace string for this quest
|-
|-
| GetMaxMana
| AddSubquest
| <code>float GetMaxMana()</code>
| <code>void AddSubquest( hscript )</code>
| Get the maximum mana of this unit.
| Add a subquest to this quest
|-
| RemoveSubquest
| <code>void RemoveSubquest( hscript )</code>
| Remove a subquest from this quest
|-
|-
| RespawnUnit
| GetSubquestByName
| <code>void RespawnUnit()</code>
| <code>hscript GetSubquestByName( cstring )</code>
| Respawns the target unit if it can be respawned.
| Finds a subquest from this quest by name
|-
|-
| GetLevel
| GetSubquest
| <code>int GetLevel()</code>
| <code>hscript GetSubquest( int )</code>
| Returns the level of this unit.
| Finds a subquest from this quest by index
|}
 
 
=== CDOTA_Item extends CDOTABaseAbility ===
''A usable item.''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| GetItemInSlot
| SetPurchaseTime
| <code>hscript GetItemInSlot( int )</code>
| <code>void SetPurchaseTime( float )</code>
| Returns nth item in inventory slot (index is zero based)
| Set the purchase time of this item
|-
|-
| SetOriginalModel
| GetPurchaseTime
| <code>void SetOriginalModel( cstring )</code>
| <code>float GetPurchaseTime()</code>
| Sets the original model of this entity, which it will tend to fall back to anytime its state changes
| Get the purchase time of this item
|-
|-
| AddNoDraw
| SetPurchaser
| <code>void AddNoDraw()</code>
| <code>void SetPurchaser( hscript )</code>
| Adds the no draw flag.
| Set the purchaser of record for this item.
|-
|-
| RemoveNoDraw
| GetInitialCharges
| <code>void RemoveNoDraw()</code>
| <code>int GetInitialCharges()</code>
| Remove the no draw flag.
| Get the initial number of charges this item has.
|-
|-
| GetPlayerOwnerID
| GetCurrentCharges
| <code>int GetPlayerOwnerID()</code>
| <code>int GetCurrentCharges()</code>
| Get the owner player ID for this unit.
| Get the number of charges this item currently has.
|-
| SetCurrentCharges
| <code>void SetCurrentCharges( int )</code>
| Set the number of charges on this item
|-
|-
| IsRangedAttacker
| GetPurchaser
| <code>bool IsRangedAttacker()</code>
| <code>hscript GetPurchaser()</code>
| Is this unit a ranged attacker?
| Get the purchaser for this item.
|-
|-
| GetCurrentActiveAbility
| Think
| <code>hscript GetCurrentActiveAbility()</code>
| <code>void Think()</code>
| Get the ability this unit is currently casting.
| Think this item
|-
|-
| MoveToPosition
| IsPermanent
| <code>void MoveToPosition( vector )</code>
| <code>bool IsPermanent()</code>
| Issue a Move-To command
| Is this a permanent item?
|-
|-
| MoveToPositionAggressive
| StacksWithOtherOwners
| <code>void MoveToPositionAggressive( vector )</code>
| <code>bool StacksWithOtherOwners()</code>
| Issue an Attack-Move-To command
|  
|-
|-
| MoveToNPC
| SetStacksWithOtherOwners
| <code>void MoveToNPC( hscript )</code>
| <code>void SetStacksWithOtherOwners( bool )</code>
| Move to follow a unit.
|  
|-
|-
| MoveToTargetToAttack
| GetShareability
| <code>void MoveToTargetToAttack( hscript )</code>
| <code>int GetShareability()</code>
| Move to a target to attack.
|  
|-
|-
| Hold
| GetCost
| <code>void Hold()</code>
| <code>int GetCost()</code>
| Hold position.
|  
|-
|-
| Stop
| LaunchLoot
| <code>void Stop()</code>
| <code>void LaunchLoot( bool, float, float, vector )</code>
| Stop the current order.
|  
|-
| GetContainer
| <code>hscript GetContainer()</code>
| Get the container for this item.
|}
 
 
=== CDOTA_Item_DataDriven extends CDOTA_Item ===
''A data driven usable item.''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| CastAbilityToggle
| ApplyDataDrivenModifier
| <code>void CastAbilityToggle( hscript, int )</code>
| <code>void ApplyDataDrivenModifier( hscript, hscript, cstring, hscript )</code>
| Toggle an ability.
| Applies a data driven modifier to the target
|}
 
 
=== CDotaSubquestBase extends CBaseEntity ===
''A subquest''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| CastAbilityImmediately
| SetTextReplaceValue
| <code>void CastAbilityImmediately( hscript, int )</code>
| <code>void SetTextReplaceValue( int, int )</code>
| Cast an ability immediately.
| Set a subquest value
|-
|-
| CastAbilityOnPosition
| CompleteSubquest
| <code>void CastAbilityOnPosition( vector, hscript, int )</code>
| <code>void CompleteSubquest()</code>
| Cast an ability on a position.
| Mark this subquest complete
|-
|-
| CastAbilityOnTarget
| SetTextReplaceString
| <code>void CastAbilityOnTarget( hscript, hscript, int )</code>
| <code>void SetTextReplaceString( cstring )</code>
| Cast an ability on a target entity.
| Set the text replace string for this subquest
|-
| CastAbilityNoTarget
| <code>void CastAbilityNoTarget( hscript, int )</code>
| Cast an ability with no target.
|-
| DropItemAtPosition
| <code>void DropItemAtPosition( vector, hscript )</code>
| Drop an item at a given point.
|-
| MoveToNPCToGiveItem
| <code>void MoveToNPCToGiveItem( hscript, hscript )</code>
| Give an item to another unit.
|-
| PickupDroppedItem
| <code>void PickupDroppedItem( hscript )</code>
| Pick up a dropped item.
|-
| PickupRune
| <code>void PickupRune( hscript )</code>
| Pick up a rune.
|-
| DropItemAtPositionImmediate
| <code>void DropItemAtPositionImmediate( hscript, vector )</code>
| Immediately drop a carried item at a given position.
|}
|}




=== CDOTA_BaseNPC_Building extends CDOTA_BaseNPC ===
=== CDOTAPlayer extends CBaseAnimating ===
''A building.''
''dota_player''


{| class="standard-table" style="width: 100;"
{| class="standard-table" style="width: 100;"
Line 1,757: Line 1,792:
! Description
! Description
|-
|-
| GetInvulnCount
| GetPlayerID
| <code>int GetInvulnCount()</code>
| <code>int GetPlayerID()</code>
| Get the invulnerability count for a building.
| Get the player's official PlayerID; notably is -1 when the player isn't yet on a team.
|-
| GetAssignedHero
| <code>hscript GetAssignedHero()</code>
| Get the player's hero.
|-
| SetKillCamUnit
| <code>void SetKillCamUnit( hscript )</code>
| Set the kill cam unit for this hero.
|-
| MakeRandomHeroSelection
| <code>void MakeRandomHeroSelection()</code>
| Randoms this player's hero.
|-
|-
| SetInvulnCount
| SetMusicStatus
| <code>void SetInvulnCount( int )</code>
| <code>void SetMusicStatus( int, float )</code>
| Set the invulnerability counter of this building.
| (nMusicStatus, flIntensity) - Set the music status for this player, note this will only really apply if dota_music_battle_enable is off.
|}
|}




=== CDOTABaseAbility extends CBaseEntity ===
=== CDOTA_Item_Physical extends CBaseAnimating ===
''An ability''
''A physical item dropped in the world''


{| class="standard-table" style="width: 100;"
{| class="standard-table" style="width: 100;"
Line 1,775: Line 1,822:
! Description
! Description
|-
|-
| GetAbilityName
| GetCreationTime
| <code>cstring GetAbilityName()</code>
| <code>float GetCreationTime()</code>
| Returns the name of this ability.
| Returns the game time when this item was created in the world
|-
|-
| GetSpecialValueFor
| GetContainedItem
| <code>variant GetSpecialValueFor( cstring )</code>
| <code>hscript GetContainedItem()</code>
| Gets a value from this ability's special value block for its current level.
| Returned the contained item.
|-
|-
| GetCastRange
| SetContainedItem
| <code>int GetCastRange()</code>
| <code>void SetContainedItem( hscript )</code>
| Gets the cast range of the ability.
| Set the contained item.
|}
 
{|
|-
|-
| IsFullyCastable
| ShowMessage
| <code>bool IsFullyCastable()</code>
| <code>void ShowMessage( cstring )</code>
| Returns whether the ability can be cast.
| Print a hud message on all clients
|-
|-
| IsChanneling
| GetMapName
| <code>bool IsChanneling()</code>
| <code>cstring GetMapName()</code>
| Returns whether the ability is currently channeling.
| Get the name of the map.
|-
|-
| IsInAbilityPhase
| SendToConsole
| <code>bool IsInAbilityPhase()</code>
| <code>void SendToConsole( cstring )</code>
| Returns whether the ability is currently casting.
| Send a string to the console as a client command
|-
|-
| GetCooldown
| SendToServerConsole
| <code>float GetCooldown( int )</code>
| <code>void SendToServerConsole( cstring )</code>
| Get the cooldown duration for this ability at a given level, not the amount of cooldown actually left.
| Send a string to the console as a server command
|-
|-
| EndCooldown
| PrintLinkedConsoleMessage
| <code>void EndCooldown()</code>
| <code>void PrintLinkedConsoleMessage( cstring, cstring )</code>
| Clear the cooldown remaining on this ability.
| Print a console message with a linked console command
|-
|-
| MarkAbilityButtonDirty
| InitLogFile
| <code>void MarkAbilityButtonDirty()</code>
| <code>void InitLogFile( cstring, cstring )</code>
| Mark the ability button for this ability as needing a refresh
| If the given file doesn't exist, creates it with the given contents; does nothing if it exists
|-
|-
| SetLevel
| AppendToLogFile
| <code>void SetLevel( int )</code>
| <code>void AppendToLogFile( cstring, cstring )</code>
| Sets the level of this ability.
| Appends a string to a log file on the server
|}
 
 
=== CDOTA_BaseNPC_Creature extends CDOTA_BaseNPC ===
''A Dota NPC Unit''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| CreatureLevelUp
| GetWorldMinX
| <code>void CreatureLevelUp( int )</code>
| <code>float GetWorldMinX()</code>
| Level the creature up by the specified number of levels
| Gets the world's minimum X position.
|-
|-
| AddItemDrop
| GetWorldMinY
| <code>void AddItemDrop( hscript )</code>
| <code>float GetWorldMinY()</code>
| Add the specified item drop to this creature
| Gets the world's maximum Y position.
|-
|-
| SetChampion
| GetWorldMaxX
| <code>void SetChampion( bool )</code>
| <code>float GetWorldMaxX()</code>
| Flag this unit as a champion creature.
| Gets the world's minimum X position.
|-
|-
| IsChampion
| GetWorldMaxY
| <code>bool IsChampion()</code>
| <code>float GetWorldMaxY()</code>
| Is this unit a champion?
| Gets the world's maximum Y position.
|-
|-
| SetHPGain
| Time
| <code>void SetHPGain( int )</code>
| <code>float Time()</code>
| Set the hit points gained per level on this creature.
| Get the current server time
|-
|-
| SetManaGain
| GetSystemTime
| <code>void SetManaGain( int )</code>
| <code>cstring GetSystemTime()</code>
| Set the mana points gained per level on this creature.
| Get the current real world time
|-
|-
| SetHPRegenGain
| GetSystemDate
| <code>void SetHPRegenGain( float )</code>
| <code>cstring GetSystemDate()</code>
| Set the hit points regen gained per level on this creature.
| Get the current real world date
|-
|-
| SetManaRegenGain
| UTIL_RemoveImmediate
| <code>void SetManaRegenGain( float )</code>
| <code>void UTIL_RemoveImmediate( hscript )</code>
| Set the mana points regen gained per level on this creature.
| Immediately removes the specified entity
|-
|-
| SetDamageGain
| DoEntFire
| <code>void SetDamageGain( int )</code>
| <code>void DoEntFire( cstring, cstring, cstring, float, hscript, hscript )</code>
| Set the damage gained per level on this creature.
| #EntFire:Generate and entity i/o event
|-
|-
| SetArmorGain
| EntFireByHandle
| <code>void SetArmorGain( float )</code>
| <code>void EntFireByHandle( hscript, cstring, cstring, float, hscript, hscript )</code>
| Set the armor gained per level on this creature.
| Generate and entity i/o event
|-
|-
| SetMagicResistanceGain
| IsValidEntity
| <code>void SetMagicResistanceGain( float )</code>
| <code>bool IsValidEntity( hscript )</code>
| Set the magic resistance gained per level on this creature.
| Checks to see if the given hScript is a valid entity
|-
|-
| SetDisableResistanceGain
| IsMarkedForDeletion
| <code>void SetDisableResistanceGain( float )</code>
| <code>bool IsMarkedForDeletion( hscript )</code>
| Set the disable resistance gained per level on this creature.
| Returns true if the entity is valid and marked for deletion.
|-
|-
| SetAttackTimeGain
| DoUniqueString
| <code>void SetAttackTimeGain( float )</code>
| <code>cstring DoUniqueString( cstring )</code>
| Set the attack time gained per level on this creature.
| #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 tables when not sure what keys are already in use in that table.
|-
| ListenToGameEvent
| <code>int ListenToGameEvent( cstring, hscript, hscript )</code>
| Register as a listener for a game event from script.
|-
| StopListeningToGameEvent
| <code>bool StopListeningToGameEvent( int )</code>
| Stop listening to a particular game event.
|-
|-
| SetMoveSpeedGain
| FireGameEvent
| <code>void SetMoveSpeedGain( int )</code>
| <code>void FireGameEvent( cstring, hscript )</code>
| Set the move speed gained per level on this creature.
| Fire a game event.
|-
|-
| SetBountyGain
| FireGameEventLocal
| <code>void SetBountyGain( int )</code>
| <code>void FireGameEventLocal( cstring, hscript )</code>
| Set the bounty gold gained per level on this creature.
| Fire a game event without broadcasting to the client.
|-
|-
| SetXPGain
| PauseGame
| <code>void SetXPGain( int )</code>
| <code>void PauseGame( bool )</code>
| Set the xp reward gained per level on this creature.
| Pause or unpause the game.
|}
 
 
=== CDOTA_BaseNPC_Hero extends CDOTA_BaseNPC ===
''A Dota Hero NPC''
 
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
|-
| ModifyGold
| EntIndexToHScript
| <code>int ModifyGold( int, bool, int )</code>
| <code>hscript EntIndexToHScript( int )</code>
| Gives this hero some gold
| Turn an entity index integer to an HScript representing that entity's script instance.
|-
|-
| GetGold
| PlayerInstanceFromIndex
| <code>int GetGold()</code>
| <code>hscript PlayerInstanceFromIndex( int )</code>
| Returns gold amount for the player owning this hero
| Get a script instance of a player by index.
|-
|-
| SetGold
| GetListenServerHost
| <code>void SetGold( int, bool )</code>
| <code>hscript GetListenServerHost()</code>
| Sets the gold amount for the player owning this hero
| Get the local player on a listen server.
|-
|-
| GetCurrentXP
| ScreenShake
| <code>int GetCurrentXP()</code>
| <code>void ScreenShake( vector, float, float, float, float, int, bool )</code>
| Returns the amount of XP
| Start a screenshake with the following parameters. vecCenter, flAmplitude, flFrequency, flDuration, flRadius, eCommand( SHAKE_START = 0, SHAKE_STOP = 1 ), bAirShake
|-
|-
| GetPlayerID
| SpawnEntityFromTable
| <code>int GetPlayerID()</code>
| <code>bool SpawnEntityFromTable( cstring, hscript, hscript, hscript, hscript )</code>
| Returns player ID of the player owning this hero
| Spawns a single entity from a table
|-
|-
| RespawnHero
| SpawnEntityFromTableSync
| <code>void RespawnHero( bool, bool, bool )</code>
| <code>hscript SpawnEntityFromTableSync( cstring, hscript )</code>
| Respawn this hero.
| Spawns a single entity from a table
|-
|-
| HeroLevelUp
| SpawnEntityGroupFromTable
| <code>void HeroLevelUp( bool )</code>
| <code>bool SpawnEntityGroupFromTable( hscript, bool, hscript )</code>
| Levels up the hero, true or false to play effects.
| Hierarchically spawn an entity group from a set of spawn tables.
|-
|-
| GetAbilityPoints
| PrecacheEntityFromTable
| <code>int GetAbilityPoints()</code>
| <code>bool PrecacheEntityFromTable( hscript )</code>
| Gets the current unspent ability points.
| Precache an entity from KeyValues in table
|-
|-
| SetAbilityPoints
| PrecacheResource
| <code>void SetAbilityPoints( int )</code>
| <code>void PrecacheResource( cstring, cstring )</code>
| Sets the current unspent ability points.
| Manually precache a single resource
|-
| VectorToAngles
| <code>qangle VectorToAngles( vector )</code>
| Get Qangles (with no roll) for a Vector.
|-
| RotatePosition
| <code>vector RotatePosition( vector, qangle, vector )</code>
| Rotate a Vector around a point.
|-
| RotateOrientation
| <code>qangle RotateOrientation( qangle, qangle )</code>
| Rotate a QAngle by another QAngle.
|-
| RotationDelta
| <code>qangle RotationDelta( qangle, qangle )</code>
| Find the delta between two angles.
|-
| EmitSoundOn
| <code>void EmitSoundOn( cstring, hscript )</code>
| Play named sound on Entity
|-
| EmitSoundOnClient
| <code>void EmitSoundOnClient( cstring, hscript )</code>
| Play named sound only on the client for the passed in player
|-
|-
| SetCustomDeathXP
| EmitGlobalSound
| <code>void SetCustomDeathXP( int )</code>
| <code>void EmitGlobalSound( cstring )</code>
| Sets a custom experience value for this hero. Note, GameRules boolean must be set for this to work!
| Play named sound for all players
|-
| StopSoundOn
| <code>void StopSoundOn( cstring, hscript )</code>
| Stop named sound on Entity
|-
| GetPhysVelocity
| <code>vector GetPhysVelocity( hscript )</code>
| Get Velocity for VPHYS or normal object
|-
| GetPhysAngularVelocity
| <code>vector GetPhysAngularVelocity( hscript )</code>
| Get Angular Velocity for VPHYS or normal object
|-
| Say
| <code>void Say( hscript, cstring, bool )</code>
| Have Entity say string, and teamOnly or not
|-
| AddThinkToEnt
| <code>void AddThinkToEnt( hscript, cstring )</code>
| Adds a late bound think function to the C++ think tables for the obj
|-
| LoadKeyValues
| <code>variant LoadKeyValues( cstring )</code>
| Creates a table from the specified keyvalues text file
|-
| LoadKeyValuesFromString
| <code>variant LoadKeyValuesFromString( cstring )</code>
| Creates a table from the specified keyvalues string
|-
| DebugDrawScreenTextLine
| <code>void DebugDrawScreenTextLine( float, float, int, cstring, int, int, int, int, float )</code>
| Draw text with a line offset (x, y, lineOffset, text, r, g, b, a, duration)
|-
| DebugDrawText
| <code>void DebugDrawText( vector, cstring, bool, float )</code>
| Draw text in 3d (origin, text, bViewCheck, duration)
|-
| DebugDrawBox
| <code>void DebugDrawBox( vector, vector, vector, int, int, int, int, float )</code>
| Draw a debug overlay box (origin, mins, maxs, forward, r, g, b, a, duration )
|-
| DebugDrawLine
| <code>void DebugDrawLine( vector, vector, int, int, int, bool, float )</code>
| Draw a debug overlay line (origin, target, r, g, b, ztest, duration)
|-
| DebugDrawCircle
| <code>void DebugDrawCircle( vector, vector, float, float, bool, float )</code>
| Draw a debug circle (center, vRgb, a, rad, a, ztest, duration)
|-
| DebugDrawLine_vCol
| <code>void DebugDrawLine_vCol( vector, vector, vector, bool, float )</code>
| Draw a debug line using color vec (start, end, vRgb, a, ztest, duration)
|-
| DebugDrawBoxDirection
| <code>void DebugDrawBoxDirection( vector, vector, vector, vector, vector, float, float )</code>
| Draw a debug forward box (cent, min, max, forward, vRgb, a, duration)
|-
| DebugDrawClear
| <code>void DebugDrawClear()</code>
| Try to clear all the debug overlay info
|-
| GetFrameCount
| <code>int GetFrameCount()</code>
| Returns the engines current frame count
|-
| IsDedicatedServer
| <code>bool IsDedicatedServer()</code>
| Returns true if this server is a dedicated server.
|-
| CreateUnitByName
| <code>hscript CreateUnitByName( cstring, vector, bool, hscript, hscript, int )</code>
| Creates a DOTA unit by its dota_npc_units.txt name
|-
| PrecacheUnitByName
| <code>bool PrecacheUnitByName( cstring )</code>
| Precaches a DOTA unit by its dota_npc_units.txt name
|-
| CreateHeroForPlayer
| <code>hscript CreateHeroForPlayer( cstring, hscript )</code>
| Creates a DOTA hero by its dota_npc_units.txt name and sets it as the given player's controlled hero
|-
| CreateItem
| <code>hscript CreateItem( cstring, hscript, hscript )</code>
| Create a DOTA item
|-
| CreateItemOnPosition
| <code>hscript CreateItemOnPosition( vector )</code>
| Create a physical item at a given location
|-
| FindClearSpaceForUnit
| <code>void FindClearSpaceForUnit( hscript, vector, bool )</code>
| Place a unit somewhere not already occupied.
|-
| FindUnitsInRadius
| <code>variant FindUnitsInRadius( int, vector, hscript, float, int, int, int, int, bool )</code>
| Finds the units in a given radius with the given flags.
|-
| PrecacheUnit
| <code>void PrecacheUnit( cstring )</code>
| Precaches all the resources for a given unit.
|-
| GetFrostyPointsForRound
| <code>int GetFrostyPointsForRound( int, int, int )</code>
|
|-
| GetGoldFrostyPointsForRound
| <code>int GetGoldFrostyPointsForRound( int, int, int )</code>
|
|-
| GetFrostyBoostAmount
| <code>float GetFrostyBoostAmount( int, int )</code>
|
|-
| GetGoldFrostyBoostAmount
| <code>float GetGoldFrostyBoostAmount( int, int )</code>
|
|-
| SendFrostyPointsMessageToGC
| <code>void SendFrostyPointsMessageToGC( hscript )</code>
|
|-
| SendFrostivusTimeElapsedToGC
| <code>void SendFrostivusTimeElapsedToGC()</code>
|
|-
| ExecuteOrderFromTable
| <code>void ExecuteOrderFromTable( hscript )</code>
| Issue an order from a script table
|-
| ShowGenericPopup
| <code>void ShowGenericPopup( cstring, cstring, cstring, cstring, int )</code>
| Show a generic popup dialog for all players.
|-
| ShowGenericPopupToPlayer
| <code>void ShowGenericPopupToPlayer( hscript, cstring, cstring, cstring, cstring, int )</code>
| Show a generic popup dialog to a specific player.
|}
|}

Latest revision as of 20:15, 28 January 2014

|- | RandomInt | int RandomInt( int, int ) | Get a random int within a range |- | RandomFloat | float RandomFloat( float, float ) | Get a random float within a range |- | RandomVector | vector RandomVector( float ) | Get a random vector within a range |- | RollPercentage | bool RollPercentage( int ) | Rolls a number from 1 to 100 and returns true if the roll is less than or equal to the number specified

CScriptParticleManager

!Used to create and manage particle effects

Function Signature Description
CreateParticle int CreateParticle( cstring, int, hscript ) Creates a new particle effect
CreateParticleForPlayer int CreateParticleForPlayer( cstring, int, hscript, hscript ) Creates a new particle effect that only plays for the specified player
SetParticleControl void SetParticleControl( int, int, vector ) Set the control point data for a control on a particle effect
ReleaseParticleIndex void ReleaseParticleIndex( int ) Frees the specified particle index

|- | DoIncludeScript | bool DoIncludeScript( cstring, hscript ) | Execute a script (internal)

CEntityScriptFramework

C-side of entity framework


CEntities

!The global list of entities

Function Signature Description
First hscript First() Begin an iteration over the list of entities
Next hscript Next( hscript ) Continue an iteration over the list of entities, providing reference to a previously found entity
CreateByClassname hscript CreateByClassname( cstring ) Creates an entity by classname
FindByClassname hscript FindByClassname( hscript, cstring ) Find entities by class name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
FindAllByClassname variant FindAllByClassname( cstring ) Find entities by class name.
FindByName hscript FindByName( hscript, cstring ) Find entities by name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
FindAllByName variant FindAllByName( cstring ) Find entities by name; returns an array of everything found.
FindInSphere hscript FindInSphere( hscript, vector, float ) Find entities within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
FindAllInSphere variant FindAllInSphere( vector, float ) Find entities within a radius.
FindByTarget hscript FindByTarget( hscript, cstring ) Find entities by targetname. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
FindAllByTarget variant FindAllByTarget( cstring ) Find entities by targetname.
FindByModel hscript FindByModel( hscript, cstring ) Find entities by model name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
FindAllByModel variant FindAllByModel( cstring ) Find entities by model name.
FindByNameNearest hscript FindByNameNearest( cstring, vector, float ) Find entities by name nearest to a point.
FindByNameWithin hscript FindByNameWithin( hscript, cstring, vector, float ) Find entities by name within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
FindAllByNameWithin variant FindAllByNameWithin( cstring, vector, float ) Find entities by name within a radius.
FindByClassnameNearest hscript FindByClassnameNearest( cstring, vector, float ) Find entities by class name nearest to a point.
FindByClassnameWithin hscript FindByClassnameWithin( hscript, cstring, vector, float ) Find entities by class name within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
FindAllByClassnameWithin variant FindAllByClassnameWithin( cstring, vector, float ) Find entities by class name within a radius.


Convars

!Access to convar functions

Function Signature Description
GetFloat variant GetFloat( cstring ) GetFloat(name) : returns the convar as a float. May return null if no such convar.
GetStr variant GetStr( cstring ) GetFloat(name) : returns the convar as a string. May return null if no such convar.
GetBool variant GetBool( cstring ) GetBool(name) : returns the convar as a boolean flag.
RegisterCommand void RegisterCommand( cstring, hscript, cstring, int ) RegisterCommand(name, fn, helpString, flags) : register a console command.
RegisterConvar void RegisterConvar( cstring, cstring, cstring, int ) RegisterConvar(name, defaultValue, helpString, flags): register a new console variable.
GetCommandClient hscript GetCommandClient() GetCommandClient() : returns the player who issued this console command.
GetDOTACommandClient hscript GetDOTACommandClient() GetDOTACommandClient() : returns the DOTA player who issued this console command.


CScriptHeroList

!The global list of heroes

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


CDOTAGamerules

!DOTA GameRules

Function Signature Description
State_Get unknown_variant_type State_Get() Get the current Gamerules state
GetGameTime float GetGameTime() Returns the number of seconds elapsed since map start. This time doesn't count up when the game is paused
GetDifficulty int GetDifficulty() Returns difficulty level of the custom game mode
GetCustomGameDifficulty int GetCustomGameDifficulty() Returns the difficulty level of the custom game mode
Defeated void Defeated() Kills the ancient, etc.
ResetDefeated void ResetDefeated() Restart after killing the ancient, etc.
SetGameWinner void SetGameWinner( int ) Makes ths specified team win
MakeTeamLose void MakeTeamLose( int ) Makes ths specified team lose
ResetMap void ResetMap( int ) Resets the map in one of several ways
GetDroppedItem hscript GetDroppedItem( int ) Gets the Xth dropped item
NumDroppedItems int NumDroppedItems() Returns the number of items currently dropped on the ground
SendCustomMessage void SendCustomMessage( cstring, int, int ) Sends a string to the defined team.
SetHeroRespawnEnabled void SetHeroRespawnEnabled( bool ) Control if the normal DOTA hero respawn rules apply.
Playtesting_UpdateCustomKeyValues void Playtesting_UpdateCustomKeyValues() Updates custom hero, unit and ability KeyValues in memory with the latest values from disk
ResetToHeroSelection void ResetToHeroSelection() Restart the game at hero selection
SetTreeRegrowTime void SetTreeRegrowTime( float ) Sets the tree regrow time in seconds.
SetHeroSelectionTime void SetHeroSelectionTime( float ) Sets the amount of time players have to pick their hero.
SetPreGameTime void SetPreGameTime( float ) Sets the amount of time players have between picking their hero and game start.
SetPostGameTime void SetPostGameTime( float ) Sets the amount of time players have between the game ending and the server disconnecting them.
SetRuneSpawnTime void SetRuneSpawnTime( float ) Sets the amount of time between rune spawns.
SetSameHeroSelectionEnabled void SetSameHeroSelectionEnabled( bool ) When true, players can repeatedly pick the same hero.
SetUseUniversalShopMode void SetUseUniversalShopMode( bool ) When true, all items are available at as long as any shop is in range.
SetTimeOfDay void SetTimeOfDay( float ) Set the time of day.
SetOverlayHealthBarUnit void SetOverlayHealthBarUnit( hscript, int ) Show this unit's health on the overlay health bar
SetHeroMinimapIconSize void SetHeroMinimapIconSize( int ) (nMinimapHeroIconSize) - Set the hero minimap icon size.
SetCreepMinimapIconScale void SetCreepMinimapIconScale( float ) (flMinimapCreepIconScale) - Scale the creep icons on the minimap.
SetRuneMinimapIconScale void SetRuneMinimapIconScale( float ) (flMinimapRuneIconScale) - Scale the rune icons on the minimap.
SetSafeToLeave void SetSafeToLeave( bool ) (bSafeToLeave) - Mark this game as safe to leave.
SetUseCustomHeroXPValues void SetUseCustomHeroXPValues( bool ) Allows heroes in the map to give a specific amount of XP (this value must be set).
SetCustomGameDifficulty void SetCustomGameDifficulty( int ) Set the difficulty level of the custom game mode


CDOTAVoteSystem

!DOTA Vote System

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


CBaseEntity

Root class of all server-side entities

Function Signature Description
ConnectOutput void ConnectOutput( cstring, cstring ) Adds an I/O connection that will call the named function when the specified output fires
DisconnectOutput void DisconnectOutput( cstring, cstring ) Removes a connected script function from an I/O event.
GetHealth int GetHealth()
SetHealth void SetHealth( int )
GetMaxHealth int GetMaxHealth()
SetMaxHealth void SetMaxHealth( int )
IsAlive bool IsAlive()
Remove void Remove()
SetModel void SetModel( cstring )
GetModelName cstring GetModelName() Returns the name of the model
EmitSound void EmitSound( cstring ) Plays a sound from this entity.
EmitSoundParams void EmitSoundParams( cstring, int, float ) Plays/modifies a sound from this entity. changes sound if nPitch and/or flVol is > 0.
StopSound void StopSound( cstring ) Stops a named sound playing from this entity.
PrecacheSoundScript void PrecacheSoundScript( cstring ) Precache a sound for later playing.
GetSoundDuration float GetSoundDuration( cstring, cstring ) Returns float duration of the sound. Takes soundname and optional actormodelname.
GetClassname cstring GetClassname()
GetName cstring GetName()
GetPreTemplateName cstring GetPreTemplateName() Get the entity name stripped of template unique decoration
GetAbsOrigin vector GetAbsOrigin()
SetAbsOrigin void SetAbsOrigin( vector )
GetOrigin vector GetOrigin()
SetAbsOrigin void SetAbsOrigin( vector ) SetOrigin
SetOrigin void SetOrigin( vector )
GetForwardVector vector GetForwardVector() Get the forward vector of the entity
GetRightVector vector GetRightVector() Get the right vector of the entity
GetUpVector vector GetUpVector() Get the up vector of the entity
SetForwardVector void SetForwardVector( vector ) Set the orientation of the entity to have this forward vector
GetVelocity vector GetVelocity()
SetVelocity void SetVelocity( vector )
SetAngularVelocity void SetAngularVelocity( float, float, float ) Set the local angular velocity - takes float pitch,yaw,roll velocities
GetAngularVelocity vector GetAngularVelocity() Get the local angular velocity - returns a vector of pitch,yaw,roll
GetCenter vector GetCenter() Get vector to center of object - absolute coords
EyePosition vector EyePosition() Get vector to eye position - absolute coords
SetAngles void SetAngles( float, float, float ) Set entity pitch, yaw, roll
GetAngles vector GetAngles() Get entity pitch, yaw, roll as a vector
SetSize void SetSize( vector, vector )
GetBoundingMins vector GetBoundingMins() Get a vector containing min bounds, centered on object
GetBoundingMaxs vector GetBoundingMaxs() Get a vector containing max bounds, centered on object
Destroy void Destroy()
SetOwner void SetOwner( hscript )
GetTeam int GetTeam()
SetTeam void SetTeam( int )
GetMoveParent hscript GetMoveParent() If in hierarchy, retrieves the entity's parent
GetRootMoveParent hscript GetRootMoveParent() If in hierarchy, walks up the hierarchy to find the root parent
FirstMoveChild hscript FirstMoveChild()
NextMovePeer hscript NextMovePeer()
__KeyValueFromString bool __KeyValueFromString( cstring, cstring ) @
__KeyValueFromFloat bool __KeyValueFromFloat( cstring, float ) @
__KeyValueFromInt bool __KeyValueFromInt( cstring, int ) @
__KeyValueFromVector bool __KeyValueFromVector( cstring, vector ) @
Trigger void Trigger() Fires off this entity's OnTrigger responses
ValidateScriptScope bool ValidateScriptScope() Ensure that an entity's script scope has been created
GetScriptScope hscript GetScriptScope() Retrieve the script-side data associated with an entity
GetScriptId cstring GetScriptId() Retrieve the unique identifier used to refer to the entity within the scripting system
GetOwner hscript GetOwner() Gets this entity's owner
SetOwner void SetOwner( hscript ) Sets this entity's owner
entindex unknown_variant_type entindex()


CDOTA_PlayerResource extends CBaseEntity

Interface to player data

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


CDOTABaseGameMode extends CBaseEntity

Base game mode class

Function Signature Description
BeginThink bool BeginThink( cstring, hscript, float ) Start a think callback. Takes a function and an interval
EndThink void EndThink( cstring ) Stop a think callback.
SetAlwaysShowPlayerInventory void SetAlwaysShowPlayerInventory( bool ) Show the player hero's inventory in the HUD, regardless of what unit is selected.
SetGoldSoundDisabled void SetGoldSoundDisabled( bool ) Turn the sound when gold is acquired off/on. Takes a bool.
SetRecommendedItemsDisabled void SetRecommendedItemsDisabled( bool ) Turn the panel for showing recommended items at the shop off/on. Takes a bool.
SetCameraDistanceOverride void SetCameraDistanceOverride( float ) Set a different camera distance; dota default is 1134.
SetOverrideSelectionEntity void SetOverrideSelectionEntity( hscript ) Set an override for the default selection entity, instead of each player's hero.
SetRemoveIllusionsOnDeath void SetRemoveIllusionsOnDeath( bool ) Make it so illusions are immediately removed upon death, rather than sticking around for a few seconds.
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.
SetFogOfWarDisabled void SetFogOfWarDisabled( bool ) Turn the fog of war on or off.
SetCustomBuybackCostEnabled void SetCustomBuybackCostEnabled( bool ) Turns on capability to define custom buyback costs.
SetCustomBuybackCooldownEnabled void SetCustomBuybackCooldownEnabled( bool ) Turns on capability to define custom buyback cooldowns.


CBaseAnimating extends CBaseEntity

Animating models

Function Signature Description
LookupAttachment int LookupAttachment( cstring ) Get the named attachement id
GetAttachmentOrigin vector GetAttachmentOrigin( int ) Get the attachement id's origin vector
GetAttachmentAngles vector GetAttachmentAngles( int ) Get the attachement id's angles as a p,y,r vector
IsSequenceFinished bool IsSequenceFinished() Ask whether the main sequence is done playing
SetBodygroup void SetBodygroup( int, int ) Sets a bodygroup
SetModelScale void SetModelScale( float, float ) Set the model scale


CBaseFlex extends CBaseAnimating

Animated characters who have vertex flex capability.

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


CDOTA_BaseNPC extends CBaseFlex

A Dota NPC Unit

Function Signature Description
IsAncient bool IsAncient() Is this creature an Ancient?
IsNeutralUnitType bool IsNeutralUnitType() Is this a neutral?
IsSummoned bool IsSummoned() Is this unit summoned?
IsCreature bool IsCreature() Is this a Creature type NPC
IsHero bool IsHero() Is this a hero or hero illusion?
IsRealHero bool IsRealHero() Is this a real hero?
IsTower bool IsTower() Is this a tower?
IsAlive bool IsAlive() Is this unit alive?
IsMechanical bool IsMechanical() Is the unit mechanical?
IsPhantom bool IsPhantom() Is this a phantom unit?
SetInitialGoalEntity void SetInitialGoalEntity( hscript ) Sets the initial waypoint goal for this NPC
GetInitialGoalEntity hscript GetInitialGoalEntity() Returns the initial waypoint goal for this NPC
SetMustReachEachGoalEntity void SetMustReachEachGoalEntity( bool ) Set whether this NPC is required to reach each goal entity, rather than being allowed to 'unkink' their path
GetMustReachEachGoalEntity bool GetMustReachEachGoalEntity() Get whether this NPC is required to reach each goal entity, rather than being allowed to 'unkink' their path
AddNewModifier void AddNewModifier( hscript, hscript, cstring, hscript ) Add a modifier to this unit
HasModifier bool HasModifier( cstring ) Sees if this unit has a given modifier
RemoveModifierByName void RemoveModifierByName( cstring ) Removes a modifier
RemoveModifierByNameAndCaster void RemoveModifierByNameAndCaster( cstring, hscript ) Removes a modifier that was cast by the given caster
AddItem void AddItem( hscript ) Add an item to this unit's inventory.
AddAbility void AddAbility( cstring ) Add an ability to this unit by name.
RemoveAbility void RemoveAbility( cstring ) Remove an ability from this unit by name.
HasAbility bool HasAbility( cstring ) See whether this unit has an ability by name.
FindAbilityByName hscript FindAbilityByName( cstring ) Retrieve an ability by name from the unit.
GetGoldBounty int GetGoldBounty() Get the gold bounty on this unit
SetDeathXP void SetDeathXP( int ) Set the XP bounty on this unit
GetDeathXP int GetDeathXP() Get the XP bounty on this unit
GetUnitName cstring GetUnitName() Get the name of this unit.
GetTeamNumber int GetTeamNumber() Get the team number of this unit.
GetPlayerOwner hscript GetPlayerOwner() Returns the player that owns this unit
SetMaximumGoldBounty void SetMaximumGoldBounty( int ) Set the maximum gold bounty for this unit.
SetMinimumGoldBounty void SetMinimumGoldBounty( int ) Set the minimum gold bounty for this unit.
GetTotalPurchasedUpgradeGoldCost int GetTotalPurchasedUpgradeGoldCost() Get how much gold has been spent on ability upgrades.
ForceKill void ForceKill( bool ) Kill this unit immediately.
GetBaseDamageMin int GetBaseDamageMin() Get the minimum attack damage of this unit.
GetBaseDamageMax int GetBaseDamageMax() Get the maximum attack damage of this unit.
Heal void Heal( float, hscript ) Heal this unit.
GetMaxHealth int GetMaxHealth() Get the maximum health of this unit.
GetHealthPercent int GetHealthPercent() Get the current health percent of the unit.
SetMana void SetMana( float ) Set the mana on this unit.
GetMaxMana float GetMaxMana() Get the maximum mana of this unit.
RespawnUnit void RespawnUnit() Respawns the target unit if it can be respawned.
GetLevel int GetLevel() Returns the level of this unit.
GetItemInSlot hscript GetItemInSlot( int ) Returns nth item in inventory slot (index is zero based)
SetOriginalModel void SetOriginalModel( cstring ) Sets the original model of this entity, which it will tend to fall back to anytime its state changes
AddNoDraw void AddNoDraw() Adds the no draw flag.
RemoveNoDraw void RemoveNoDraw() Remove the no draw flag.
GetPlayerOwnerID int GetPlayerOwnerID() Get the owner player ID for this unit.
IsRangedAttacker bool IsRangedAttacker() Is this unit a ranged attacker?
GetCurrentActiveAbility hscript GetCurrentActiveAbility() Get the ability this unit is currently casting.
MoveToPosition void MoveToPosition( vector ) Issue a Move-To command
MoveToPositionAggressive void MoveToPositionAggressive( vector ) Issue an Attack-Move-To command
MoveToNPC void MoveToNPC( hscript ) Move to follow a unit.
MoveToTargetToAttack void MoveToTargetToAttack( hscript ) Move to a target to attack.
Hold void Hold() Hold position.
Stop void Stop() Stop the current order.
CastAbilityToggle void CastAbilityToggle( hscript, int ) Toggle an ability.
CastAbilityImmediately void CastAbilityImmediately( hscript, int ) Cast an ability immediately.
CastAbilityOnPosition void CastAbilityOnPosition( vector, hscript, int ) Cast an ability on a position.
CastAbilityOnTarget void CastAbilityOnTarget( hscript, hscript, int ) Cast an ability on a target entity.
CastAbilityNoTarget void CastAbilityNoTarget( hscript, int ) Cast an ability with no target.
DropItemAtPosition void DropItemAtPosition( vector, hscript ) Drop an item at a given point.
MoveToNPCToGiveItem void MoveToNPCToGiveItem( hscript, hscript ) Give an item to another unit.
PickupDroppedItem void PickupDroppedItem( hscript ) Pick up a dropped item.
PickupRune void PickupRune( hscript ) Pick up a rune.
DropItemAtPositionImmediate void DropItemAtPositionImmediate( hscript, vector ) Immediately drop a carried item at a given position.


CDOTA_BaseNPC_Building extends CDOTA_BaseNPC

A building.

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


CDOTABaseAbility extends CBaseEntity

An ability

Function Signature Description
GetAbilityName cstring GetAbilityName() Returns the name of this ability.
GetSpecialValueFor variant GetSpecialValueFor( cstring ) Gets a value from this ability's special value block for its current level.
GetCastRange int GetCastRange() Gets the cast range of the ability.
IsFullyCastable bool IsFullyCastable() Returns whether the ability can be cast.
IsChanneling bool IsChanneling() Returns whether the ability is currently channeling.
IsInAbilityPhase bool IsInAbilityPhase() Returns whether the ability is currently casting.
GetCooldown float GetCooldown( int ) Get the cooldown duration for this ability at a given level, not the amount of cooldown actually left.
EndCooldown void EndCooldown() Clear the cooldown remaining on this ability.
MarkAbilityButtonDirty void MarkAbilityButtonDirty() Mark the ability button for this ability as needing a refresh
SetLevel void SetLevel( int ) Sets the level of this ability.


CDOTA_BaseNPC_Creature extends CDOTA_BaseNPC

A Dota NPC Unit

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


CDOTA_BaseNPC_Hero extends CDOTA_BaseNPC

A Dota Hero NPC

Function Signature Description
ModifyGold int ModifyGold( int, bool, int ) Gives this hero some gold
GetGold int GetGold() Returns gold amount for the player owning this hero
SetGold void SetGold( int, bool ) Sets the gold amount for the player owning this hero
GetCurrentXP int GetCurrentXP() Returns the amount of XP
GetPlayerID int GetPlayerID() Returns player ID of the player owning this hero
RespawnHero void RespawnHero( bool, bool, bool ) Respawn this hero.
HeroLevelUp void HeroLevelUp( bool ) Levels up the hero, true or false to play effects.
GetAbilityPoints int GetAbilityPoints() Gets the current unspent ability points.
SetAbilityPoints void SetAbilityPoints( int ) Sets the current unspent ability points.
SetCustomDeathXP void SetCustomDeathXP( int ) Sets a custom experience value for this hero. Note, GameRules boolean must be set for this to work!


CDotaQuest extends CBaseEntity

A quest

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


CDOTA_Item extends CDOTABaseAbility

A usable item.

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


CDOTA_Item_DataDriven extends CDOTA_Item

A data driven usable item.

Function Signature Description
ApplyDataDrivenModifier void ApplyDataDrivenModifier( hscript, hscript, cstring, hscript ) Applies a data driven modifier to the target


CDotaSubquestBase extends CBaseEntity

A subquest

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


CDOTAPlayer extends CBaseAnimating

dota_player

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


CDOTA_Item_Physical extends CBaseAnimating

A physical item dropped in the world

Function Signature Description
GetCreationTime float GetCreationTime() Returns the game time when this item was created in the world
GetContainedItem hscript GetContainedItem() Returned the contained item.
SetContainedItem void SetContainedItem( hscript ) Set the contained item.
ShowMessage void ShowMessage( cstring ) Print a hud message on all clients
GetMapName cstring GetMapName() Get the name of the map.
SendToConsole void SendToConsole( cstring ) Send a string to the console as a client command
SendToServerConsole void SendToServerConsole( cstring ) Send a string to the console as a server command
PrintLinkedConsoleMessage void PrintLinkedConsoleMessage( cstring, cstring ) Print a console message with a linked console command
InitLogFile void InitLogFile( cstring, cstring ) If the given file doesn't exist, creates it with the given contents; does nothing if it exists
AppendToLogFile void AppendToLogFile( cstring, cstring ) Appends a string to a log file on the server
GetWorldMinX float GetWorldMinX() Gets the world's minimum X position.
GetWorldMinY float GetWorldMinY() Gets the world's maximum Y position.
GetWorldMaxX float GetWorldMaxX() Gets the world's minimum X position.
GetWorldMaxY float GetWorldMaxY() Gets the world's maximum Y position.
Time float Time() Get the current server time
GetSystemTime cstring GetSystemTime() Get the current real world time
GetSystemDate cstring GetSystemDate() Get the current real world date
UTIL_RemoveImmediate void UTIL_RemoveImmediate( hscript ) Immediately removes the specified entity
DoEntFire void DoEntFire( cstring, cstring, cstring, float, hscript, hscript ) #EntFire:Generate and entity i/o event
EntFireByHandle void EntFireByHandle( hscript, cstring, cstring, float, hscript, hscript ) Generate and entity i/o event
IsValidEntity bool IsValidEntity( hscript ) Checks to see if the given hScript is a valid entity
IsMarkedForDeletion bool IsMarkedForDeletion( hscript ) Returns true if the entity is valid and marked for deletion.
DoUniqueString cstring DoUniqueString( cstring ) #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 tables when not sure what keys are already in use in that table.
ListenToGameEvent int ListenToGameEvent( cstring, hscript, hscript ) Register as a listener for a game event from script.
StopListeningToGameEvent bool StopListeningToGameEvent( int ) Stop listening to a particular game event.
FireGameEvent void FireGameEvent( cstring, hscript ) Fire a game event.
FireGameEventLocal void FireGameEventLocal( cstring, hscript ) Fire a game event without broadcasting to the client.
PauseGame void PauseGame( bool ) Pause or unpause the game.
EntIndexToHScript hscript EntIndexToHScript( int ) Turn an entity index integer to an HScript representing that entity's script instance.
PlayerInstanceFromIndex hscript PlayerInstanceFromIndex( int ) Get a script instance of a player by index.
GetListenServerHost hscript GetListenServerHost() Get the local player on a listen server.
ScreenShake void ScreenShake( vector, float, float, float, float, int, bool ) Start a screenshake with the following parameters. vecCenter, flAmplitude, flFrequency, flDuration, flRadius, eCommand( SHAKE_START = 0, SHAKE_STOP = 1 ), bAirShake
SpawnEntityFromTable bool SpawnEntityFromTable( cstring, hscript, hscript, hscript, hscript ) Spawns a single entity from a table
SpawnEntityFromTableSync hscript SpawnEntityFromTableSync( cstring, hscript ) Spawns a single entity from a table
SpawnEntityGroupFromTable bool SpawnEntityGroupFromTable( hscript, bool, hscript ) Hierarchically spawn an entity group from a set of spawn tables.
PrecacheEntityFromTable bool PrecacheEntityFromTable( hscript ) Precache an entity from KeyValues in table
PrecacheResource void PrecacheResource( cstring, cstring ) Manually precache a single resource
VectorToAngles qangle VectorToAngles( vector ) Get Qangles (with no roll) for a Vector.
RotatePosition vector RotatePosition( vector, qangle, vector ) Rotate a Vector around a point.
RotateOrientation qangle RotateOrientation( qangle, qangle ) Rotate a QAngle by another QAngle.
RotationDelta qangle RotationDelta( qangle, qangle ) Find the delta between two angles.
EmitSoundOn void EmitSoundOn( cstring, hscript ) Play named sound on Entity
EmitSoundOnClient void EmitSoundOnClient( cstring, hscript ) Play named sound only on the client for the passed in player
EmitGlobalSound void EmitGlobalSound( cstring ) Play named sound for all players
StopSoundOn void StopSoundOn( cstring, hscript ) Stop named sound on Entity
GetPhysVelocity vector GetPhysVelocity( hscript ) Get Velocity for VPHYS or normal object
GetPhysAngularVelocity vector GetPhysAngularVelocity( hscript ) Get Angular Velocity for VPHYS or normal object
Say void Say( hscript, cstring, bool ) Have Entity say string, and teamOnly or not
AddThinkToEnt void AddThinkToEnt( hscript, cstring ) Adds a late bound think function to the C++ think tables for the obj
LoadKeyValues variant LoadKeyValues( cstring ) Creates a table from the specified keyvalues text file
LoadKeyValuesFromString variant LoadKeyValuesFromString( cstring ) Creates a table from the specified keyvalues string
DebugDrawScreenTextLine void DebugDrawScreenTextLine( float, float, int, cstring, int, int, int, int, float ) Draw text with a line offset (x, y, lineOffset, text, r, g, b, a, duration)
DebugDrawText void DebugDrawText( vector, cstring, bool, float ) Draw text in 3d (origin, text, bViewCheck, duration)
DebugDrawBox void DebugDrawBox( vector, vector, vector, int, int, int, int, float ) Draw a debug overlay box (origin, mins, maxs, forward, r, g, b, a, duration )
DebugDrawLine void DebugDrawLine( vector, vector, int, int, int, bool, float ) Draw a debug overlay line (origin, target, r, g, b, ztest, duration)
DebugDrawCircle void DebugDrawCircle( vector, vector, float, float, bool, float ) Draw a debug circle (center, vRgb, a, rad, a, ztest, duration)
DebugDrawLine_vCol void DebugDrawLine_vCol( vector, vector, vector, bool, float ) Draw a debug line using color vec (start, end, vRgb, a, ztest, duration)
DebugDrawBoxDirection void DebugDrawBoxDirection( vector, vector, vector, vector, vector, float, float ) Draw a debug forward box (cent, min, max, forward, vRgb, a, duration)
DebugDrawClear void DebugDrawClear() Try to clear all the debug overlay info
GetFrameCount int GetFrameCount() Returns the engines current frame count
IsDedicatedServer bool IsDedicatedServer() Returns true if this server is a dedicated server.
CreateUnitByName hscript CreateUnitByName( cstring, vector, bool, hscript, hscript, int ) Creates a DOTA unit by its dota_npc_units.txt name
PrecacheUnitByName bool PrecacheUnitByName( cstring ) Precaches a DOTA unit by its dota_npc_units.txt name
CreateHeroForPlayer hscript CreateHeroForPlayer( cstring, hscript ) Creates a DOTA hero by its dota_npc_units.txt name and sets it as the given player's controlled hero
CreateItem hscript CreateItem( cstring, hscript, hscript ) Create a DOTA item
CreateItemOnPosition hscript CreateItemOnPosition( vector ) Create a physical item at a given location
FindClearSpaceForUnit void FindClearSpaceForUnit( hscript, vector, bool ) Place a unit somewhere not already occupied.
FindUnitsInRadius variant FindUnitsInRadius( int, vector, hscript, float, int, int, int, int, bool ) Finds the units in a given radius with the given flags.
PrecacheUnit void PrecacheUnit( cstring ) Precaches all the resources for a given unit.
GetFrostyPointsForRound int GetFrostyPointsForRound( int, int, int )
GetGoldFrostyPointsForRound int GetGoldFrostyPointsForRound( int, int, int )
GetFrostyBoostAmount float GetFrostyBoostAmount( int, int )
GetGoldFrostyBoostAmount float GetGoldFrostyBoostAmount( int, int )
SendFrostyPointsMessageToGC void SendFrostyPointsMessageToGC( hscript )
SendFrostivusTimeElapsedToGC void SendFrostivusTimeElapsedToGC()
ExecuteOrderFromTable void ExecuteOrderFromTable( hscript ) Issue an order from a script table
ShowGenericPopup void ShowGenericPopup( cstring, cstring, cstring, cstring, int ) Show a generic popup dialog for all players.
ShowGenericPopupToPlayer void ShowGenericPopupToPlayer( hscript, cstring, cstring, cstring, cstring, int ) Show a generic popup dialog to a specific player.