• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Make all units of type target point when ability is cast

Status
Not open for further replies.
Level 5
Joined
Jul 10, 2009
Messages
89
I want to create a trigger such that when the player targets a point with an ability, all specified types of units will "attack move" that point.

Basically, I'm trying to make it easier to control large armies. I want to give hero units this "command" ability, so that when it is cast, all units of a certain type, say ranged units or ground units, will attack the point without the user having to locate and micromanage them.

thanks for any help.
 
Level 11
Joined
Jan 25, 2009
Messages
572
Here's the trigger:

  • Move Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to 'Your spell'
    • Actions
      • Set GroundGroup = (Units owned by (Owner of (Triggering unit)) matching ((((Matching unit) is A ground unit) Equal to True) and (((Matching unit) is A Hero) Equal to False)))
      • Set Temp_Loc = (Target point of ability being cast)
      • Unit Group - Pick every unit in GroundGroup and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To Temp_Loc
      • Custom script: call RemoveLocation (udg_Temp_Loc)
      • Custom script: call DestroyGroup (udg_GroundGroup)
 
Status
Not open for further replies.
Top