You'll need to add to the object's code something like this:
Behavior = AISpecialPowerUpdate <A fitting name>
CommandButtonName = <The Ability Command Button's name>
SpecialPowerAIType = <An ENum, , look at similar powers for reference.>
SpecialPowerRadius = <a number, look at similar powers for reference.>
End
For example, for Aragorn's Athelas power:
Behavior = AISpecialPowerUpdate AragornElendilAI
CommandButtonName = Command_SpecialAbilityElendil
SpecialPowerAIType = AI_SPECIAL_POWER_BASIC_SELF_BUFF
SpecialPowerRadius = 200;
End
Hope I helped you.
The file you need to edit for CaHs is CreateAHeroAISpecialPower.inc which can be found in the data/ini/object/creatahero folder
I am sorry for disturbing you. I have one more question. Normal heroes (in AI) use special abilities.However, they don't use some abilities.
For example:
1- Dain doesn't use the ''Mighty Rage'' ability.
I want Dain to heal both his own health and the health of other heroes. But it doesn't do that.
2- Elrond doesn't use the ''Restoration'' ability.
I want Elrond to heal both his own health and that of other heroes. But it doesn't do that.
The codes are below. Dain's Mighty Rage ability was not available in AISpecialPowers in Dain.ini.
I added the skill's codes there for the AI to use it.
But both Dain and Elrond don't heal themselves and the heroes around them.
Dain.ini