Author Topic: Non-colliding tiles  (Read 793 times)

superbany

  • Member
  • **
  • Posts: 53
  • Karma: +0/-0
  • [Please enter text here]
    • View Profile
    • Superbany's games
Non-colliding tiles
« on: Tue, Mar 29, 2011 »
For my platformer, I want to be able to make one-way platforms, using an embedded png and FlxTilemap for the locations of the platforms. I have a tileset made for the platforms graphics with collideBottom set to false, and with only the top three tiles drawn (both upper corners and the floor) to create the appearance of a small bridge.

You can see it here:
http://www.newgrounds.com/dump/item/051720a5136a54a27e994162aba51217
[Use WASD control, J to jump. Press B to see boundaries. Climb up to the right to see the brown platform above. Once on top, you can use the arrow keys to fall back through]

However, because I'm using FlxTilemap, the long horizontal platforms are split into two rows of blocks (only the top one drawn at all), each colliding with the player. This is not a problem most of the time, but jumping at exactly the right height can get the player to land in between the two rows, either causing them to appear to float in air or to warp up on top of the platform.

The best solution I can see would be to keep the player from colliding with this lower row of tiles, and only the higher one. I'm ok with the player warping up to on top of the platform a little bit, just not from this great of a distance.
Is there any way to change the <solid> variable to false for just these three lower tiles? And if not, are there any better ways to do what I'm trying here?