Is there a way to add anything extra to a specific tile?



  • Okay so it's sort of the same problem as when I needed to tint a specific tile. In order to blink a specific tile, the tile needs to have some sort of field indicating it's supposed to blink. I'm doing my fake text mode, and was using sprites for the foreground characters. I could color a while character to whatever I needed. Of course to add blinking capability to the sprite, I had to extend the sprite and make my own subclass, which added the blink field and some code in the update function to execute it. Now that I'm using tiles again, I no longer need to tint the sprite because I'm using an image that has all 16 colors in it. But I do still need to add some sort of blinking field. Is there any unused fields/variables in the FlxTile classes, or do I need to look for some other way to add blinking capability? I don't believe I can extend the FlxTile class without having to modify FlxTilemap to use it. The only other way I can think of is to create an array to store the location of a tile that needs to blink and then update the blink on each tile in my update function -- Then I can't really use the visible flag, but I can modify alpha I think. Any other suggestions?


Log in to reply