Difference between revisions of "SetOwnership"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Laisren
m
imported>Scruggs
(Clean up redundancy between Syntax Detail and Notes; remove basic info about reference syntax; fix red links)
Line 6: Line 6:


'''Syntax Detail:'''
'''Syntax Detail:'''
''referenced-item.'' -Required parameter if object has not been previously referenced. The period is required as part of the parameter.


''Owner'' - Specify either an Owner NPC or an Owner FactionID.
''Owner'' - Specify either an Owner NPC or an Owner FactionID.
:* For ''NPC'', use a [[base NPC]] reference.
:* For ''NPC'', use a base [[NPC]], not an NPC [[reference]].
:* For ''FactionID'', specify a [[Faction name]] or Faction Reference-Identifier number.
:* For ''FactionID'', specify a [[:Category:Factions|Faction]] name
:* If no ''Owner'' is specified, the reference will be set to player ownership
:* If no ''Owner'' is specified, the reference will be set to player ownership


'''Examples:'''  
'''Examples:'''  
Line 19: Line 16:
  RewardSwordRef.SetOwnership
  RewardSwordRef.SetOwnership


==Notes/Details==
==See also==
* If the second parameter is left blank, the reference will be set to player ownership.
[[Interior cells]] (as a reference on Cell Ownership).
* Note that only a base NPC, not an NPC reference, can have ownership.
* The console script indentifies the second parameter as "Owner".
* See also [[Interior_cells]] (as a reference on Cell Ownership).


[[Category: Functions]]
[[Category: Functions]]

Revision as of 10:30, 25 March 2008

SetOwnership function

Sets the ownership of the calling reference to the specified base NPC or Faction.

Syntax:

referenced-item.SetOwnership Owner

Syntax Detail:

Owner - Specify either an Owner NPC or an Owner FactionID.

  • For NPC, use a base NPC, not an NPC reference.
  • For FactionID, specify a Faction name
  • If no Owner is specified, the reference will be set to player ownership

Examples:

SetOwnership BladesFaction
RewardSwordRef.SetOwnership

See also

Interior cells (as a reference on Cell Ownership).