I've just solved the problem a minute ago so expect a full tutorial in the coming day or two.
The problem is quite common, when using the mouse to look with the camera when holding the left mouse down the player becomes unable to click or make any selection.
OneTwo had a solution in one of his earlier tutorials, that being to move a small circular region to the point where the mouse was clicked and to pick a random unit from within that region to select and attack.
This was a good work around but only to a point. I wanted the player to actually be choosing the unit or object they want to select so I spent some time researching and fiddling around with certain triggers and digging through the data editor for some way to disable the cursor being hidden. None of this was very fruitful, but a very simple solution came to mind:
Keep in mind a full tutorial with images and steps will be available soon.
To start off you have your mouse looking triggers:
Mouse Down
Mouse Up
In 'Mouse Down' you would find a function to turn Lock Camera Mouse Relative Mode On.
And in 'Mouse Up' you would turn it off again.
To enable clicking (or a workaround) add a global variable called "Highlighted Unit" and then add two triggers:
Unit Highlighted
Event
Unit Selection - (Any Unit) is (Highlighted) by Player (Any Player)
Actions
Set Variable - (Highlighted Unit) = (Triggering Unit)
Unit Unhighlighted
Event
Unit Selection - (Highlighted Unit) is (Unhighlighted) by Player (Any Player)
Actions
Set Variable - (Highlighted Unit) = (No Unit)
Mouse Down
At the top of your mouse down trigger insert:
Unit Selection - Deselect all units for player (Player)
Unit Selection - (Select) (Highlighted Unit) for player (Player)
...Turn camera mouse relative mode on etc....
Data Editor
Now head to the data editor and find the unit you want to click and make sure the "Cannot be Highlighted" flag is disabled.
And that should be it! It also means that if you click on a space that isn't a unit, the previous selected unit will be unhighlighted.
EDIT: Tutorial can be found here: http://forums.sc2mapster.com/resources/tutorials/10136-trigger-clicking-with-camera-mouse-enabled/
I've just solved the problem a minute ago so expect a full tutorial in the coming day or two.
The problem is quite common, when using the mouse to look with the camera when holding the left mouse down the player becomes unable to click or make any selection.
OneTwo had a solution in one of his earlier tutorials, that being to move a small circular region to the point where the mouse was clicked and to pick a random unit from within that region to select and attack.
This was a good work around but only to a point. I wanted the player to actually be choosing the unit or object they want to select so I spent some time researching and fiddling around with certain triggers and digging through the data editor for some way to disable the cursor being hidden. None of this was very fruitful, but a very simple solution came to mind:
Keep in mind a full tutorial with images and steps will be available soon.
To start off you have your mouse looking triggers: Mouse Down Mouse Up
In 'Mouse Down' you would find a function to turn Lock Camera Mouse Relative Mode On. And in 'Mouse Up' you would turn it off again.
To enable clicking (or a workaround) add a global variable called "Highlighted Unit" and then add two triggers:
Unit Highlighted
Event
Actions
Unit Unhighlighted
Event
Actions
Mouse Down
At the top of your mouse down trigger insert:
Data Editor
Now head to the data editor and find the unit you want to click and make sure the "Cannot be Highlighted" flag is disabled.
And that should be it! It also means that if you click on a space that isn't a unit, the previous selected unit will be unhighlighted.
Expect a prettier post soon.
Cool !
The tutorial can be found here: http://forums.sc2mapster.com/resources/tutorials/10136-trigger-clicking-with-camera-mouse-enabled/