Lets say, i want to always select two units at once.
Well as you might suggest, its no problem to create a trigger, that always selects
both units, when one is selected. Thats whats works.
The thing that not works is, that if i got these two units selected and click on one of them, i deselect this
unit and can control the other unit alone.
I also tried to create a Deselect trigger, but i want both units selected if i click on one of them and not
to select, deselect and select again.
I'd be glad to hear some ideas from you guys :)
i have a solid knowledge on c and java, so you can also lay galaxy scripts on me :)
Unit Selection - Unit 1 (W/E it is) [0.0, 0.0] is Selected by player 2
Unit Selection - Select Untitled Variable 002 2 for player 2
Unit Group - Pick each unit in group Variable and do (Actions)
( Just make sure you add them to a group when they are created/ at the begin of the map! )
Unit Group - Add (Last created unit) to Group Variable ( Make one )
Do this for both units! and you should be good to go!
Not completly sure what your asking sorry, though if your wanting to be informed when you click an already selected unit a second time (say a unit in a group of already selected units, or even being informed when clicking the only unit you have selected a second time you can use a unit cllicked triger. To enable clicking events for a given unit go to "Data Editor"->Units and for a given unit disable its 'Unit - Flags'->'Cannot Be Clicked' flag.
Alternatly if you ONLY want the events to fire when you click on a unit that is already selected (rather than whenever clicking a unit selected or otherwise), you can disable this flag (allowing clicking events) in the triger editor on units when you select them, and enable (preventing clicking events) on units when you de select them, therefore only getting informed of clicks on already selected units.
I have the same problem like zpnx , did anyone solve it?
edit:
ok, the solution is this:
you use Ash4meD triggers
you add this to the event:
general if than else:
if you unit group selected:
than:
Unit Group - Pick each unit in (your group select units) and do (Actions)
Actions
Unit - Turn (Picked unit) Selectable state Off
and this to else:
Unit Group - Pick each unit in (your group select units) and do (Actions)
Actions
Unit - Turn (Picked unit) Selectable state On
Hey everyone :)
I have some issues with the Unit Selection:
Lets say, i want to always select two units at once. Well as you might suggest, its no problem to create a trigger, that always selects both units, when one is selected. Thats whats works.
The thing that not works is, that if i got these two units selected and click on one of them, i deselect this unit and can control the other unit alone. I also tried to create a Deselect trigger, but i want both units selected if i click on one of them and not to select, deselect and select again.
I'd be glad to hear some ideas from you guys :)
i have a solid knowledge on c and java, so you can also lay galaxy scripts on me :)
thx it will be handy for me :)
@zpnx: Go
Not completly sure what your asking sorry, though if your wanting to be informed when you click an already selected unit a second time (say a unit in a group of already selected units, or even being informed when clicking the only unit you have selected a second time you can use a unit cllicked triger. To enable clicking events for a given unit go to "Data Editor"->Units and for a given unit disable its 'Unit - Flags'->'Cannot Be Clicked' flag.
Alternatly if you ONLY want the events to fire when you click on a unit that is already selected (rather than whenever clicking a unit selected or otherwise), you can disable this flag (allowing clicking events) in the triger editor on units when you select them, and enable (preventing clicking events) on units when you de select them, therefore only getting informed of clicks on already selected units.
i have the same problem like zpnx and i dont see how your replies solve it, sorry.
unit clicked event isnt proper cause you can select without clicking (drag a border). and ash4meds code doesnt solve it imo. or did i miss something?
I have the same problem like zpnx , did anyone solve it?
edit:
ok, the solution is this:
you use Ash4meD triggers
you add this to the event:
general if than else:
if you unit group selected:
than:
Unit Group - Pick each unit in (your group select units) and do (Actions)
Actions
Unit - Turn (Picked unit) Selectable state Off
and this to else:
Unit Group - Pick each unit in (your group select units) and do (Actions)
Actions
Unit - Turn (Picked unit) Selectable state On
this isnt so nice, but its working.
@Hookah604: Go
the problem is:
If u want to select a unit. u need to deselct all other unit first :D
dunno if this helps but you can actually do something like this
The selected units are actually a Unit Group