Author Topic: Black Water Problem.  (Read 874 times)

Legacy_Sadira of Tyr

  • Sr. Member
  • ****
  • Posts: 299
  • Karma: +0/-0
Black Water Problem.
« on: December 01, 2010, 03:43:07 am »


               First of all, I'm still learning the toolset, so I apologize if this has been asked before. I did a search, but I did not find anything. I'm trying to make a sewer area, and I wanted to put some parts of the area partly filled with water or sewage. i am using the stair tiles with transitions to make the area lower in some spots, and I am using the low water placeables to make the area appear to be filled with water.

The problem I am having is that when I test the area, when I reach the parts filled with water, the first water placeable always appears black. The other water placeables after looked fine, but the first one is always black. I go through the water parts and come back, and everything is fine, but I can't figure out why the first part is black when I first enter the area.
 
Is there any way I can fix this? Any help is appreciated. Thank you.
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Black Water Problem.
« Reply #1 on: December 01, 2010, 04:44:02 am »


               I've had this problem before, and though I don't remember the technical reasons that caused it, I do remember the fix. First, make sure that the center of the tile is within the x and y boundaries of the area - if not, center it (you may have to use some smaller tiles to achieve this areawide).



If that isn't the issue, adjust the height of the water tiles upwards slightly (only the effected one HAS to be moved, but I assume you want them all level). I seem to recall this is a peculiarity of some tiles and not others - it was an issue on an ice desert map for me, most recently (ice tiles in desert tileset).



Funky
               
               

               
            

Legacy_Sadira of Tyr

  • Sr. Member
  • ****
  • Posts: 299
  • Karma: +0/-0
Black Water Problem.
« Reply #2 on: December 01, 2010, 10:56:44 am »


               Ok, I'll try that. Thank you.
               
               

               
            

Legacy_Sadira of Tyr

  • Sr. Member
  • ****
  • Posts: 299
  • Karma: +0/-0
Black Water Problem.
« Reply #3 on: December 02, 2010, 02:42:45 am »


               Well I tried it, but the first water tile is still black. '<img'>

Could it have something to do with shadows or area lighting?
               
               

               


                     Modifié par Sadira of Tyr, 02 décembre 2010 - 02:44 .
                     
                  


            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Black Water Problem.
« Reply #4 on: December 02, 2010, 03:43:17 am »


               It could, though I've only seen that on a couple tiles, like some of the flowing water in organic caves, and I don't think I've seen it there without some fairly high z values. Which water places are you using, and at what height?



Funky
               
               

               
            

Legacy_Tyndrel

  • Sr. Member
  • ****
  • Posts: 313
  • Karma: +0/-0
Black Water Problem.
« Reply #5 on: December 02, 2010, 08:18:05 am »


               I suspect that you need to be able to see the centre of the placeable, I know of a world where there is an area that uses a bone covered floor placeable but walking round the corridors the floor is black only to turn magically to bones when you open the door to a room in the centre.

I use this script to do the same thing as you are doing, put it in the "onenter" event of the area properties. The script was originally by Vinos though he doesn't seem to be around anymore. I've just adapted it to flood any area with any floor effect I need (find others at the bottom of the constants list in the script editor). Alter the height by changing the number at the end of the last line.

//  a_tile_sewer_oe
//
//Floods the area with sewer water at a height of 2.5
//

#include "x2_inc_toollib"
void main()
{
if(GetLocalInt(OBJECT_SELF, "area_flooded") == TRUE) return;
SetLocalInt(OBJECT_SELF, "area_flooded", TRUE);
int iWidth = GetAreaSize(AREA_WIDTH, GetArea(OBJECT_SELF));
int iHeight = GetAreaSize(AREA_HEIGHT, GetArea(OBJECT_SELF));
TLChangeAreaGroundTiles(GetArea(OBJECT_SELF),X2_TL_GROUNDTILE_SEWER_WATER,iWidth,iHeight, 2.5f);
}


Hope this helps  '<img'>
               
               

               


                     Modifié par Tyndrel, 02 décembre 2010 - 08:18 .
                     
                  


            

Legacy_Sadira of Tyr

  • Sr. Member
  • ****
  • Posts: 299
  • Karma: +0/-0
Black Water Problem.
« Reply #6 on: December 02, 2010, 10:58:50 am »


               That may be the problem. I tried changing them around, and I put a small tile by the door with the stairs. That tile looked fine, but the large tile I put after was black. However once I started moving through the area, the colour changed back to normal, so maybe I saw the center then. I'm using the large and small tiles of medium height water, and I put the height at 0.05. I don't know much about scripting at the moment. I just want parts of the area under water.

Thank you for helping me. 'Image
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Black Water Problem.
« Reply #7 on: December 02, 2010, 08:21:58 pm »


               

Tyndrel wrote...

I suspect that you need to be able to see the centre of the placeable, I know of a world where there is an area that uses a bone covered floor placeable but walking round the corridors the floor is black only to turn magically to bones when you open the door to a room in the centre.

Actiually no, this isn't it, though placables will in fact fade out of sight if the center is out of the character's visual range (intended optimization). The key is walkability - the center must be in a walkable area, though why this is, is beyond me. In most cases, raising it will cure the defect.

I would suggest using low rather than medium water, and raising it significantly - a couple of meters (2.0) should do the trick.

Funky
               
               

               
            

Legacy_Sadira of Tyr

  • Sr. Member
  • ****
  • Posts: 299
  • Karma: +0/-0
Black Water Problem.
« Reply #8 on: December 03, 2010, 12:36:53 am »


               Yay! It's working ok now. Thank you so much. ':wub:'