Here's my issue. While clicking on an SCV unit given the Agria Tree model via its actor, everything works as it should and the SCV/Tree responds as being clicked. Now when there's a Zergling behind that Tree unit, and the SCV/Tree is clicked, the zergling responds as being clicked. How can I set it so that the unit closest to the player camera is always clicked?
NOTE: This is via the unit was clicked event. I really think the issue is somewhere in the data editor and I hope someone knows the answer.
Here's how the issue is set up:
First of all, I have a trigger that tells me what unit is being clicked on by the player (via unit was clicked event).
Second, I copied an SCV and it's actor. Then changed the copied units actor to an Agria Tree.
Third, I placed down some zerglings around the tree. I made the Tree and Zergling units clickable via unchecking the "cannot be clicked" flag in data editor.
Lastly the player has a third person camera following (set via trigger of course) a unit that cannot be targeted (set via the data editor).
Try clicking on the Tree unit with and without a zergling behind it.
Here's my issue. While clicking on an SCV unit given the Agria Tree model via its actor, everything works as it should and the SCV/Tree responds as being clicked. Now when there's a Zergling behind that Tree unit, and the SCV/Tree is clicked, the zergling responds as being clicked. How can I set it so that the unit closest to the player camera is always clicked?
NOTE: This is via the unit was clicked event. I really think the issue is somewhere in the data editor and I hope someone knows the answer.
Here's how the issue is set up:
First of all, I have a trigger that tells me what unit is being clicked on by the player (via unit was clicked event).
Second, I copied an SCV and it's actor. Then changed the copied units actor to an Agria Tree.
Third, I placed down some zerglings around the tree. I made the Tree and Zergling units clickable via unchecking the "cannot be clicked" flag in data editor.
Lastly the player has a third person camera following (set via trigger of course) a unit that cannot be targeted (set via the data editor).
Try clicking on the Tree unit with and without a zergling behind it.
You mean when you select a group of units, which unit takes priority?
Unit - Subgroup Priority. Higher is better.
@Eiviyn:
Actually I just solved the issue. The unit MUST also be targetable, else unchecking "cannot be clicked" is useless.