GetEffectInteger(effect, int)

From NWN Lexicon
Revision as of 16:09, 13 March 2021 by Jasperre (talk | contribs) (Created page with "{{DISPLAYTITLE:GetEffectInteger(effect, int)}}__NOTOC__ Retrieves an integer parameter of an effect. <nwscript> void GetEffectInteger( effect eEFfect, int nIndex ); </...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Retrieves an integer parameter of an effect.

void GetEffectInteger(
    effect eEFfect,
    int nIndex
);

Parameters

eEffect
The effect to check a parameter of
nIndex
The index of the parameter. Valid values 0 through 7.


Description

Get the integer parameter of eEffect at nIndex.

nIndex bounds: 0 >= nIndex < 8.

Returns: the value or 0 on error/when not set.

Remarks

This digs into an effect to get some values that are currently set on it. For instance EffectDamageResistance you can figure out what damage is being resisted, by what amount and if there is a limit. These numbers can dynamically change during runtime (such as damage resistance running out).

The experimentation of this function has been documented on the lexicon; you can find GetEffectInteger information on the.


Version

This function was added in 1.83.8193.21 of NWN:EE.


Known Bugs

The index is between 0 and 7 but EffectDamage uses parameters up to 15. However you can't get this effect after application, so you should know what parameters you're adding to it.


Example

NWScript here

See Also

functions:
constants:

Various constants, see Effect Constructors.