GetEffectFloat(effect, int)

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

Retrieves an float 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 3.


Description

Get the float parameter of eEffect at nIndex.

nIndex bounds: 0 >= nIndex < 4.

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


Remarks

This digs into an effect to get some values that are currently set on it. For instance OnApplyHitPointChangeWhenDying you can figure out what timing is being used between applications. These numbers may dynamically change during runtime.

The experimentation of this function has been documented on the lexicon; you can find GetEffectFloat information on the Effect Constructor Functions.


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:

Effect Constructor Fucntions

constants:

Various constants, see Effect Constructors.