GetNthEffectMagicEffect - Enchantment

From Creation Kit
Jump to: navigation, search

SKSE Member of: Enchantment Script, Ingredient Script, Potion Script, Scroll Script, and Spell Script

Returns the Nth MagicEffect attached to this enchantment, ingredient, potion, or spell. (This function requires SKSE)

Syntax

MagicEffect Function GetNthEffectMagicEffect(int n) native

Parameters

  • n: The index of which effect is to be returned.

Return Value

Returns the Nth MagicEffect attached to this enchantment, ingredient, potion, or spell.

Examples

int numEffects = enchantment.GetNumEffects()
int index = 0
While index < numEffects
	MagicEffect effect = enchantment.GetNthEffectMagicEffect(index)
	Debug.Trace("Index: " + index + " Effect: " + effect)
	index += 1
EndWhile

See Also