Jump to content

Search the Community

Showing results for tags 'objectgroup'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hi there. I'm an experienced JS dev looking to get into Game Development. I've started out with a fairly small top-down "rpg" style game. I'm used the program "Tiled" to create the world map. So far i've been following this tutorial to get started, learn the basics of Phaser, but now i'm unfortunately running into this problem. This tutorial is about 2 years old, and uses it's own "object" generator, however i'd really like to use Phaser's native `.createFromObjects` function. My code is as follows; this.map = this.game.add.tilemap("world"); this.map.addTilesetImage("sheet", "spritesheet"); let map = this.map; let objects = this.game.add.group(); objects.enableBody = true; this.map.objects.objects.forEach(function(element) { map.createFromObjects(element.name, element.gid, element.properties.sprite, 0, true, false, objects); }); The error I receive in the console; Tilemap.createFromObjects: Invalid objectgroup name given: goldCoins Tilemap.createFromObjects: Invalid objectgroup name given: playerSpawn Tilemap.createFromObjects: Invalid objectgroup name given: goldCoins Tilemap.createFromObjects: Invalid objectgroup name given: campFire Tilemap.createFromObjects: Invalid objectgroup name given: stool Tilemap.createFromObjects: Invalid objectgroup name given: sign I've cut out the majority of the code for sake of saving space in this forum post, but the full code is available here. I've already looked up multiple forum posts, each with their own solutions to fix the bug i'm experiencing, however none have worked. I've tried replacing the "groups" param with the Tiled object's name, as per this post, but i'm unable to find a fix for this. I'd appreciate any help anyone may provide for me.
×
×
  • Create New...