EffectImmunity(int)

Create an Immunity effect.

effect EffectImmunity(
    int nImmunityType
);

Parameters

nImmunityType

One of the IMMUNITY_TYPE_* constants.


Description

Returns a new effect object that when applied to a target will cause them to be Immune to one of the 33 possible types of Hostile actions found in the IMMUNITY_TYPE_* constants group.

Immunities don't stack, they are never total damage immunities, but rather immunities that stop most EffectXXX constructors! Some, such as IMMUNITY_TYPE_MIND_SPELLS will actually stop many effects (in this case, Domination, Stun, Confusion etc.).



Remarks

You can only define one Immunity per effect but by using EffectLinkEffects(effect1,effect2) you can continuously add them together into one giant effect.

Constructors are special methods that return a new instance of an object. In NWN Script each effect that you can place on an object has it’s own constructor that creates a new instance of the specified effect. This effect object can then be used in an ApplyEffectToObject() Command. See Effect Constructor for more details.


Version

1.22

See Also

categories: Effects Functions
constants: IMMUNITY_TYPE_* Constants


 author: John Shuell, editor: Jasperre
 Send comments on this topic.