Other great resources: Official JS API docs, Scripting Forum

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »

Overview

Instruct a droid to self-destruct!

Availability

 Requires backport.dorder.js and backport.orderDroid.js.

This isn't a standard feature of the JS API, however it's a constant used by the game engine so it's recognised by Warzone from at least 3.1 Beta 1 onwards.

Example

// self-destruct
orderDroid(myDroid,DORDER_DESTRUCT);

Notes

The droid's current order can be determined from it's .order property. For more infomration see Droid object.

This order makes your droid self-destruct after a short delay, similar to if it was destroyed by an enemy droid. If the droid is a DROID_PERSON then the droid will actually burn before being destroyed.

After self-destructing the droid will be removed from the map and I assume that an eventDestroyed() will be triggered when this happens.

See also

  • Droids – quick reference of API features relating to droids
  • orderDroid() – tell a droid to perform a basic order (not location/object specific)
  • No labels