New tile is not working correctly

Started by the bread, February 18, 2015, 09:22:18 PM

Previous topic - Next topic
I've just added my own tile to the tileset "house" of the alttp-pack. I inserted it into the house.tiles.png file with GIMP and marked it as a new tile in the tileset-editor of the game-creation editor. It has got the ground "empty" and the default layer low. Displaying the tile in my maps works fine, but bringing the tile to the front doesn't seem to work properly on the tile. I wanted it to overlap the sprite of an item ("apples") that is on the low layer too, but whatever I do, the apples are always over the tile, not the other way round. However, my new tile overlaps the ground of the house properly. Have I done anything wrong at creating the tile, or can't a tile from the tileset be higher than the sprite of an entity. Any ideas???
I would appreciate any help very much.
Thanks, the bread.

An interactive entity (item, enemy, dynamic tilen etc.) will always be on top of the static tiles. If you want a tile to be in front of an item, you have to set it as dynamic on the map you use it and play with the functions bring to front ( http://www.solarus-games.org/doc/latest/lua_api_entity.html#lua_api_entity_bring_to_front ) and bring to back ( http://www.solarus-games.org/doc/latest/lua_api_entity.html#lua_api_entity_bring_to_back ) if the apple is created dynamically.

Hope it helps :)

Or you can also put the tile on a higher layer than the pickable item.