[RESOLVED] How to access a tile's properties?

[RESOLVED] How to access a tile's properties?
0.0 0


I’m following this tutorial: http://www.raywenderlich.com/40544/cocos2d-x-tile-map-tutorial-part-2

It’s for C++ and not JS, but all the code works with minor modifications, except for the following:

*collision = *properties->valueForKey("collidable"); (in c++) becomes collision = properties.valueForKey("collidable"); but I get a console error saying that “valueForKey” is not a function. So I’m left to wonder how do I access the tile’s properties.

I have also tried properties.valueOf("collidable"), properties.collidable and properties.["collidable"]. I literally have no clue what else to do.

Many thanks to any who may shine some light upon this.

edit: this has been fixed in latest github version. properties.collidable and properties.["collidable"] both work just fine.


Thank,start learning the tutorial too,noted it for feature review.:slight_smile: