This event is triggered when you get a new droid as a result of buildDroid() or addDroid()... |
function eventDroidBuilt(droid, structure) { // do stuff } |
Parameter | Type | Mandatory | Description | Game version |
---|---|---|---|---|
droid | Droid object | An object representing the droid you just received. | 3.1 Beta 1 | |
structure | Undefined | If the droid was produced at a factory, for example you used buildDroid() function, this will be an object representing that factory. If the droid wasn't built at a factory, for example if you used the addDroid() function, this parameter will be | 3.1 Beta 2 |
Warzone does not process the event handlers' return value.
function eventDroidBuilt(droid,structure) { // droid object will always be defined - you probably want to give it some orders if (structure) { // the droid was built at your factory, which is probably now idle } } |
It's also possible to gain droids by assimilation or transfer from another player - see eventObjectTransfer() for dealing with that scenario. |
AvailabilityRequires:
|
ContentsJump to: |