Jump to content

Where are my gids?


TaylorN
 Share

Recommended Posts

I'm trying to create a "zone" around body's of water where a player can fish. To do so, I'm using tiled and drawing a rectangle object around the bodies of water. This "zone" ideally is invisible, but could also just be tiles.

I'm trying to use the createFromObjects() method on my map. I'm following the phaser example, and looking at the docs. One of the required parameters is the gid. However my json export simply does not contain a gid property. It has an id for the objects, which I've tried to use, and I've even created the gid manually by typing it into the json. However both of these just create objects with 0 width and height.

What am I doing wrong? How do get objects from Tiled into phaser? I'm also open to trying createFromTiles to accomplish this goal or any other advice.

Game.js

beach.json

Boot.js

main.js

Preload.js

index.html

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...