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

[Trigger] Damage trigger

Status
Not open for further replies.
Level 27
Joined
Feb 22, 2006
Messages
3,052
Note: This will clean up the leak, you will need a unit group variable called ALG.
  • Events
  • Time - Every 3.00 seconds of the game
  • Conditions
  • Actions
  • Set ALG = Units in Playable Map Area matching unit is Mechanical is equal to false
  • Unit Group - Pick every unit in ALG and Set Life of Picked unit to life of picked unit - 1.00
  • Custom Script: call DestroyGroup(udg_ALG)
If you want them to be damaged by a source, instead of setting their life to their life - 1, have a unit damage picked unit dealing 1 damage using Unit - Damage Target.
--donut3.5--
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Donut, skip the group variable.

  • Blah
    • Events
      • Time - Every 3.00 seconds of Game Time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick Every Unit in (Units in Playable Map Area) Matching ((Matching Unit) is Mechanical Equal to False) And do actions
        • Loop - Actions
          • Unit - Set Life of (Picked Unit) to ((Life of (Picked Unit)) - 1.00)
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Because it's a component of ForGroupBJ, so they'd have to code all location-using BJs to do it. When basically no one would use it, it would be wasting more speed than it would be worth.

You also tend to use the same location multiple times, but not the same group.

That's my theory anyways.
 
Status
Not open for further replies.
Top