• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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