• 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!

Giving Unique ID to multiple summoned units?

Status
Not open for further replies.
Level 4
Joined
Jan 18, 2019
Messages
71
I am nearing the part in my project where a portion of my units will summon other units. They don’t summon just one, but can summon many from the same spell. The question I have is this:

Is there a way in which I can ID these units, or add them to a UG once they have been summoned? I want to be able to give them order comamands and buffs, etc..

Thanks much. I’ve searched, but I haven’t found a clear answer to my question in the archives.
 
Level 12
Joined
Nov 3, 2013
Messages
989
What do you mean exactly?

You can detect when a unit is summoned and you can add the unit to some unitgroup, array, or hashtable.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
    • Actions
      • Unit Group - Add (Summoned unit) to unitGroup
To be able to know from which ability the units were summoned you can make use of the unit type and/or check whether the summoning unit's level of said ability is level 1 or higher.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Summon Water Elemental for (Triggering unit)) Greater than or equal to 1
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Summoned unit)) Equal to Water Elemental (Level 1)
              • (Unit-type of (Summoned unit)) Equal to Water Elemental (Level 2)
              • (Unit-type of (Summoned unit)) Equal to Water Elemental (Level 3)
        • Then - Actions
          • Unit Group - Add (Summoned unit) to waterElementals
        • Else - Actions
Besides that you'd have to explain yourself some more if there's something in particular that you need help with.
 
Level 4
Joined
Jan 18, 2019
Messages
71
thanks for the reply and the triggers.

I see that those work for a single summon spawn, but can A unique ID be given to more than a single spawn if the ability, like far seer’s wolves, summons more than one unit at a time?
 
Level 7
Joined
May 14, 2019
Messages
255
Set up a trigger which uniquely identifies summoned unit 1 as variable 1 and summoned unit 2 as variable 2

I thought I had to do something similar to this because I wanted unit created from dark portal to be removed after 60 seconds, but I found that you could just give them an expiration timer
 
Status
Not open for further replies.
Top