Difference between revisions of "Osiris/API/CharacterAddSkill"
From Divinity Engine Wiki
m |
m |
||
Line 1: | Line 1: | ||
===== Full Definition(s) ===== | ===== Full Definition(s) ===== | ||
− | * | + | * (Shared Mod) call '''CharacterAddSkill'''(''(CHARACTERGUID)'''''_Character''', ''(STRING)'''''_Skill''') |
* call '''CharacterAddSkill'''(''(CHARACTERGUID)'''''_Character''', ''(STRING)'''''_Skill''', ''(INTEGER)'''''_ShowNotification''') | * call '''CharacterAddSkill'''(''(CHARACTERGUID)'''''_Character''', ''(STRING)'''''_Skill''', ''(INTEGER)'''''_ShowNotification''') | ||
===== Description ===== | ===== Description ===== | ||
− | Adds '''_Skill''' to '''_Character'''. If '''_ShowNotification''' is '''1''' and '''_Character''' did not yet know this skill (or only currently knew it because it was granted by e.g. an equipped item), then a notification will be shown that it has learned the skill. If '''_ShowNotification''' is '''0''', no notification will ever be shown. | + | Adds '''_Skill''' to '''_Character'''. |
+ | |||
+ | ''(New parameter in DOS2 Patch 6)'' If '''_ShowNotification''' is '''1''' and '''_Character''' did not yet know this skill (or only currently knew it because it was granted by e.g. an equipped item), then a notification will be shown that it has learned the skill. If '''_ShowNotification''' is '''0''', no notification will ever be shown. | ||
− | |||
===== Notes ===== | ===== Notes ===== | ||
− | + | * If the skill to be added or the character are not valid, nothing happens. | |
− | * If the | + | * If '''_ShowNotification''' is not specified, it will default to '''1'''. |
− | * | + | * The skill names are defined in the [[Skill_creation|stats]]. Do not forget add to the skill type prefix to the skill name, e.g. "Projectile_EnemyFireball" rather than just "EnemyFireball". |
===== See Also ===== | ===== See Also ===== | ||
* [[Osiris/API/CharacterHasSkill|CharacterHasSkill]] | * [[Osiris/API/CharacterHasSkill|CharacterHasSkill]] |
Latest revision as of 08:44, 23 February 2018
Full Definition(s)
- (Shared Mod) call CharacterAddSkill((CHARACTERGUID)_Character, (STRING)_Skill)
- call CharacterAddSkill((CHARACTERGUID)_Character, (STRING)_Skill, (INTEGER)_ShowNotification)
Description
Adds _Skill to _Character.
(New parameter in DOS2 Patch 6) If _ShowNotification is 1 and _Character did not yet know this skill (or only currently knew it because it was granted by e.g. an equipped item), then a notification will be shown that it has learned the skill. If _ShowNotification is 0, no notification will ever be shown.
Notes
- If the skill to be added or the character are not valid, nothing happens.
- If _ShowNotification is not specified, it will default to 1.
- The skill names are defined in the stats. Do not forget add to the skill type prefix to the skill name, e.g. "Projectile_EnemyFireball" rather than just "EnemyFireball".
See Also
- CharacterHasSkill
- CharacterAddTalent
- CharacterLearnedSkill
- CharacterUseSkill
- CharacterUseSkillAtPosition
- CharacterUsedSkill
- CharacterUsedSkillAtPosition
- CharacterUsedSkillOnTarget
- CharacterUsedSkillOnZoneWithTarget
- CharacterUsedSkillInTrigger
- IsSkillActive
- IsSourceSkill
- SkillActivated
- SkillAdded
- SkillCast
- SkillDeactivated