Nokdu Posted November 11, 2014 Report Share Posted November 11, 2014 Hi. I was thinking about procedurally creating a dungeon like game.. and was thinking about using tilemaps. is there anyway i can access the raw index of the tiles? for example.. if i do var atilemap = game.add.tilemaps(); is there a way i can do something like.. atilemap.data[j] = 0; any help would be appreciated. thank you Quote Link to comment Share on other sites More sharing options...
CtlAltDel Posted November 11, 2014 Report Share Posted November 11, 2014 var map = game.add.tilemap(); map.addTilesetImage('tileimage'); var layer1 = map.create('level1', 40, 30, 32, 32); var y = 19; for (var x=10;x<30;x++) { map.putTile(0,x, y, layer1); } Quote Link to comment Share on other sites More sharing options...
Nokdu Posted November 12, 2014 Author Report Share Posted November 12, 2014 var map = game.add.tilemap(); map.addTilesetImage('tileimage'); var layer1 = map.create('level1', 40, 30, 32, 32); var y = 19; for (var x=10;x<30;x++) { map.putTile(0,x, y, layer1); }Oh.. ok.. guess that will work.. although i was thinking about something like var s = /* some long map data in csv or a javascript object*/map.feeddata(s, layer1); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.