Dota 2 Workshop Tools/Scripting/API/Global.CreateHeroForPlayer: Difference between revisions
< Dota 2 Workshop Tools | Scripting | API
Jump to navigation
Jump to search
RoyAwesome (talk | contribs) (Dota_Lebot push: Updated Page) |
RoyAwesome (talk | contribs) (Dota_Lebot push: Updated Page) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Note | This page is automatically generated. Any changes may be overwritten}} | {{Note | This page is automatically generated. Any changes may be overwritten}} | ||
[[Category:Dota2Function]] | |||
[[Category:Global]] | |||
== Function Description == | == Function Description == | ||
''' handle CreateHeroForPlayer(string '''', handle '''') ''' | ''' handle CreateHeroForPlayer(string ''unitName'', handle ''player'') ''' | ||
''Creates a DOTA hero by its dota_npc_units.txt name and sets it as the given player's controlled hero'' | ''Creates a DOTA hero by its dota_npc_units.txt name and sets it as the given player's controlled hero'' | ||
Line 17: | Line 19: | ||
|- | |- | ||
| string | | string | ||
| | | unitName | ||
| | | a DOTA hero by its dota_npc_units.txt name | ||
|- | |- | ||
| handle | | handle | ||
| | | player | ||
| | | a [[Dota 2 Workshop Tools/Scripting/API#CDOTAPlayer | CDOTAPlayer]] handle | ||
|} | |} | ||
== Returns == | == Returns == | ||
''handle'' - | ''handle'' - The hero created |
Latest revision as of 03:20, 31 August 2014

Function Description
handle CreateHeroForPlayer(string unitName, handle player)
Creates a DOTA hero by its dota_npc_units.txt name and sets it as the given player's controlled hero
Parameters
Type | Name | Description |
---|---|---|
string | unitName | a DOTA hero by its dota_npc_units.txt name |
handle | player | a CDOTAPlayer handle |
Returns
handle - The hero created