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

Version 1 Next »

Overview

Instruct a repair droid to repair a damaged Droid object.

Availability

 Requires dorder.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

if (!isVTOL(damagedDroidObject)) orderDroidObj(myRepairDroid,DORDER_DROIDREPAIR,damagedDroidObject);

Notes

A droid's current order can be determined from it's .order property, and it's health from the .health property. For more infomration see Droid object.

The repair droid will travel to the damaged droid to repair it.

If you want a repair droid to repair a VTOL, move the VTOL (using DORDER_MOVE) to the repair droid, wait until it lands (triggering eventDroidIdle()) and only then tell the repair droid to repair it. It's much better to send VTOLs for repair at a rearming pad (DORDER_REARM) because they'll also get their weapons restocked.

Be careful when repairing hovercraft - your repair droid might not be able to reach the damaged hovercraft if its on a lake.

See also

  • DORDER_REARM – tell a VTOL to get repaired/rearmed at a rearming pad.
  • DORDER_RTR – tell a land droid to get repaired at a repair station
  • DORDER_RTR_SPECIFIED – tell and land droid to use a specific repair station
  • Droids – quick reference of API features relating to droids
  • Droid object – DORDER_DROIDREPAIR can only be used to repair droids.
  • eventAttacked() – a good trigger to see if things need repairing
  • orderDroidObj() – tell a droid to do something to something
  • No labels