Other great resources: Official JS API docs, Scripting Forum
DORDER_RTR
Overview
Instruct a land droid to go to a repair facility for repairs.Availability
Warzone 3.2 and above.
Backport to earlier versions with backport.dorder.js and backport.orderDroid.js.
Example
Return to a repair station
// go to nearest repair facility (recommended): if (!isVTOL(myDroid)) orderDroid(myDroid,DORDER_RTR); // use specific repair facility (Note: DORDER_RTR_SPECIFIED would be a better order): if (!isVTOL(myDroid)) orderDroidObj(myDroid,DORDER_RTR,repairStation);
Notes
The droid's current order can be determined from it's .order
property. For more infomration see Droid object.
If you don't have any repair facilities, the droid will retreat to your HQ (or somewhere near your base if you don't have one) and won't get repaired unless you have researched Auto-Repair tech.
The droid will perform several actions throughout the repair process. For more information see: Working with Repairs & Rearming.
See also
- Droids – quick reference of all JS API features relating to droids
- DORDER_REARM – the VTOL equivalent of DORDER_RTR
- DORDER_RTB – return to base
- DORDER_RTR_SPECIFIED – tell a land droid to get repaired at a specific repair station
- isVTOL() – determine if a droid is a VTOL or not
- orderDroid() – used to issue simple orders to droids
- orderDroidObj() – instruct droid to perform order on some object
- .order – list of all order constants