Jump to content


Photo

Custom Ability


  • Please log in to reply
3 replies to this topic

#1 Vallen

Vallen
  • Members
  • 10 posts

Posted 27 June 2011 - 02:17 PM

hello everybody,

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 :sad:


well guys, i count on you :good:

#2 TroDuS

TroDuS

    Modding Legend

  • Members
  • 443 posts
  • Location:Rivendell
  •  ambitious Modder (:

Posted 30 June 2011 - 08:42 AM

Why did u change the ENUM of the Specialpower?
" Enum = SPECIAL_DOMINATE_ENEMY" <--- the actual one of Saruman's Dominate Spell

and there's this behavior in the "object.ini" (the general ini for every object-file)

InheritableModule
Behavior = TemporarilyDefectUpdate ModuleTag_TemporarilyDefectUpdate
;***************************** IMPORTANT ***********************************************
;***************************** IMPORTANT ***********************************************
;***************************** IMPORTANT ***********************************************
;***************************** IMPORTANT ***********************************************
DefectDuration = 30000 ; VERY VERY IMPORTANT, YOU MUST Make sure that DefectDuration
; is LESS than the ReloadTime of the special power(s)
; that trigger defection. Or all maner of grief will happen
; with defected units. So any special powers (currently only
; SpecialAbilityDominateEnemy in specialpower.ini) that
; trigger TemporarilyDefectUpdate will need to MAKE SURE
; that thier ReloadTimes are greater than DefectDuration
;***************************** IMPORTANT ***********************************************
;***************************** IMPORTANT ***********************************************
;***************************** IMPORTANT ***********************************************
;***************************** IMPORTANT ***********************************************

End
End


I'd doubt that this specialpower works with Structures. :/

#3 Vallen

Vallen
  • Members
  • 10 posts

Posted 30 June 2011 - 05:21 PM

Thanks for reply.

I modified the targets to structures, to me it would be enough but it did not work = \ ...

This ability was used based corrode Allegiance (Wormtongue) Enum SPECIAL_AT_VISIBLE_OBJECT

I think a change in one of these skills can work but do not know exactly how to do: Untamed Allegiance, Convert Enemies, corrode Allegiance



anyway, thanks again for your reply
if you have any idea will be very helpful

#4 Vallen

Vallen
  • Members
  • 10 posts

Posted 08 July 2011 - 03:32 AM

I'm still trying to work but this ability has been hard = \

there are days I am focusing my attention on this post
please if anyone knows anything ... I'll be looking

I am so anxious that do not log out of the forum xD

thx for replys




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users