Making a Tower Automatically Use a Skill

Zaraf

New Member
Reaction score
22
How can you make a tower automatically use a skill given to it when enemies are within a certain range? I have a skill given to a tower that works, but right now I have to manually activate the skill on the tower. I'd like it to work automatically.

Thanks for any help!
 

X-maul

AKA: Demtrod
Reaction score
201
create a trigger that will trigger when a unit get attacked and then order attacking unit to use your skill, if the attacking unit is your tower...
 

Mittsies

New Member
Reaction score
24
Say you have Shockwave base-ability? (meaning that regardless of what your ability does, its casted by using Shockwave)

EVENT:
Generic unit event - when unit attacks
CONDITION:
Attacking unit type is equal to "Shockwave Tower"
ACTIONS:
Set TemporaryPoint = Position of <attacked unit>
Order <attacking unit> to "Orc Tauren Chieftain - Shockwave" "TemporaryPoint"
Custom Script: "RemoveLocation (udg_TemporaryPoint)"

this will basically shockwave the position of the unit your tower is attacking.

EDIT: Here's another example of this trigger, but instead of a point, it targets the unit itself. This will work with any spells like Stormbolt, Chain Lightning, etc.
Code:
Earth Manipulator Cast
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Attacking unit)) Equal to Impale Tower
    Actions
        Unit - Order (Attacking unit) to Undead Crypt Lord - Impale (Attacked unit)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top