EffectSkillDecrease(int, int)

Returns an effect to decrease a skill.

effect EffectSkillDecrease(
    int nSkill,
    int nValue
);

Parameters

nSkill

SKILL_*

nValue

The number of points to decrease nSkill by.


Description

Returns an affect to decrease nSkill nValue points.
Returns an effect of type EFFECT_TYPE_INVALIDEFFECT if nSkill is invalid.



Remarks

This does not decrease a skill automatically; it only creates an effect that when applied will decrease the specified skill.


Version

1.22

Example

// Example 1 - Apply an effect to oTarget which will reduce
// the hiding skill level by 2 for 60 seconds.

void main()
{
  effect eSkillDec;
  object oTarget = GetLastUsedBy();
  eSkillDec = EffectSkillDecrease(SKILL_HIDE, 2);
  ApplyEffectToObject(DURATION_TYPE_INSTANT,eSkillDec,oTarget,60.0f);
}

See Also

functions: ApplyEffectToObject | EffectSkillIncrease
categories: Effects Functions
constants: EFFECT_TYPE_* Constants | SKILL_* Constants


 author: Charles Feduke, editor: Brett Lathrope
 Send comments on this topic.