• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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