Difference between revisions of "GetOwner"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Haama
(Created)
 
imported>Haama
(→‎Notes: Note on returned reference - seems to be a base objectID)
Line 16: Line 16:
if pOwner
if pOwner
...</pre>
...</pre>
*The returned ownerID seems to be a base ObjectID, and it should be used in the ''objectID'' position of any other function.


==See Also==
==See Also==

Revision as of 12:41, 7 December 2007

A command for Oblivion Script Extender

Syntax:

(owner:ref) reference.GetOwner

Returns the NPC or faction which owns the calling reference.

Notes

  • The ownership of an item can also be determined by the cell owner. If the cell has a set Owner NPC, all items in the cell are owned by the NPC. In that case, this function may return 0, but GetParentCellOwner will return the true owner. In code
ref pOwner
...
set pOwner to SomeRef.GetOwner
if (pOwner == 0)
  set pOwner to SomeRef.GetParentCellOwner
endif
if pOwner
...
  • The returned ownerID seems to be a base ObjectID, and it should be used in the objectID position of any other function.

See Also