Jump to content

putTile(); What is the tile index?


Doodlemeat
 Share

Recommended Posts

Hello.

 

I am playing around with Phaser tilemap and I stumbled upon the putTile() method which is very neat except from one thing. I don't understand the first parameter.

 

map.putTile(1, 0, 0, backgroundLayer);

 

To get the first image, located in the upper left corner, I have to put 1 as the tile index, but I think that is wrong. 0 is the first index position and therefore, it should work if I put a 0 as first parameter. But if I do that, I get this error message: 

  1. Uncaught TypeError: Cannot read property '2' of undefined phaser.js:53733

 

I am using Phaser 2.0.4

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...