Dota 2 Workshop Tools/Scripting/API/Global.CreateHeroForPlayer: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Dota_Lebot push: Updated Page)
(Dota_Lebot push: Updated Page)
 
(2 intermediate revisions by the same user not shown)
Line 6: Line 6:




''' handle CreateHeroForPlayer(string ''a'', handle ''b'') '''
''' 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 19: Line 19:
|-
|-
| string
| string
| a
| unitName
| No Description Set
| a DOTA hero by its dota_npc_units.txt name
|-
|-
| handle
| handle
| b
| player
| No Description Set
| a [[Dota 2 Workshop Tools/Scripting/API#CDOTAPlayer | CDOTAPlayer]] handle
|}
|}


== Returns ==
== Returns ==


''handle'' - No Description Set
''handle'' - The hero created

Latest revision as of 03:20, 31 August 2014

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