EffectSkillDecrease(int, int)
Returns an effect to decrease a skill.
effect EffectSkillDecrease( int nSkill, int nValue );
Parameters
nSkill
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.
nSkill can be any skill, and nValue can seemingly be any positive integer (as values upto and over 20 are used in Bioware scripts).
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 - Apply an effect to oTarget which will reduce // the hiding skill level by 2 for 60 seconds. void main() { // Get who to affect object oTarget = GetLastUsedBy(); // Declare skill decrease effect eSkillDec = EffectSkillDecrease(SKILL_HIDE, 2); // Apply it for 60 seconds. ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSkillDec, oTarget, 60.0f); }
See Also
functions: | ApplyEffectToObject | EffectSkillIncrease |
categories: | Effects Functions |
constants: | EFFECT_TYPE_* Constants | SKILL_* Constants |
author: Charles Feduke, editor: Jasperre
Send comments on this topic.