Jump to content


Jasper11227

Member Since 14 Jul 2016
Offline Last Active Dec 10 2018 09:53 AM

Posts I've Made

In Topic: Horde of Legoli

22 November 2018 - 06:51 PM

Oww, I hadn't seen that tutorial. I'll take a look :D 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 :D thnx again!


In Topic: Horde of Legoli

21 November 2018 - 10:55 PM

I hadn't, but I have now. No luck, I am afraid  :whatoa: adding those changes results in the horde still walking up to the target and not firing (after knife fighter is over). So, it seems the horde weapon is not switched back to a missile one with these changes. My original code does switch back the horde weapon I think (since the horde doesnt walk up to a target after knife fighter), but the unit weapon is maybe not switched back (since the horde is not actually firing)? Can you think of an existing unit with a similar sort of ability?


In Topic: Horde of Legoli

21 November 2018 - 12:20 PM

Yeah, I left the legolas object as it was. I use the secondary slot for knife fighter and the quinary slot for hawkstrike. Aha, thats why you talked about the quinary weapon :D. The secondary unit weapon is this the standard LegolasSword weapon. If I understand it correctly, this weapon should be triggered by (this code is present in the horde code as well as the unit code)

	Behavior = WeaponModeSpecialPowerUpdate ModuleTag_KnifeFighterPowerUpdate
		SpecialPowerTemplate		= SpecialAbilityKnifeFighter
		Duration				= 20000 ;;,;; 30000
		AttributeModifier			= LegolasKnifeFighterBonus
		LockWeaponSlot			= SECONDARY
		StartsPaused			= Yes
		InitiateSound           = LegolasKnifeModeMS ;,; Added in v5.1
	End

I mean, the problem is not that knife fighter is not triggered, but that the primary weapon doesnt work anymore afterwards :D


In Topic: Horde of Legoli

19 November 2018 - 09:25 PM

Thanks for your response! :D Sadly it doesn't work :( If I add the code you suggest, after knife fighter the horde walks up to the target and still doesn't attack. I also tried

Weapon  = QUINARY MirkwoodArcherMissileHordeRangefinder

but that seemed to have no effect whatsoever.