ActionUseSkill(int, object, int, object)
Causes a creature to attempt to use a skill on another object.
void ActionUseSkill( int nSkill, object oTarget, int nSubSkill = 0, object oItemUsed = OBJECT_INVALID );
Parameters
nSkill
oTarget
nSubSkill
SUBSKILL_* (Default: 0)
oItemUsed
Item to use in conjunction with the skill (Default: OBJECT_INVALID)
Description
Adding this action to the queue of a creature will make it attempt to use the specified skill. It will have no effect on non-creature objects.
The nSubSkill parameter is used for recovering, disarming and flagging traps.
oItemUsed must be a valid item appropriate to the skill. For example, a Healing Kit can be used with SKILL_HEAL. The creature must possess the item.
Remarks
Use GetHasSkill to check whether a creature has the skill and is able to perform it.
Some skills can be hostile acts, and invite attacks of opportunity, e.g. SKILL_TAUNT.
Version
1.22
Example
// Attempt to heal a PC with a healing kit: ActionUseSkill(SKILL_HEAL, oPC, 0, oKit);
See Also
functions: | ActionUseFeat | GetHasSkill | GetSkillRank |
categories: | Action on Object Functions | Henchmen/Familiars/Summoned Functions | Talents/Skills/Feats Functions |
constants: | SKILL_* Constants | SUBSKILL_* Constants |
author: Iskander Merriman
Send comments on this topic.