...
If you're ordering a sensor droid to DORDER_ATTACK then only it's assigned units will attack the target. If you want base defences to attack the target as well, tell the sensor to DORDER_OBSERVE the target.
Bug #3359 indicates there might be a problem ordering scavenger units that are pre-placed on the map (at design time) to attack.
See also
- Droids – quick reference of API features relating to droids
- orderDroidObj() – tell a droid to do something to something