Page 1 of 1

[partially solved]How to define an underwater void tile?

Posted: Sun Nov 16, 2014 3:59 am
by GoldenShadowGS
I need to use a void tile and then build the walls, floors and ceiling out of assets. The normal void tile doesn't have underwater Boolean.


edit:
I got this to work on my own.

Code: Select all

defineTile{
  name = "water_void",
  editorIcon = 192,
  color = {0,0,0,255},
  solid = false,
  builder = "dungeon",
  automapTile = “water”,
  underwater = true,
}
edit2: New problem. I set automapTile = water, but it the map is still drawing the tile as ground instead of water. Any ideas?

Re: [partially solved]How to define an underwater void tile?

Posted: Sun Nov 16, 2014 11:57 am
by Doridion
GoldenShadowGS wrote:I need to use a void tile and then build the walls, floors and ceiling out of assets. The normal void tile doesn't have underwater Boolean.
edit2: New problem. I set automapTile = water, but it the map is still drawing the tile as ground instead of water. Any ideas?
It's quite true. There is an "underwater" element, but it's little bit different ;)

To correctly define tile, you must define two elements :

First, the model of the floor/wall/ceiling you'll use on the tileset in the models.lua =>

Code: Select all

defineObject{
   name = "water_floor_tile",
   components = {
      {
      class = "Model",
      model = "mod_assets/models/env/my_tile_model.fbx",
      }
   }
}
Secondly, you can add the model to the Tile definition in the tiles.lua =>

Code: Select all

defineTile{
   name = "user_underwater_tiles",
   editorIcon = 192,
   color = {0,180,200,255},
   solid = false,
   builder = "dungeon",
   underwater = true,
   ceiling = { "dungeon_ceiling", 100 },
   wall = { "dungeon_wall", 100 },
   floor = { "water_floor_tile", 100 },
   ceilingVariations = false,
   automapTile = "water",
}
and there, you got a tileset especially for underwater ;) For the editor, you'll have to add a water_surface element and it will draw your water on the map AND in the game.

Re: [partially solved]How to define an underwater void tile?

Posted: Mon Nov 17, 2014 12:08 am
by GoldenShadowGS
Since all I needed was to change what the map tile was, I found an easier solution. I used defineobject with automaptile = water, instead of definetile. then I can place these invisible helper objects and it makes the map look like water on the tile they are on.