Oww, I hadn't seen that tutorial. I'll take a look Yeah, Im sure they dont attack. The unit commandset is
CommandSet RohanLegolasCommandSet
1 = Command_ToggleStance
2 = Command_LegolasHawkStrike
3 = Command_SpecialAbilityTrainArchersLegolas ;;,;; Command_LegolasKnifeFightingMode
4 = Command_LegolasKnifeFightingMode ;;,;; Command_SpecialAbilityTrainArchersLegolas ;;,;; Command_SpecialAbilityTrainArchers
5 = Command_SpecialAbilityArrowStorm
7 = Command_LegolasHawkStrike_AI ;;,;; Sûlherokhh AI bugfix - prevents ability from being used when it shouldn't be
8 = Command_SpecialAbilityArrowStorm_AI ;;,;; Sûlherokhh AI bugfix - prevents ability from being used when it shouldn't be
12 = Command_CaptureBuilding
13 = Command_AttackMove
14 = Command_Stop
16 = Command_SetStanceBattle
17 = Command_SetStanceAggressive
18 = Command_SetStanceHoldGround
End
and the horde commandset is
CommandSet LegolasHordeCommandSet
1 = Command_ToggleStance
2 = Command_LegolasHawkStrike
3 = Command_LegolasKnifeFightingMode
4 = Command_SpecialAbilityTrainArchersLegolas
12 = Command_CaptureBuilding
13 = Command_AttackMove
14 = Command_Stop
16 = Command_SetStanceBattle
17 = Command_SetStanceAggressive
18 = Command_SetStanceHoldGround
End
Also, the relevant commandbuttons are
CommandButton Command_LegolasHawkStrike
Command = SPECIAL_POWER
SpecialPower = SpecialAbilityHawkStrike
Options = NEED_TARGET_ENEMY_OBJECT OK_FOR_MULTI_SELECT
TextLabel = CONTROLBAR:HawkStrike
ButtonImage = HSLegolasHawkStrike
CursorName = Bombard
InvalidCursorName = GenericInvalid
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:ToolTipHawkStrike
InPalantir = Yes
AutoAbility = Yes
; UnitSpecificSound = LegolasVoiceModeHawkStrike
DisableOnModelCondition = WEAPONLOCK_SECONDARY ; disable if currently using swords
End
and
CommandButton Command_LegolasKnifeFightingMode
Command = SPECIAL_POWER
SpecialPower = SpecialAbilityKnifeFighter
TextLabel = CONTROLBAR:KnifeFighter
ButtonImage = HSLegolasKnifeFighter
InvalidCursorName = GenericInvalid
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:ToolTipKnifeFighter
InPalantir = Yes
AutoAbility = Yes
PresetRange = 50.0
UnitSpecificSound = LegolasKnifeModeMS
End
Finally, the special powers are
SpecialPower SpecialAbilityHawkStrike
Enum = SPECIAL_AT_VISIBLE_OBJECT
ReloadTime = 10000 ;;,;; 30000
;InitiateSound = LegolasHawkStrikeArrowShoot ;this plays when he fires, not when he targets
End
and
SpecialPower SpecialAbilityKnifeFighter
Enum = SPECIAL_KNIFE_FIGHTER
ReloadTime = 90000 ;;,;; 60000
InitiateSound = LegolasKnifeModeMS ;,; LegolasKnifeFighter ;this didn't work
;InitiateAtLocationSound = LegolasKnifeFighter ;this didn't work either
End
Hawk strike and knife fighter indeed work fine (I did tweak some timing parameters to make sure the animation is in sync with the projectile being fired) and after knife fighter the horde walks to the enemy (and stops at a distance appropriate for a ranged attack) but doesnt fire. I did the test (i.e. I walked the horde into the enemy and tried to attack) but they still dont attack (sometimes one of the units start firing with its bow), so I guess I was wrong :( But I'll take a look at that tutorial and let you know whether it got me anywhere thnx again!
Edited by Jasper11227, 22 November 2018 - 06:53 PM.