Difference between revisions of "EffectConcealment"

From NWN Lexicon
Jump to: navigation, search
m (Spelling fix(es))
m (Remarks: grammar fix)
Line 29: Line 29:
 
It is reported in the combat information as "Target Concealed: Miss".
 
It is reported in the combat information as "Target Concealed: Miss".
 
[[
 
[[
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 separately via. looping valid effects on the target (GetFirst/NextEffect()). See the [[Effect tutorial]] for more details.
+
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 separately via looping valid effects on the target (GetFirst/NextEffect()). See the [[Effect tutorial]] for more details.
  
 
====Version====
 
====Version====

Revision as of 07:10, 25 June 2019

EffectConcealment(int)

Returns a new effect object.

effect EffectConcealment(
    int nPercentage
);

Parameters

nPercentage

1-100 inclusive

Description

This function returns a new concealment effect. The nPercentage:int is simply the chance of discovery so a 0 concealment would be Shamu hiding in your tub and a 100 concealment would be a brine shrimp hiding in Shamu's tub.

Concealment doesn't stack, only the highest applies, therefore Ghostly Visage doesn't stack with a monk's Perfect Body.

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

Remarks

Concealment should NOT be confused with EffectMissChance - this HELPS the creature targeted, and all attacks (physical ones, ranged or melee) which are targeted that the creature may miss if this is in effect.

It is reported in the combat information as "Target Concealed: Miss". [[ 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 separately via looping valid effects on the target (GetFirst/NextEffect()). See the Effect tutorial for more details.

Version

1.62

Example

// We apply a 30% concealment to those who step into the trigger
// as the trigger is behind some cover or something...
 
void main()
{
    // Declare object and effect
    object oEnterer = GetEnteringObject();
    effect eConceal = EffectConcealment(30);
 
    // Apply the effect
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, eConceal, oEnterer);
}

See Also


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