• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Prevention unit to be added to the selection

Status
Not open for further replies.
Level 14
Joined
Aug 8, 2010
Messages
1,022
Uhhh... you can do this :
After a player makes a selection, check if there is something else than just the unit you want. If there is, remove the unit from the selection, else do nothing. This way the unit will be unselected if there are other units (if the player makes a drag selection). And if you left click, nothing happens.

And something else, do you want the unit to be removed from the selection when the player makes a drag selection but selects only the unit?
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
So you can click the unit, but can't control it ?
Why not change the ownership ?

What exactly you're trying to achieve ?

Is this unit supposed to be controlled by any chance ?
If so, why would you want it to not be controlled by players ?
I think he wants to simply remove the unit from the selection if it's selected trough a "drag selection". But if it's selected with a left click - do nothing. The unit must be controlled by the player i think.
 
Level 7
Joined
Nov 18, 2012
Messages
272
IIRC the Factory ability will allow such thing. Just make a dummy invisible unit spawn every 6000 seconds that lives .1 second.

The unit with the Factory Ability will be unselectable via drag, but it will still be selectable via click.
 
Status
Not open for further replies.
Top