Jump to content


How to use powers only near concrete object?


  • Please log in to reply
3 replies to this topic

#1 Slava Shadrinov

Slava Shadrinov
  • Members
  • 121 posts

Posted 06 September 2017 - 10:40 PM

Hi all.


I want to use powers like Aragorn blademaster, athelas, and other powers without select a target.
How to use them only near other hero or building?


May be possible to get upgrade near building and when hero leave from this building this upgrade is removing)


i found codes:

;;; LURTZ CARNAGE (aka rampage) ;;;-----------------------------------------------------------------------------
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_LurtzCarnage
SpecialPowerTemplate = SpecialAbilityLurtzCarnage
TriggeredBy = Upgrade_LurtzCarnage
  Behavior = SpecialPowerModule ModuleTag_LurtzCarnageStarter ; SpecialAbility is a SpecialPower, SpecialPower is anyting special
SpecialPowerTemplate    = SpecialAbilityLurtzCarnage
StartsPaused = Yes
AttributeModifier = LurtzCarnage
AttributeModifierAffectsSelf = Yes
Behavior = HeroModeSpecialAbilityUpdate ModuleTag_CarnageUpdate ; So the difference in SpecialAbility is that it takes timing from this Update, instead of simply firing.
SpecialPowerTemplate    = SpecialAbilityLurtzCarnage
HeroEffectDuration = 20000 ; RotWK originally 30000
UnpackTime              = 1 ; how long the weaponset is active
RequiredConditions = WEAPON_TOGGLE
RequiredConditions = WEAPON_TOGGLE i think may be this can help)
CommandButton Command_SpecialAbilityGlorfindelWindRider
SpecialPower = SpecialAbilityGlorfindelWindRider
TextLabel = CONTROLBAR:GlorfindelWindRider
DescriptLabel = CONTROLBAR:ToolTipGlorfindelWindRider
ButtonImage = HSGlorfindelWindRider
ButtonBorderType = ACTION
InPalantir = Yes
AutoAbility = Yes
UnitSpecificSound = GlorfindelWindRiderMS


#2 NDC

  • Members
  • 191 posts
  • Location:Misty Albion

Posted 20 September 2017 - 07:23 PM

I'd suggest you to check this one out:

One part of the tutorial deals with making Eowyn invisible when surrounded by either Rohan peasants or horsemen - that sounds about like an instance of what you're after.



    El Shaddai

  • Members
  • 1,448 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 03 October 2017 - 06:10 AM

You are on the right track

First add an Attribute giving power to the building

check the men  statue for codes

it adds an attribute to the unit in the AFFECTS : NONE +UnitNamehere ALLIES

The Attribute then gives an Upgrade 

This upgrade triggers a special power button once it is given on your unit

See treebeard coding for this


Now the tricky part

The upgrade must now trigger an upgrade to remove itself


Try the men trebuchet codes

These codes remove an upgrade with a delay after it gets an upgrade

If you do it right and test alot ,you should have the unit ready for the new upgrade


Now the upgrade should trigger a power on the unit of choice ,

If you want it to trigger on an enemy unit , this can also be done


The only limiter is the power cooldown time , as once the unit stands by the building , the unit power should only activate if it is in a ready state

#4 Slava Shadrinov

Slava Shadrinov
  • Members
  • 121 posts

Posted 03 October 2017 - 05:37 PM

Thank you guys? im try)

Also tagged with one or more of these keywords: mod

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users