• 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] Indexes... Damn

Status
Not open for further replies.
Level 5
Joined
May 27, 2008
Messages
62
Hmmm Im not sure how to remove one unit group... I have arrayed it so it would look like this

  • For each (Integer DarkIndex[3]) from 1 to DarkIndex[2], do (Actions)
    • Loop - Actions
      • Unit - Order DarkCaster[DarkIndex[3]] to Right-Click DarkTarget[DarkIndex[3]]
      • Set DarkCheck[DarkIndex[3]] = (Units within 100.00 of (Position of DarkTarget[DarkIndex[3]]))
      • Unit Group - Pick every unit in DarkCheck[DarkIndex[3]] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Picked unit) Equal to DarkCaster[DarkIndex[3]]
            • Then - Actions
              • Unit - Cause DarkCaster[DarkIndex[3]] to damage DarkTarget[DarkIndex[3]], dealing (Real((Level of Dark Cut for DarkCaster[DarkIndex[3]]))) damage of attack type Spells and damage type Normal
              • Custom script: call DestroyGroup( udg_DarkCheck[DarkIndex[3]] )
              • Trigger - Turn off (This trigger)
            • Else - Actions
Well, I dont know how to remove groups with indexes but could some one help me?

And if you find leaks please then tell me :D
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Whats with all these funny array systems in GUI these days...
I mean you will have hashtables to use and can you not just use globals instead of global arrays for the indexes as you are not even using the array bit of them.

True... yet, hashtables are new and their biggest secrets are yet to be discovered.
I don't get the array part either, why do you use arrays if you - seemingly - don't use them?
 
Status
Not open for further replies.
Top