GetOwningFactionRequiredRank
(Redirected from GetOwningFactionRank)
Jump to navigation
Jump to search
A command for Oblivion Script Extender
Syntax:
(rank:short) ref.GetOwningFactionRequiredRank
Returns the rank in the owning faction required to legally activate the calling reference.
Example
ref rOwner short fRank ... set rOwner to SomeRef.GetOwner if ((GetObjectType rOwner) == 6) set fRank to (GetOwningFactionRequiredRank)
This returns the Faction Rank to fRank, if the owner of the item is a faction.
Notes[edit | edit source]
- 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 rOwner short fRank ... set rOwner to SomeRef.GetOwner if (rOwner == 0) set rOwner to SomeRef.GetParentCellOwner if ((GetObjectType rOwner) == 6) set fRank to SomeRef.GetParentCellOwningFactionRequiredRank endif elseif ((GetObjectType rOwner) == 6) set fRank to SomeRef.GetOwningFactionRequiredRank endif if rOwner ...
- If you want to know if an actor owns an item or can legally activate it, use IsOffLimits instead.