Advertisement
Jhynjhiruu

Untitled

Aug 16th, 2018
786
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. _root.LoadCourseFromCode = function(code)
  2. {
  3.    trace("Load from Code");
  4.    _root.RemoveLevelDesigner();
  5.    _root.TileArray = [];
  6.    _root.GridXSize = 50;
  7.    _root.GridYSize = 30;
  8.    _root.LDItemArray = [];
  9.    avar = "";
  10.    code = code.split("~");
  11.    _root.GridXSize = Number(code[0].split("x")[0]);
  12.    _root.GridYSize = Number(code[0].split("x")[1]);
  13.    _root.LDMusic = Number(code[3]);
  14.    _root.LDCourseBG = Number(code[4]);
  15.    _root.LDCourseName = String(code[5]);
  16.    _root.TileArray = _root.ExpandNumbers(code[1]);
  17.    _root.LDItemArray = code[2].split("|");
  18.    i = 0;
  19.    while(i < _root.LDItemArray.length)
  20.    {
  21.       _root.LDItemArray[i] = _root.LDItemArray[i].split(",");
  22.       i++;
  23.    }
  24.    MaxX = _root.GridXSize;
  25.    MaxY = _root.GridYSize;
  26.    _root.CreateLevelDesigner();
  27. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement