- Joined
- Sep 26, 2009
- Messages
- 9,534
LITHUFFIN had found his resource was allowing his dummy units to be picked. I was highly skeptical of this, until I did a bunch of trial and error tests until I could find the cause of the problem:
His dummy unit could not be moved with SetUnitX and Y, but when I tried moving it like that it could not be picked by an InRange filter. SetUnitPosition moved the dummy but allowed it to be picked.
The discovery: In Object Editor, the unit had 0 default movement speed. Once I set that back to its default value, the unit could be moved with SetUnitX/Y AND no longer showed up in the group-filter checks!
So, to have a dummy unit which can be picked by GroupEnumUnitsInRange, its Object Editor movement speed must be set to 0.00 AND its movement must be done with SetUnitPosition.
Make sure any dummy unit is paused once created so that it doesn't spam "stop" order when you use SetUnitPosition.
TL;DR: Picking all dummy unit missiles in range is now possible!
His dummy unit could not be moved with SetUnitX and Y, but when I tried moving it like that it could not be picked by an InRange filter. SetUnitPosition moved the dummy but allowed it to be picked.
The discovery: In Object Editor, the unit had 0 default movement speed. Once I set that back to its default value, the unit could be moved with SetUnitX/Y AND no longer showed up in the group-filter checks!
So, to have a dummy unit which can be picked by GroupEnumUnitsInRange, its Object Editor movement speed must be set to 0.00 AND its movement must be done with SetUnitPosition.
Make sure any dummy unit is paused once created so that it doesn't spam "stop" order when you use SetUnitPosition.
TL;DR: Picking all dummy unit missiles in range is now possible!