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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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