RemoveNthEffect

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Removes the effect-entry at the specified index from the effect list of the specified ingestible/object effect/actor effect.

Syntax

[help]
(effectCount:int) RemoveNthEffect effectForm:ref index:int

Example

RemoveNthEffect EnchClothingDuster 0
RemoveNthEffect RadAway 2 

Notes

  • If the effect-entry was successfully removed, the function will return the new effect-count, and -1 otherwise.
  • If the effect-entry was successfully removed, indices of remaining entries in the list are shifted accordingly. To avoid potential mistakes when removing multiple effects, it's advised to remove them starting from the largest index.
  • You can not remove an effect-entry if the effect list only has one effect. The function will return -1.

See Also