Difference between revisions of "CloneForm"

6 bytes added ,  18:30, 14 September 2007
no edit summary
imported>WereWolf
imported>WereWolf
Line 4: Line 4:
  [nuObjectID] CloneForm [objectID]
  [nuObjectID] CloneForm [objectID]


This function creates an exact duplicate of the referenced base object supplied in objectID and returns the new objectID. Cloned forms are saved in the save game. Cloning an object allows you to then make changes to the clone without affecting the original object.  
This function creates an exact duplicate of the referenced base object supplied in objectID and returns the new objectID.


<pre>
<pre>
Line 15: Line 15:
</pre>
</pre>


This function works for any game type (objects, spells, enchantments, NPCs). If called on an Inventory Object (weapon, armor, light, potion, book, ingredient etc.) you may pass the CS EditorID directly into the function. For any other type you must first set a ref variable to the appropriate objectID before calling CloneForm.
==Notes==
 
*Cloned forms are saved in the save game.
Notes:
*Cloning an object allows you to then make changes to the clone without affecting the original object.
*This function works for any game type (objects, spells, enchantments, NPCs).
*If called on an Inventory Object (weapon, armor, light, potion, book, ingredient etc.) you may pass the CS EditorID directly into the function.  
*For any other type you must first set a ref variable to the appropriate objectID before calling CloneForm.
* Cloned NPCs have no items in their inventories.
* Cloned NPCs have no items in their inventories.


Anonymous user