The name to give the droid, for example "Bob the Droid".
It's useful to base the name on the purpose of the droid, for example "AT" for droids that are designed to attack tanks. You can then quickly find droids by looking through a list of Droid objects returned by the enumDroid() function.
3.1 Beta 1
body
String
Array of String
The body that your droid will use.
You can quickly find the ID strings for bodies in the online guide - just click any body and look at "Body ID".
If you pass in an array of body types, the first available body in the list will be used.
3.1 Beta 1
propulsion
String
Array of String
The propulsion the droid will use.
If you pass in an array of propulsion types, the first available propulsion in the list will be used.
3.1 Beta 1
droidType
Number (in wz 3.1)
Null (in wz 3.2+)
In warzone 3.1 and earlier, you have to specify the droidType and it must match the type of droid being built:
DROID_WEAPON — A droid capable of attacking other droids.
DROID_CYBORG — A cyborg warrior capable of attacking the enemy.
DROID_COMMAND — A commander unit, to which other units can be assigned.
DROID_ECM — A droid that has an Electronic Counter Measures (radar jammer) turret.
DROID_CONSTRUCT — A construction truck or a cyborg engineer.
DROID_SUPERTRANSPORTER — A heavy transport unit, capable of airlifting any type of droid (including VTOLs) to some other location on the map...
DROID_PERSON — A droid that uses "legs" propulsion, for example a civilian or a scavenger machinegunner.
DROID_REPAIR — A droid that has a repair turret, capable of repairing other droids.
DROID_TRANSPORTER — A cyborg transporter (or possibly a super transporter in Warzone 3.1 Beta 4 and earlier), capable of airlifting droids to some other location on the map.
DROID_ANY — Used to bypass droid type filtering in functions that list or count droids.
In Warzone 3.2 and later, pass in null as the function will determine the droid type automatically.
If your script needs to work on both v3.1 and v3.2, specify the droid type (it will be ignored in 3.2) but bear in mind the issues with cyborg engineers and mechanics in Warzone 3.1 (bug #3133) – see examples below.
3.1 Beta 1
Simplified in 3.2
turret
String
Array of String
The turret (weapon, sensor, etc) that will be placed on the droid.
If you pass in an array of turrets, the first available turret in the list will be used.
3.1 Beta 1
turret2
String
Array of String
If the body can handle 2 or more turrets, this parameter can be specified to define the second turret if desired.
If the body can't handle 2 or more turrets, do not specify this parameter.
turret3
String
Array of String
If the body can handle 3 turrets, this parameter can be specified to define the third turret if desired. Note that you must define the second turret (turret2) parameter if you want to define the third turret (turret3).
If the body can't handle 3 turrets, do not define this parameter.
Return value
Value
Type
Description
Game version
true
Boolean
The factory is building you a shiny new droid.
3.1 Beta 1
false
Boolean
Something went wrong - check the logs to find out what.
3.1 Beta 1
<error>
Error
The structure you specified doesn't exist, isn't owned by you, or isn't a factory. Duh!
3.1 Beta 1
Example
Creating cyborg engineers and mechanics - Works in Warzone 3.1 and 3.2