Talk:GetScriptActiveEffectIndex

From the Oblivion ConstructionSet Wiki
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.

Popping in for a bit to confirm, at least for v15 (can't find my test file for v13). The wording is a bit weird, but remember that the function's use was to go from the scripted effects' script to the information, not from a central script. For that, I would suggest grabbing the magic item reference and looking at it, rather than trying to figure out where the other scripted effect might be in the active effects (in case it had a different duration). Will fix the terminology a bit later as it requires making a template and using the template for the other active effect pages (or, feel free to).--Haama 04:05, 5 July 2008 (EDT)