Jump to content


Photo

How to use powers only near concrete object?

mod

  • Please log in to reply
3 replies to this topic

#1 Slava Shadrinov

Slava Shadrinov
  • Members
  • 178 posts
  • Projects:The Word Of Tolkien Mod

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
End
  Behavior = SpecialPowerModule ModuleTag_LurtzCarnageStarter ; SpecialAbility is a SpecialPower, SpecialPower is anyting special
SpecialPowerTemplate    = SpecialAbilityLurtzCarnage
StartsPaused = Yes
AttributeModifier = LurtzCarnage
AttributeModifierAffectsSelf = Yes
End
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
End
 
RequiredConditions = WEAPON_TOGGLE i think may be this can help)
 
CommandButton Command_SpecialAbilityGlorfindelWindRider
Command = SPECIAL_POWER
SpecialPower = SpecialAbilityGlorfindelWindRider
Options = MOUNTED_ONLY
TextLabel = CONTROLBAR:GlorfindelWindRider
DescriptLabel = CONTROLBAR:ToolTipGlorfindelWindRider
ButtonImage = HSGlorfindelWindRider
ButtonBorderType = ACTION
InPalantir = Yes
AutoAbility = Yes
UnitSpecificSound = GlorfindelWindRiderMS
End
 
Options = MOUNTED_ONLY 

 



#2 NDC

NDC
  • Members
  • 245 posts
  • Location:Misty Albion

Posted 20 September 2017 - 07:23 PM

I'd suggest you to check this one out:
https://www.the3rdag...tem-139?addview

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.

#3 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 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
  • 178 posts
  • Projects:The Word Of Tolkien Mod

Posted 03 October 2017 - 05:37 PM

Thank you guys! im try)


Edited by Slava Shadrinov, 23 January 2019 - 06:53 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users