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

[Crash] Select all units of type

Status
Not open for further replies.
Level 14
Joined
Jan 24, 2017
Messages
250
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 65
Joined
Aug 10, 2018
Messages
6,657
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