I would like to make an ability that when used to convert the structures of the enemy ... something like Cah Converter enemy or corrode Allegiance
I did something like this:
Specialpower.ini
;------------------------------------------------------------------------------
SpecialPower SpecialAbilityConquest
Enum = SPECIAL_AT_VISIBLE_OBJECT
ObjectFilter = NONE +STRUCTURE
;***************************** IMPORTANT ***********************************************
ReloadTime = 180000 ; This value MUST be greater than the DefectDuration in the Behavior
; TemporarilyDefectUpdate ModuleTag_TemporarilyDefectUpdate section
; of the object.ini file. See the comments in that section!
;***************************** IMPORTANT ***********************************************
RadiusCursorRadius = 60.0
PreventActivationConditions = HIDDEN
;InitiateSound = WormtongueVoiceCorrodeAllegiance ;this plays too late, not when cast
End
CommandButton.ini
CommandButton Command_Conquest
Command = SPECIAL_POWER
SpecialPower = SpecialAbilityConquest
Options = NEED_TARGET_ENEMY_OBJECT NEED_TARGET_NEUTRAL_OBJECT
TextLabel = CONTROLBAR:CorrodeAllegiance
DescriptLabel = CONTROLBAR:ToolTipCorrodeAllegiance
ButtonImage = HSWormtongueCorrodeAllegiance
RadiusCursorType = EvilAbilityObj
InvalidCursorName = GenericInvalid
ButtonBorderType = ACTION
InPalantir = Yes
End
Hero.ini
;;; DOMINATE SPECIAL POWER ;;;
Behavior = SpecialPowerModule ModuleTag_DominateEnemySpecialPowerModule
SpecialPowerTemplate = SpecialAbilityConquest
StartsPaused = Yes
UpdateModuleStartsAttack = Yes
;InitiateSound = WormtongueVoiceCorrodeAllegiance ;this doesn't work
End
Behavior = DominateEnemySpecialPower ModuleTag_DominateEnemySpecialPower
SpecialPowerTemplate = SpecialAbilityConquest
UnpackingVariation = 1
StartAbilityRange = 200.0
AttributeModifierAffects = ANY +STRUCTURE
DominateRadius = 60
DominatedFX = FX_WormtongueCorrodeAllegiance
TriggerFX = FX_SarumanDominateTrigger
UnpackTime = 2000
PreparationTime = 1
FreezeAfterTriggerDuration = 2500
End
The ability works, However when you click on a structure nothing happens
well guys, i count on you