Navigation

    forum

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    1. Home
    2. Redd500
    3. Topics
    • Flag Profile
    • block_user
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups
    • Blog

    Topics created by Redd500

    • Can the documentation include information like terrain?
      Help • • Redd500

      2
      2
      Posts
      3639
      Views

      function findTerrain(spawn){ if (spawn.room.memory.swamps){ return; } var terrain = spawn.room.lookForAtArea('terrain', 1, 1, 48, 48); var plains = []; var swamps = []; _.each(terrain, function(col, y){ _.each(col, function(cell, x){ if (cell == 'swamp'){ swamps.push(""+ x + "_" + y); } if (cell == 'plain'){ plains.push(""+ x + "_" + y); } }); }); spawn.room.memory.swamps = swamps; spawn.room.memory.plains = plains; }
    • Edge walls are considered plains, at least in simulation mode
      Technical Issues and Bugs • • Redd500

      2
      2
      Posts
      3303
      Views

      Since i ran into the same issue: Running Game.map.getTerrainAt(0,0,'sim') : Result is wallRunning Game.map.getTerrainAt(1,0,'sim') : Result is plain Except for the walls ar the edges all wall tiles are considered plains. It can be worked around by using the "Customize" menu to place edge walls manually. After this has been done the terrain functions as intended.