GetOwner

From the Oblivion ConstructionSet Wiki
Revision as of 02:48, 7 December 2007 by imported>Haama (Created)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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
...

See Also