Difference between revisions of "GetOwner"
Jump to navigation
Jump to search
imported>Haama (→Notes: Note on returned reference - seems to be a base objectID) |
imported>Haama (→Notes: Added IsOfflimits) |
||
Line 17: | Line 17: | ||
...</pre> | ...</pre> | ||
*The returned ownerID seems to be a base ObjectID, and it should be used in the ''objectID'' position of any other function. | *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. | |||
==See Also== | ==See Also== |
Revision as of 03:23, 27 January 2008
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.
- If you want to know if an actor owns an item or can legally activate it, use IsOffLimits instead.