Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Overview

Excerpt

Instruct a droid to guard a structure.

Availability

Image Added Requires backport.dorder.js and backport.js.

This isn't a standard feature of the JS API at present (but likely to be added in the future), 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

Code Block
themeEclipse
languagejavascript
linenumberstrue
if (myDroid.canHitGround || myDroid.canHitAir) {
  orderDroidObj(myDroid,DORDER_GUARD,structureObject);
}

Notes

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

When you tell a droid to guard a structure, it will move to the structure and guard it. How it reacts to enemies depends on the droid's settings – something that can't currently be controlled via the API.

It's not known what will happen to sensor droids or command droids, and their assigned units, if they are told to guard a structure – if you know please post a comment on this page!

Guarding sensors might work in a similar way to how DORDER_FIRESUPPORT works but for structures? Again, unknown – post a comment if you know!

See also