Other great resources: Official JS API docs, Scripting Forum
orderDroid()
Overview
Send a basic command, that does not require an object or location, to a droid.Availability
Warzone 3.2 and above.
Backport to earlier versions with backport.orderDroid.js and backport.dorder.js.
Syntax
var returnValue = orderDroid(droid, order);
Parameters
Parameter | Type | Mandatory | Description | Game version |
---|---|---|---|---|
droid | Droid object | The droid that will be given the order. | 3.2 | |
order | Constant | The order to give the droid, which can only be one of the following simple orders:
If you try using any other order, you will get an error. | 3.2 |
Return values
Value | Type | Description |
---|---|---|
true | Boolean | The droid will perform the order. |
<error> | Error | The order was invalid or the droid doesn't exist. |
Example
Stop a droid's current order
orderDroid(myDroid, DORDER_STOP); // tell my droid to stop whatever it's doing
See also
- Droids – quick reference of all API features relating to droids
- orderDroidBuild() – order a construction droid to build something
- orderDroidLoc() – order a droid to do something at some location
- orderDroidObj() – order a droid to do something to some object