• 🏆 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!

Do Unit Groups Combine? {When you pick every unit}

Status
Not open for further replies.
how to make stacking UnitGroups work!

To prevent bugs from occurring you can use two separate triggers setting the current picked unit on the first 'Pick Every Unit in UnitGroup' then setting the current picked uunit to a variable then running the second trigger to do the second 'Pick Every Unit in UnitGroup' with been able to still use the last unit and also beeing able to use it in now the current 'Pick Every Unit in UnitGroup'.
Heres the trigger.
  • UnitGroup loop 1
    • Events
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Set Unit = (Picked unit)
          • Trigger - Run UnitGroup loop 2 <gen> (checking conditions)
  • UnitGroup loop 2
    • Events
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • -------- Uknown actions --------
 
Status
Not open for further replies.
Top