GetOwner
Revision as of 12:40, 13 December 2010 by imported>Bruneauinfo (Added a new top note)
A command for Oblivion Script Extender
Syntax:
(owner:ref) reference.GetOwner
Returns the NPC or faction which owns the calling reference.
NotesEdit
- GetOwner does not appear to work on activators such as switches and doors.
- 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.
- If you want to know if an actor owns an item or can legally activate it, use IsOffLimits instead.