[Crash] Select all units of type

Status
Not open for further replies.
Level 14
Joined
Jan 24, 2017
Messages
280
I am trying to select all units, which where summoned by a spell for the owner of the units.
  • Selection - Select (Units owned by (Owner of (Summoning unit)) of type Pinnace) for (Owner of (Summoning unit))
This works in singleplayer but crashes the map in multiplayer. Any ideas on how I can achieve that?
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
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.
Top