Jump to content

map.setTileIndexCallback doesn't work, what am I doing wrong?


Recommended Posts

I made a tiled map with 2 tiles from a spritesheet I found online somewhere.  The floor tile is index 2 in the tilesheet, and the "lava" tile is index 245 in the sprite sheet.  I can post the relevant exported json from tile if need be.   The map loads correctly, physics is "correct" in that the player collides with the floor tile and passes through the lava tile.


My problem is that I can't seem to get the "burn" callback to fire using the following code.  no console messages are spit out.  


I'm not sure what I'm doing wrong that this callback doesn't happen.  I'm using the following example, http://examples.phaser.io/_site/view_full.html?d=tilemaps&f=tile+callbacks.js&t=tile%20callbacks, but it's using arcade physics and not p2 physics.  I think I need p2 physics because in theory I'm going to be making some swinging ropes.


Any thoughts on what I'm doing wrong?

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