trinity420 Posted June 21, 2018 Share Posted June 21, 2018 Hey, I use a tiled map for my game. I create sprites from tiles using the command "map.creteFromTiles(<tile ID>, null, 'image', 'solidLayer', blockGroup);". The sprites are created and when I move or tween the sprites, it works fine the sprites move as they should. BUT the tile where the sprite was created from is still there. I can't find it with map.getTile() so I think it's kind of an artifact left and not removed. I think this problem is new, it does not appear with my other groups that I create in the same way. How can I solve this? Thank you! Link to comment Share on other sites More sharing options...
samme Posted June 21, 2018 Share Posted June 21, 2018 I think you need to use replacements = -1 instead of null. Link to comment Share on other sites More sharing options...
trinity420 Posted June 21, 2018 Author Share Posted June 21, 2018 No, does not work. With "-1" the sprites are not even created. Also the documentation says "use null for no replacement". Strange that this happens only with one group/layer. Link to comment Share on other sites More sharing options...
samme Posted June 21, 2018 Share Posted June 21, 2018 I think in this context no replacement means nothing is done at all (leaving the current tile in place). I tried replacements=-1 and it does indeed create sprites and remove the tiles. Maybe double-check your layer arguments. Link to comment Share on other sites More sharing options...
Recommended Posts