Dota 2 Workshop Tools/Scripting/API/Global.CreateHeroForPlayer

From Valve Developer Community
Jump to: navigation, search
Note.pngNote: 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