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

Help please

Status
Not open for further replies.
Level 16
Joined
Jul 31, 2012
Messages
2,217
  • Custom script: set bj_wantDestroyGroup = true
  • Set temp_Unit_Group = (Units within 275.00 of (Target point of ability being cast) matching (((Owner of (Matching unit)) Equal to (Random player from Enemy_Players[(Player number of (Owner of (Triggering unit)))])) and (((Matching unit) is A structure) Equal to False)))
  • Unit Group - Pick every unit in (temp_Unit_Group) and do (Actions)
    • Loop - Actions
      • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 100.00 damage of attack type Spells and damage type Normal
in these lines: Enemy_Players[array] contain all enemy players of the player (array)

i used to check the owning players with 3 times or and or and or but i don't want to do this again

Can anybody tell me the problem in these line?
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Sometimes the filtering is better to do like this.
  • Untitled Trigger 004
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 512.00 of (Center of (Playable map area))) and do (Actions)
        • Loop - Actions
          • Set u1 = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (u1 is alive) Equal to True
              • (u1 is A structure) Equal to False
              • (u1 belongs to an enemy of (Owner of (Triggering unit))) Equal to True
            • Then - Actions
            • Else - Actions
You propably want to check the enemy status.
 
Status
Not open for further replies.
Top