backport.dorder.js
Overview
Adds missing DORDER (droid order) constants that are applicable to the .order property of Droid objects.
Availability
Requires backport.js
Compatible with all versions of Warzone from 3.1 Beta 1 and above.
If constants are already defined, dorder.js will not overwrite them.
Notes
The JS API is gradually exposing more of the DORDER constants over time, however most of the constants are usable with releases going right back to 3.1 Beta 1.
To use dorder.js, download it and include() it in your script - all missing orders will automatically be defined ready for use in your script. Existing constants will not be overwritten.
The C++ code has a DORDER_TEMP_HOLD while the JS API has a DORDER_HOLD – I've chosen to use the JS API's name as it's going to be more widely documented.
Some of the orders can't currently be issued to a droid via a script - for example there's no function capable of accepting the parameters required for DORDER_LINEBUILD, and the game is hard-coded to prevent AI players from using DORDER_RECOVER.
Full list of constants
Here's a list of all the DORDER constants you'll have after including dorder.js in your script:
Script
See also
Droids – quick reference of JS API features relating to droids
Droid object – query a droid's existing order via the .order property
.order – documentation of order constants + example code
orderDroid() – give a droid a simple order (that's not based on an object or location)
backport.orderDroid.js – backport the orderDroid() function to earlier versions of the game & add support for some additional orders
orderDroidBuild() – tell a droid to build a structure
orderDroidLoc() – tell a droid to perform an order in relation to a map location
orderDroidObj() – tell a droid to perform an order in relation to a game object