AlexArroyoDuque Posted May 12, 2014 Report Share Posted May 12, 2014 Hello! I have this error on console: Tilemap.createFromObjects: Invalid ObjectGroup name given: objects I had not used before "createFromObjects" so I do not really understand the reason for what I'm doing wrong. This is my code inspirated in @valueerror code: // map this.map = this.game.add.tilemap('level2_2'); this.map.addTilesetImage('sprite'); this.map.setCollisionBetween(0, 238); this.layer = this.map.createLayer('Level'); // this.layer.debug = true; this.layer.resizeWorld(); this.layer_tiles = this.game.physics.p2.convertTilemap(this.map, this.layer); this.customPlatform = this.game.add.group(); this.map.createFromObjects('objects', 10, 'sprite', 10, true, false, this.customPlatform); this.customPlatform.forEach(setupMovingPlatforms, this); this.layerobjects_tiles = this.game.physics.p2.convertCollisionObjects(this.map, 'objects'); Any help? A greeting. Quote Link to comment Share on other sites More sharing options...
AngryMoose Posted May 12, 2014 Report Share Posted May 12, 2014 "objects" should be the name of your "object layer" in Tiled, found in the JSON:{ "height":7, "name":"buildings", "objects":[ <--------- { "gid":1, "height":0, "name":"", "properties": {... AlexArroyoDuque and Pooya72 2 Quote Link to comment Share on other sites More sharing options...
AlexArroyoDuque Posted May 12, 2014 Author Report Share Posted May 12, 2014 thanks! 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.