Author Topic: New tile is not working correctly  (Read 1982 times)

the bread

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
New tile is not working correctly
« on: February 18, 2015, 09:22:18 pm »
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.

Renkineko

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Re: New tile is not working correctly
« Reply #1 on: February 19, 2015, 07:16:45 am »
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 :)

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1185
    • View Profile
Re: New tile is not working correctly
« Reply #2 on: February 19, 2015, 09:00:40 am »
Or you can also put the tile on a higher layer than the pickable item.