GetParentCellOwner

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

A command for Oblivion Script Extender

Syntax:

(owner:ref) reference.GetParentCellOwner

Returns the NPC or faction which owns the calling reference's parent cell..

Notes[edit | edit source]

  • Returns the base objectID of the owning faction/NPC.
  • If the cell has a set Owner NPC, all items in the cell are owned by the NPC. However, the individual item's owner will override this, so always check GetOwner first.
ref pOwner
...
set pOwner to SomeRef.GetOwner
if (pOwner == 0)
  set pOwner to SomeRef.GetParentCellOwner
endif
if pOwner
...
  • If you want to know if an actor owns an item or can legally activate it, use IsOffLimits instead.

See Also[edit | edit source]