• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to disable double click multi select?

Status
Not open for further replies.
I want to disable when you double click on a unit you select up to 12 units of the same type.
I know this doesn't work for buildings, but making the units buildings does not work for me, because buildings have unchangeable rotation.

I checked and wc3 does not have a trigger in game triggers for that. It has disable selection and disable drag selection, but they don't do it.

also this trigger doesn't work for some reason

  • deselect multiple
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
      • Player - Player 7 (Green) Selects a unit
      • Player - Player 8 (Pink) Selects a unit
      • Player - Player 9 (Gray) Selects a unit
      • Player - Player 10 (Light Blue) Selects a unit
      • Player - Player 11 (Dark Green) Selects a unit
      • Player - Player 12 (Brown) Selects a unit
    • Conditions
      • (Number of units in (Units currently selected by (Triggering player))) Greater than 1
    • Actions
      • Selection - Clear selection for (Triggering player)
 
Level 12
Joined
Mar 13, 2020
Messages
421
I want to disable when you double click on a unit you select up to 12 units of the same type.
I know this doesn't work for buildings, but making the units buildings does not work for me, because buildings have unchangeable rotation.

I checked and wc3 does not have a trigger in game triggers for that. It has disable selection and disable drag selection, but they don't do it.

also this trigger doesn't work for some reason

  • deselect multiple
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
      • Player - Player 7 (Green) Selects a unit
      • Player - Player 8 (Pink) Selects a unit
      • Player - Player 9 (Gray) Selects a unit
      • Player - Player 10 (Light Blue) Selects a unit
      • Player - Player 11 (Dark Green) Selects a unit
      • Player - Player 12 (Brown) Selects a unit
    • Conditions
      • (Number of units in (Units currently selected by (Triggering player))) Greater than 1
    • Actions
      • Selection - Clear selection for (Triggering player)
Maybe you should separate These triggers
With one the selection
And the second with a Timer checking all 0.1 second if the selection is grather Then 1

I think what Happens in your trigger
You select some Units in the Same Time it’s not grather Then 1 because Maybe wc3 Delay the selection check and the trigger is fastet Then the Check Just Try something out and try to debug with a Message if your Condition Even Works
 
with this triggers works precisely, but I think it's harsh on your system.
there must be another way

  • deselect with timer
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set UnitsSelected[(Integer A)] = (Units currently selected by (Player((Integer A))))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in UnitsSelected[(Integer A)]) Greater than 1
            • Then - Actions
              • Selection - Clear selection for (Player((Integer A)))
            • Else - Actions
          • Custom script: call DestroyGroup(udg_UnitsSelected[GetForLoopIndexA()])

EDIT: Even with it you can order the selected untis to move if you are very fast!
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,557
I don't think you're going to find a proper solution, there will always be a small window of time for error.

You can try experimenting with the Shop Sharing ability but that doesn't allow you to issue certain orders. Perhaps the units shouldn't be under your control by default, and when you select one you gain control of it. Then maybe you can manage it so that you can only have one controlled unit at a time.
 
Last edited:
Status
Not open for further replies.
Top