Other great resources: Official JS API docs, Scripting Forum
eventObjectRecycled()
Triggered when a droid is recycled or when a structure is demolished by a truck...
Syntax
function eventObjectRecycled( gameObject ) {
// do stuff
}Parameters
Parameter | Type | Mandatory | Notes | Game version |
|---|---|---|---|---|
gameObject | The droid or structure that was recycled. | 3.2+ |
Notes
It's likely that eventDestroyed() will be triggered after this event.
Example
function eventObjectRecycled( obj ) {
playSound( obj.type == DROID ? "pcv428.ogg" : "pcv340.ogg" );
}