[Crash] Select all units of type

Status
Not open for further replies.
Do you have an Event that runs when you Select a unit? We need to see your whole trigger(s). It sounds like an infinite loop issue.

Anyway, I tested this on BNET and it didn't crash/desync:
  • Example
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Unit-type of (Summoned unit)) Equal to Water Elemental (Level 1)
    • Actions
      • Set VariableSet TempPlayer = (Owner of (Summoned unit))
      • Set VariableSet TempGroup = (Units owned by TempPlayer matching ((Unit-type of (Matching unit)) Equal to Water Elemental (Level 1)).)
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Selection - Add (Picked unit) to selection for TempPlayer
      • Custom script: call DestroyGroup(udg_TempGroup)
It also fixes the memory leaks.
 
Last edited:
Status
Not open for further replies.
Back
Top