GetHeroProperName
- Parameters
-
whichHero unit
- comment
-
Returns the hero's "Proper Name".
A "proper name" is one of the multiple names a hero can get at random. It's the big name displayed above the experience bar.
Example (Lua, 2.0.2):
h1 = CreateUnit(Player(0), FourCC("Hamg"), -30, 0, 90) print(GetUnitName(h1) .." (unit name) aka (proper name) ".. GetHeroProperName(h1)) -- equivalent to: print(BlzGetUnitStringField(h1, UNIT_SF_PROPER_NAMES))
- note
-
Will return
null
on non-hero units ornull
. - note
-
See:
BlzSetUnitName
,BlzGetUnitStringField
,GetDestructableName
,GetItemName
,GetObjectName
. - patch
-
1.15
- Source
- common.j (suggest an edit or discuss on Github)
- return type
-
string
- Source code
-
native GetHeroProperName takes unit whichHero returns string