Jump to content

using puttile to make an 'empty' tile


Recommended Posts

In 1.1.6 i could build up a tilemap by using Tilemap.putTile(tile,x,y,layer). I itterated over my grid and put the tiles in he layers, and when there was no tile in the layer (like when it is a wall-layer and at this tile there is no wall) I could enter null for the tile parameter (otherwise a number which is the tileset index), and there would be no tile rendered.

Now in 2.0.1 when i try the same i get the following errror:

TypeError: this.map.tiles[tile.index] is undefinedset = this.map.tilesets[this.map.tiles[tile.index][2]];

Is there a new way to set a tile to null, or an old way I don't know about?

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.

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.


  • Recently Browsing   0 members

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