Jump to content

Is it possible to this.map.setTileIndexCallback as a true or false sensor?


Recommended Posts

I've got this overlap callback working, so when my sprite overlaps with the ladder it returns the ladderMode fuction. Like such:

this.map.setTileIndexCallback([33, 43, 51, 61], this.ladderMode, this, this.ladderLayer);


Is it possible to make this a true or false callback? So that when i'm overlapping and this.ladderMode occurs it just returns for example ladderStatus = true;

and then when there's no overlap ladderStatus reverts to false?


i need it for this:

update: function () { 

if(ladderStatus) {

gravity = 0;

} else {

gravity = 130;



Thank you for your time.

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