Difference between revisions of "SetEnchantment"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Lanceor
imported>Lanceor
(Updates based on new findings - see Talk Page.)
Line 7: Line 7:
   
   
==Notes==
==Notes==
*If an item is already equipped when its enchantment is changed, the new enchantment will only affect the actor after the item is unequipped and then re-equipped.
*For equipped armor and clothing, the new enchantment will only take affect after the actor unequips and re-equips the item.
*Changes to weapon enchantments occur immediately. If the change occurs while the weapon is equipped however, the enchantment shader (e.g. the orange edge glow for fire damage) will not update until the actor unequips and re-equips the weapon.
*Changes to enchantments are not saved. Any items modified with this function will revert to their default enchantment on loading a saved game.
*Changes to enchantments are not saved. Any items modified with this function will revert to their default enchantment on loading a saved game.
*Doesn't work on arrows.
*Doesn't work on arrows.

Revision as of 03:10, 30 September 2011

A command for Oblivion Script Extender

Syntax:

(oldEnchantment:ref) reference.SetEnchantment nuEnchantment:ref objectID:ref

Sets the specific enchantment on the object and returns any previous enchantment.

Notes

  • For equipped armor and clothing, the new enchantment will only take affect after the actor unequips and re-equips the item.
  • Changes to weapon enchantments occur immediately. If the change occurs while the weapon is equipped however, the enchantment shader (e.g. the orange edge glow for fire damage) will not update until the actor unequips and re-equips the weapon.
  • Changes to enchantments are not saved. Any items modified with this function will revert to their default enchantment on loading a saved game.
  • Doesn't work on arrows.

See Also