HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Can you prevent 'Double Click = Select All of Type' ?

03-22-2005, 10:36 AM#1
Lil Blue Smurf
Pretty much just what the title says. Is it possible to make it so that you can't double click on a unit and have it select all units of the same type? Or is there maybe at least a way to do something like:

event:
selection event
action:
clear selection
reselect only originally selected unit


The problem is that I don't know how I would tell between a single selection and a double click, since double clicks fire selection events for each unit. Hope that was clear.
03-23-2005, 09:00 PM#2
Guest
I thought I had a rather easy solution to this but I found out that the triggers like to be bastards sometimes... A way I finally figured out to do this reliable had a logic flaw in that the final action of the trigger was to select a unit, which retriggered the event call which sent it into an endless loop =\

The only way I could think of on the spot to fix this was a simple time delay using an interger 1/0 = on/off but the problem is that if they double click too fast two times in a row, it doesnt work which means if this is for some quick game it wont serve your purpose, but perhaps you can figure something out from what I found...

Also something important to keep in mind is that this method DOES select multiple units for a very small amount of time, yet it selects them nontheless, so if this is to like "Destroy selected unit" or something like that, its not gonna work, but again perhaps you can figure something out.

Actions
Player - Player 1 Selects a unit
Conditions
timecheck Equal to 0 (this is my on/off switch)
Actions
If/Then/Else Multiple Actions
If - Conditions
*Interger Compairison*
(Number of units in (Units currently selected by Player 1) Equal to 1
Then - Actions
Unit Group - Remove all units from TheMainUnit
Unit Group - Add all units of (Units currently selected by Player 1) to TheMainUnit
Else - Actions
Set timecheck = 1
Selection - Clear selection for Player 1
Selection - Select TheMainUnit for Player 1
Wait 0.5 seconds
Set timecheck=0
Hope this helps somehow man, g'luck with your stuff...