Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Warzone 3.1 Beta 1 and above.

Example

Code Block
themeEclipseRDark
languagejavascript
titleMove a droid to where I first started out on this map
linenumberstrue
// assuming we have a droid object "myDroid" and a location defined by it's x,y co-ordinates...
if (droidCanReach(myDroid,x,y)) {
  orderDroidLoc(myDroid,DORDER_PATROL,x,y);
}

...

  • DORDER_MOVE – move a droid to a specific location, avoid attacking enemies along the way, stop when they get there
  • DORDER_SCOUT – similar to DORDER_PATROL, but the droids will stop once they reach the specified location
  • droidCanReach() – determine if a droid can reach a specific location
  • orderDroidLoc() – order a droid to move to, or do something at, a specific location
  • orderDroidObj() – order droid to move to, or do something with, a specific game object
  • .order – list of all order constants
  • startPositions[] – an array of player starting positions