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

Area Invulnerable

Status
Not open for further replies.
Level 1
Joined
Jul 27, 2010
Messages
4
Hello, I am trying to make everything in a region along with a timer for 10 minutes invlunerable, if its possable how do you do it? :) thanks in forehand =)
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
Actions:
Unit Group - Pick every unit in (Units in ''Rect'' <gen>) and do (Unit - Make (Picked unit) Invulnerable)
Wait 600.00 seconds
Unit Group - Pick every unit in (Units in ''Rect'' <gen>) and do (Unit - Make (Picked unit) Vulnerable)

But if the units you want to make vulnerable again, are not standing in that rect anymore, you'll have to use a variable, to save the unit group. When the 10 minutes are over, make that unit group vulnerable again (not whatever units are standing in your rect).
 
Last edited:
  • Trigger
  • Events
    • -Your event-
  • Conditions
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Region 000 <gen>) and do (Actions)
      • Loop - Actions
        • Unit Group - Add (Picked unit) to NewGroup
        • Unit - Make (Picked unit) invulnerable
    • Countdown Timer - Start Timer1 as a one-shot timer that will expire in 600.00 seconds
  • Trigger2
  • Events
    • Time - Timer1 expires
  • Conditions
  • Actions
    • Unit Group - Pick every unit in NewGroup and do (Actions)
      • Loop - Actions
        • Unit - Make (Picked unit) Vulnerable
        • Unit Group - Remove (Picked unit) from NewGroup
 
Status
Not open for further replies.
Top