Dota 2 Workshop Tools/Scripting/API/CDOTA BaseNPC.GetPlayerOwnerID

From Valve Developer Community
< Dota 2 Workshop Tools‎ | Scripting‎ | API
Revision as of 01:20, 17 June 2015 by RoyAwesome (talk | contribs) (Undo revision 190739 by RoyAwesome (talk))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Note.png Note:  This page is automatically generated. Any changes may be overwritten

Function Description

int GetPlayerOwnerID()

Get the owner player ID for this unit.

It is recommended that instead of this function you use GetOwner():GetPlayerID(). Units summoned in LUA will return -1 for :GetPlayerOwnerID(), but with GetOwner():GetPlayerID() it will correctly return the owners player ID


int - The owning players ID (0-9) If none is found than it will return -1