How to use FlxTilemap.setTileProperties

57 views
Skip to first unread message

talkingalone

unread,
Oct 24, 2015, 1:41:45 PM10/24/15
to HaxeFlixel
I'm trying to set some tiles to be collidable. In the FlxTilemap.setTileProperties method, the documentation says the following:

Tile: The tile or tiles you want to adjust.

Is this referring to the tile type (i.e, the number of the tile in the tilesheet) or to the number of the tile in the map (i.e, the position of an "instantiated" tile in the map)?

I'm also confused about the content of FlxTilemap._tileObjects:

Internal collection of tile objects, one for each type of tile in the map (NOTE one for every single tile in the whole map).

This documentation is quite confusing... To me, the note means the complete opposite of the previous sentence.

Can someone clarify this to me?

Thank you.

Gama11

unread,
Oct 24, 2015, 3:16:28 PM10/24/15
to HaxeFlixel
Pretty sure the "NOTE" is actually a typo (one that's been around since AS3 it looks like!) and supposed to mean "NOT". :)

So yeah, the setTileProperties() Tile param is referring to the tile type. Check flixel-demos for usage examples.

talkingalone

unread,
Oct 24, 2015, 4:54:02 PM10/24/15
to HaxeFlixel
Ahhh, that explains everything, thank you!!
Reply all
Reply to author
Forward
0 new messages