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 2 Next »

Overview

Instruct a droid to guard a structure.

Availability

 Requires dorder.js v0.1 or above.

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

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

  • No labels