virginia_games Posted March 6, 2015 Share Posted March 6, 2015 I'm having trouble using Phaser's TileMap.shuffle. When I use it, it shuffles the area of tiles like it should, but the tiles lose their unique properties after being shuffled. Is there some way I can shuffle tiles without losing collision properties? I'm using shuffle like this: myTileMap.setCollision(tileID, true, layer); // set a few collisionsmyTileMap.setTileIndexCallback(tileID, function (player, tile) { // I have two callbacks // do stuff myTileMap.shuffle(tile.x, tile.y, 5, 5, layer); // call shuffle }, game, walls); When the callback runs, the 5x5 area on the map loses its specific tile properties. Inside the callback, I can re-set the collision tiles, but I can't rewrite the callback I am in. Is there another way I should be going about achieving this? Thank you. jamesjsewell 1 Link to comment Share on other sites More sharing options...
jamesjsewell Posted February 23, 2018 Share Posted February 23, 2018 Replying in hopes that this might get seen, need help with this too Link to comment Share on other sites More sharing options...
jamesjsewell Posted February 23, 2018 Share Posted February 23, 2018 https://github.com/photonstorm/phaser-ce/issues/484 Link to comment Share on other sites More sharing options...
samme Posted February 23, 2018 Share Posted February 23, 2018 Phaser.Tilemap#setPreventRecalculate Link to comment Share on other sites More sharing options...
Recommended Posts