Osiris/API/CharacterUseSkill

From Divinity Engine Wiki
Jump to: navigation, search
Full Definition(s)
  • (Shared mod) call CharacterUseSkill((CHARACTERGUID)_Character, (STRING)_SkillID, (GUIDSTRING)_Target)
  • (Shared mod) call CharacterUseSkill((CHARACTERGUID)_Character, (STRING)_SkillID, (GUIDSTRING)_Target, (INTEGER)_ForceResetCooldown)
  • (Shared mod) call CharacterUseSkill((CHARACTERGUID)_Character, (STRING)_SkillID, (GUIDSTRING)_Target, (INTEGER)_ForceResetCooldown, (INTEGER)_IgnoreHasSkill)
  • call CharacterUseSkill((CHARACTERGUID)_Character, (STRING)_SkillID, (GUIDSTRING)_Target, (INTEGER)_ForceResetCooldown, (INTEGER)_IgnoreHasSkill, (INTEGER)_IgnoreChecks)
Description

Makes _Character cast/use the skill with stats ID _SkillID on _Target. The skill ID consists of the columns "SkillType" and "Name" one may find in the stats editor separated by an underscore (e.g. the skill ID of the skill "IceSkin" with the type "Shout" would be "Shout_IceSkin").

If _ForceResetCooldown is 1, the skill will be cast regardless of whether the skill is still in cool-down from a previous use by the same character. If it is 0, the skill will not be cast if it is still in cool-down mode.

If _IgnoreHasSkill is 0, this skill must have been assigned to _Character either via the sidebar in the editor or using CharacterAddSkill, or this call will not do anything. If it is 1, the skill will be cast regardless of whether _Character currently knows the skill.

(New parameter in DOS2 Patch 5) If IgnoreChecks is 1, the skill will be cast even if _Character does not fullfil the skill requirements (e.g., you can use weapon-specific skills while having no weapon equipped). If IgnoreChecks is 0, nothing will happen if _Character does not fulfil the skill requirements.

Notes
  • The Shared mod overloads pass 0 as the unspecified parameters.
See Also