Dota 2 Workshop Tools/Scripting/API/Global.CreateHeroForPlayer
< Dota 2 Workshop Tools | Scripting | API
Jump to navigation
Jump to search
Note: This page is automatically generated. Any changes may be overwritten
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