EffectDeaf()

Returns a new effect object.

effect EffectDeaf();

Description

Create a Deaf effect.

Deafness causes a 20% spell failure chance for spells with Speaking components (V), and (although NwN doesn't do this) stop them from hearing what is said around them.

Deafness will not stack, and only 20% spell failure will apply - of course, this is obviously the case, you cannot be made more deaf!

The target this effect is applied to must be a creature for it to work. This effect cannot be applied instantly, only temporarily or permanently.



Remarks

Deafness is specifically for the effects above, no sounds are not heard by the PC (which would be cool if they were not heard!). The PC can also still hear things spoken normally by PC's around them. Obviously, it is a game, and taking away that functionality for one effect would never be a good idea.

Effect functions are Constructors, which are special methods that help construct effect "objects". You can declare and link effects, and apply them using an ApplyEffectToObject() Command. Once applied, each effect can be got seperately via. looping valid effects on the target (GetFirst/NextEffect()). See the Effect Tutorial for more details.


Version

1.62

Example

// Sample code for applying deafness to a target

void main()
{
    // This is the Object to apply the effect to.
    object oTarget = OBJECT_SELF;

    // Create the effect to apply
    effect eDeaf = EffectDeaf();

    // Create the visual portion of the effect. This is instantly
    // applied and not persistant with wether or not we have the
    // above effect.
    effect eVis = EffectVisualEffect(VFX_IMP_BLIND_DEAF_M);

    // Apply the visual effect to the target
    ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
    // Apply the effect to the object   
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDeaf, oTarget);
}

See Also

categories: Effects Functions


 author: Michael Nork, editor: Jasperre, additional contributor(s): Jasperre