Retrieves an object parameter of an effect.
- The effect to check a parameter of
- The index of the parameter. Valid values 0 through 3.
Get the float parameter of eEffect at nIndex.
nIndex bounds: 0 >= nIndex < 4.
Returns: the value or OBJECT_INVALID on error/when not set.
This digs into an effect to get some values that are currently set on it. For instance EffectSwarm you can figure out what the current summoned creature tied to the effect is. These objects may dynamically change during runtime.
The experimentation of this function has been documented on the lexicon; you can find GetEffectObject information on the Effect Constructor Functions.
The functions this applies to are:
- EffectAreaOfEffect (when applied to a creature)
This function was added in 1.83.8193.21 of NWN:EE.
object oUser = GetLastUsedBy();
effect eEffect = GetFirstEffect(oUser);
if(GetEffectType(eEffect) == EFFECT_TYPE_SWARM)
object oSummon = GetEffectObject(eEffect, 0);
SendMessageToPC(oUser, "Swarm effect found. Current summoned creature is called: [" + GetName(oSummon) + "]");
eEffect = GetNextEffect(oUser);
Various constants, see Effect Constructors.