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

How can you make every unit on the map invulnerable, then make 4 units vulnerable?

Status
Not open for further replies.
Level 8
Joined
Aug 1, 2008
Messages
420
Exactly what the title says, i want every unit to be invulnerable for (amount of time) then 4 units to get vulnerable. Or leave out the 4 units, and just make everyone else invulnerable. I cant find out how to do this.
I was thinking of making a group variable, putting the 4 units in, making everyone invuln, then making the 4 units vulnerable. But nooo apparently you cant do that >.>
 
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Make (Picked unit) Invulnerable
      • Unit Group - Pick every unit in (Random 4 units from TempGroup) and do (Actions)
        • Loop - Actions
          • Unit - Make (Picked unit) Vulnerable
      • Custom script: call DestroyGroup(udg_TempGroup)
 
Level 11
Joined
May 31, 2008
Messages
698
Or you could add all the units in the map to a group, then remove the units that should be vulnerable from that group and make the units in the group invulnerable. Then just wait for however long you want and pick the units in the group and make em vulnerable again.
 
Level 8
Joined
Aug 1, 2008
Messages
420
Oooh thank you, i totally forgot about that :razz:
+rep to all
Solved! (really quickly aswell, didnt expect an answer for ages xD)
 
Status
Not open for further replies.
Top