GetNthActiveEffectCode

From the Oblivion ConstructionSet Wiki
Revision as of 16:01, 25 November 2007 by imported>Haama (Created)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A command for Oblivion Script Extender

Syntax:

(effectCode:long) reference.GetNthActiveEffectCode whichEffect:long
(effectCode:long) reference.GetNthAECode whichEffect:long

Returns the effect of the Nth Active Effect on the reference.

Example

long EffectCode
set EffectCode to (player.GetNthActiveEffectCode 0)

If the player currently has the effects Shield, Restore Health, and Drain Health, in that order, this will return the code for Shield (code for Restore Health if whichEffect is 1, and code for Drain Health if whichEffect is 2).

See Also