Difference between revisions of "CloneForm"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Scruggs
 
imported>Scruggs
Line 2: Line 2:


'''Syntax:'''
'''Syntax:'''
  [''Ref.'']CloneForm ''objectID''
  [''Ref.'']CloneForm ''[objectID]''


This function creates a new base object, identical to the base object supplied as the calling object or objectID. Cloned objects are saved in the savegame. Cloning an object allows you to then make changes to the clone without affecting the original object. Optional syntax returns the base object ID of the clone:
This function creates a new base object, identical to the base object supplied as the calling object or objectID. Cloned objects are saved in the savegame. Cloning an object allows you to then make changes to the clone without affecting the original object. Optional syntax returns the base object ID of the clone:

Revision as of 21:33, 4 December 2006

A command for Oblivion Script Extender

Syntax:

[Ref.]CloneForm [objectID]

This function creates a new base object, identical to the base object supplied as the calling object or objectID. Cloned objects are saved in the savegame. Cloning an object allows you to then make changes to the clone without affecting the original object. Optional syntax returns the base object ID of the clone:

ref clone
set clone to myReference.cloneForm ; clone the base object of myReference
player.placeAtMe clone 1 0 0 ; place a reference to the clone at the player's location

This function also works for non-game objects like spells and enchantments.

Notes:

  • Cloned NPCs have no items in their inventories.