(info) Other great resources: Official JS API docs, Scripting Forum

DORDER_FIRESUPPORT

Overview

Assign a attacker droid to a sensor droid so that it can attack whatever the sensor droid targets.

Availability

Warzone 3.2 and above.

 Backport to earlier versions with backport.dorder.js and baseObject.js.

Example

// Assuming that sensorDroid has .droidType == DROID_SENSOR...
 
// Normal scenario: Attach indirect fire land droid to a sensor droid
if ( (!isVTOL(droid)) && (droid.hasIndirect) ) orderDroidObj(droid,DORDER_FIRESUPPORT,sensorDroid);
 
// VTOL scenario: Sensor droid must have proper turret
if (sensorDroid.name.indexOf("VTOL")>-1 || sensorDroid.name.indexOf("Spectrum")>-1) {
  if (isVTOL(droid)) orderDroidObj(droid,DORDER_FIRESUPPORT,sensorDroid);
}
 
// Wide spectrum sensor scenario: Attach indirect fire and/or VTOL droids
if ( sensorDroid.name.indexOf("Spectrum")>-1 && (droid.hasIndirect || droid.isVTOL) ) {
  orderDroidObj(droid,DORDER_FIRESUPPORT,sensorDroid);
}

Notes

The droid's current order can be determined from it's .order property. For more information see Droid object.

It's possible that DORDER_FIRESUPPORT can be used with sensor structures as well, but I've not tested that. Please leave a comment on this page if you try that to let me know if it works.

If you want to guard a structure, use DORDER_GUARD instead.

Assigning indirect-fire land units to sensor droids

Indirect fire weapons are things like mortars, artillery (howitzer, hellstorm, etc.) and missiles.

By attaching an indirect fire droid to a sensor droid you can massively increase the range of the attacker droid's weapons. For example, a mortar droid without upgrades has a range of 18 tiles, but it's internal sensors only scan targets within an 8 tile radius – by assigning it to a sensor droid it can therefore extend it's attack capability from 8 tiles (internal sensors) to the full 18 tiles (external sensor droid).

When you assign the droid to a sensor droid, it will automatically move to be in range of the sensor's target, assuming it can reach the location. For example, if the sensor droid is using hover propulsion it will be able to travel across water – if the indirect fire droids aren't using hover propulsion, they're not going to be able to follow the sensor!

Assigning VTOLs to sensor droids

You can only assign VTOLs to sensor droids if the sensor droid has a sensor capable of controlling VTOLs:

VTOL CB Radar TurretVTOL Strike TurretWide Spectrum Sensor

Wide spectrum sensor droids

Wide spectrum sensor droids can have both indirect-fire land droids and VTOLs assigned to them, because the wide spectrum sensor includes sensors and counter-battery radars for both land and VTOL droids.

See also