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 undefined.
3.1 Beta 2
Return value
Warzone does not process the event handlers' return value.
Example
Example event handler
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.
Availability 3.1 B1+
Requires:
Warzone 3.1 Beta 1 and above.
The 'structure' parameter was added in Warzone 3.1 Beta 2