EffectAbilityDecrease(int, int)
Creates an ability decreasing effect on specified ability score.
effect EffectAbilityDecrease( int nAbility, int nModifyBy );
Parameters
nAbility
nModifyBy
This is the amount by which to decrement the ability score.
Description
Removes specified amount nModifyBy from nAbility score on an object. nModifyBy must be a positive number less than 10; if a negative number is passed, nothing occurs.
Version
1.28
Example
// This is the Object to apply the effect to. object oTarget = OBJECT_SELF; // Create the effect to apply effect eDrain = EffectAbilityDecrease(ABILITY_STRENGTH, 1); //Create the visual portion of the effect effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE); //Apply the effect to the object ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDrain, oTarget); //Apply the visual effect to the target ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
See Also
functions: | ApplyEffectToObject | EffectAbilityIncrease | EffectAttackDecrease | EffectAttackIncrease |
categories: | Effects Functions |
constants: | ABILITY_* Constants |
author: Jody Fletcher, editor: Charles Feduke, additional contributor(s): Matthew Miller, Jeremy Hinkle, LeegleechN
Send comments on this topic.