Abilities requiring nearby Parton

Xain

New Member
Reaction score
2
Im working on a RPG, and need help. I have NPCs that are of another team (allies) that have Select Hero and abilities. When I walk away the Select Hero button becomes disabled, but the abilities the NPC has are still useable, which I do not want sense they are abilites such as Speak with and what not.

Any ideas?
 

Dregonx

TH.net Regular
Reaction score
21
You're basically saying that your NPCs don't disable the abilities when you walk away from them. From what I understand at least.

As far as fixing it, well make a condition to where the person using the abilities must be within X range.

That's all I can think of really. Hope that helps. :thup:
 

Xain

New Member
Reaction score
2
I would do that but Ive seen other maps that require you to be near the unit for the ability to actually be activated, is it a certain ability that has this?
 

Naga'sShadow

Ultra Cool Member
Reaction score
49
Likely they aren't abilities but units or items. What happens is triggered after you purchase the unit/item from the NPC. Could possibly trainable units as well but that would show the construction time.
 

Xain

New Member
Reaction score
2
could you make a unit isntantly constructable. so thus no construction time would show and thus, you would instantly do the ability.
 

HellCraft

Member
Reaction score
19
just use an item with zero gold and lumber cost. trigger it that when a hero buys tht item a dummy unit will be created and will cast the ability, simple.
 

Xain

New Member
Reaction score
2
Wouldn't that place a number in the units (ability in my case) button? or just make the unit only be in stock for 1 or 0?
 

lindenkron

You can change this now in User CP
Reaction score
102
Let me get this right...

You want a NPC building / structure (Which is not your own building) to have some abilities, so you can walk up to the building, and use that buildings abilities? Otherwise I understanding nothing from these explanations :rolleyes:

-Lindenkron
 

lindenkron

You can change this now in User CP
Reaction score
102
Okay, the closes to a solution I can find there is doing this:

  1. Create the neutral shop, with Items inside, looking like abilities.
  2. Make the items free and have the cooldown (stock delay) you want them to have.
  3. Make a trigger like this A1 (Look further down).
  4. Make a trigger like this A2 (Look further down).
  5. You'll have to make a trigger for EACH of the abilities that looks like A3.
  6. Example for hex: Make a trigger that looks like A3 (Look further down).

A1
Trigger:
  • Add
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
    • Conditions
      • ((Owner of (Triggering unit)) is an enemy of (Triggering player)) Equal to True
    • Actions
      • Unit Group - Add (Triggering unit) to SelectedGroup


A2
Trigger:
  • Remove
    • Events
      • Player - Player 1 (Red) Deselects a unit
      • Player - Player 2 (Blue) Deselects a unit
      • Player - Player 3 (Teal) Deselects a unit
      • Player - Player 4 (Purple) Deselects a unit
    • Conditions
      • ((Owner of (Triggering unit)) is an enemy of (Triggering player)) Equal to True
    • Actions
      • Unit Group - Remove (Triggering unit) from SelectedGroup


A3
Trigger:
  • Hex
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to HexItem
    • Actions
      • Item - Remove (Item being manipulated)
      • Set TempLocation = (Position of (Triggering unit))
      • Unit - Create 1 DummyUnit for (Owner of (Triggering unit)) at TempLocation facing Default building facing degrees
      • Unit - Add Hex to (Last created unit)
      • Unit - Order (Last created unit) to Orc Shadow Hunter - Hex (Random unit from SelectedGroup)
      • Custom script: call RemoveLocation (udg_TempLocation)


Hope this works for you :)
Please rep if I helped you!
-Lindenkron :thup:
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top