Talk:GetScriptActiveEffectIndex

From the Oblivion ConstructionSet Wiki
Revision as of 21:55, 3 July 2008 by imported>JRoush (New page: ''While counted separately, if there are multiple scripted effects with the same script generally only the first one's data (i.e., Magic Item Index, Caster) will be returned (i.e., GetNthA...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

While counted separately, if there are multiple scripted effects with the same script generally only the first one's data (i.e., Magic Item Index, Caster) will be returned (i.e., GetNthActiveEffectMagicItemIndex, GetNthActiveEffectCaster).

This isn't precisely true. If more than one Active SEFF has the same script, GetScriptActiveEffectIndex will only return the index of the first. However, the functions mentioned in this note (that is, all of the "GetNthActiveEffect..." functions) work just fine if they are given the correct index. Thus, by manually incrementing the index returned by GetScriptActiveEffectIndex it is possible to access the attributes of all Active SEFFs with the same script, and with a little creative comparison it is often possible to differentiate between them. GetNthActiveEffectTimeElapsed is particularly useful for this.