FANDOM


So... you want to make your own custom map for the game? Easy... there is a (in-dev) API... (notice: you will need java-script knowledge to use it).

(Full API for map making, See: API)

(For a javascript tutorial, See: http://www.w3schools.com/js/)

for example: buildObject(x, y); this will place a object (#) at the designated coordinates.

Example script:

//Build a house!

devmode = true; //all that does is prevents the enemies from moving and killing you. (optional)

removeArea();

for (i = 0; i < 90; i += 10) {

buildObstacle(420, i);

buildObstacle(500, i);

}

for (i = 420; i < 510; i += 10) {

if (i != 460) {

buildObstacle(i, 80);

}

}

The script above will clear out the level, and build a (somewhat) house... u can even get more advanced... for example:

//Build a house! 2.0

window.addEventListener("keydown", custom, false);


devmode = true;


var room = 1;


function buildRoom() {

room = 1;

removeArea();

for (i = 0; i < 90; i += 10) {

buildObstacle(420, i);

    if (i != 10) {

buildObstacle(500, i);

    }

}

for (i = 420; i < 510; i += 10) {

if (i != 460) {

buildObstacle(i, 80); 

    }

  }

    buildObstacle(510, 10);

}


function custom() {

if (room == 1) {

if (x == 490 && y == 10) {

removeArea();

for (i = 0; i < 90; i += 10) {

    if (i != 10) {

buildObstacle(480, i);

    }

buildObstacle(530, i);

  }

for (i = 480; i < 540; i+= 10) {

buildObstacle(i, 80); 

  }

    room = 2;

buildObstacle(470, 10);

  }

 } else {

  if (x == 490 && y == 10) {

    buildRoom();

    }

  } 

}

buildRoom();

This Example will make a house with 2 rooms, and only shows the room you are currently in. With the right skills, and ideas... the only limit to this is your imagination, and remember... you don't have to rely on my api... you could make your own methods and classes and functions from scratch for even more power over the game, have fun scripting!

Extra: to inject your scripts, use a browsers built in javascript console, get a third-party plugin, or (un-recommended) in the url bar, erase everything and type javascript:your_code_goes_here