From d9c04710225e5a0019d1ce793a4e4f7bee79dcce Mon Sep 17 00:00:00 2001 From: walterhiggins Date: Wed, 2 Jan 2013 07:39:05 +0000 Subject: [PATCH] Added a TLDNR section --- drone.js | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/drone.js b/drone.js index 70fd82d..7ff2257 100644 --- a/drone.js +++ b/drone.js @@ -7,13 +7,43 @@ var global = this; // Please read the following section to understand what a Minecraft Drone can do. // var Drone = { + // + // TLDNR; (Just read this if you're impatient) + // ====== + // At the in-game command prompt type... + // + // /js box(5) // + // ... creates a single wooden block at the cross-hairs or player location + // + // /js box(5).right(2).box('35:15',3,7,2) + // + // ... creates a single wooden block and a 2001 black obelisk 3x7x2 in size. + // If you want to see what else ScriptCraft's Drone can do, read on... + // // creating a new drone // ==================== // - // Drones can be created in 2 ways... + // Drones can be created in 3 ways... // - // [1] d = new Drone() + // [1] Calling any one of the methods listed below will return a Drone object. For example... + // + // /js var d = box(5) + // + // ... creates a 1x1x1 wooden block at the cross-hairs or player's location and returns a Drone + // object. This might look odd (if you're familiar with Java's Object-dot-method syntax) but all + // of the Drone class's methods are also global functions that return new Drone objects. + // This is short-hand for creating drones and is useful for playing around with Drones at the in-game + // command prompt. It's shorter than typing ... + // + // /js var d = new Drone().box(5) + // + // ... All of the Drone's methods return `this` (self) so you can chain operations together like this... + // + // /js var d = box(5).up().box(5,3,1,3).down().fwd(2).box(5).turn().fwd(2).box(5).turn().fwd(2).box(5) + // + // [2] /js d = new Drone() + // // This will create a new Drone. If the cross-hairs are pointing // at a block at the time then, that block's location becomes the drone's // starting point. @@ -38,14 +68,17 @@ var Drone = { // // ... which will move the drone up one block as soon as it's created. // - // [2] d = new Drone(x,y,z,direction) + // [3] d = new Drone(x,y,z,direction) + // // This will create a new Drone at the location you specified using x, y, z // In minecraft, the X axis runs west to east and the Z axis runs north to south. // The direction parameter says what direction you want the drone to face: // 0 = east, 1 = south, 2 = west, 3 = north. // If the direction parameter is omitted, the player's direction is used instead. // - + // When you load() the drone.js javascript file, a default `drone` Object is created at + // the cross-hair's or player's location. + // // movement // ======== //