Easygoing Eyebeast Jerakeen Posted November 17, 2010 Posted November 17, 2010 The idea was a railing along the stairs. It looks OK, and it works as far as preventing movement to the sides, but you'll notice the PC on the right is mostly hidden by the terrain. The same thing happens with one of the east-west stairs. Can anyone tell me what I've done wrong? Here's the code: Click to reveal.. begindefineterrain 506; //railed stairs, this is the one hiding the PC in the screenshot import = 289; //regular stairs te_which_sheet = 524; te_which_icon = 16; te_second_icon = 6; te_second_icon_offset_y = -55; te_move_block_e = 1; begindefineterrain 507; //this one works perfectly import = 506; te_which_icon = 17; te_second_icon = 7; te_move_block_e = 0; te_move_block_w = 1; begindefineterrain 508; //this one is also defective import = 290; //regular stairs te_which_sheet = 524; te_which_icon = 18; te_second_icon = 8; te_second_icon_offset_y = -55; te_move_block_s = 1; begindefineterrain 509; //this one is fine import = 508; te_which_icon = 19; te_second_icon = 9; te_move_block_s = 0; te_move_block_n = 1; What really baffles me is that the ones that do work are imports of the ones that don't. Edit: Oh, duh, I just realized it can't distinguish between one part of the terrain and another; it's treating the whole thing like a wall or fence, so of course it hides the PC. I guess there's no way around this...oh well, I can still use the railings. Quote
Easygoing Eyebeast Enraged Slith Posted November 17, 2010 Posted November 17, 2010 You could always make the railing a separate piece of terran and use the x/y_adjust to make it look like it's on the stairs. Quote
Easygoing Eyebeast Jerakeen Posted November 17, 2010 Author Posted November 17, 2010 Yes, I thought of that today, and it works: But of course you'd need a separate terrain for each height, which is kind of cumbersome if you're using it more than once. Is it worth it? I guess it depends on how obsessive you are. Quote
Well-Actually War Trall Niemand Posted November 17, 2010 Posted November 17, 2010 I'm glad you've got at least a work-around, since I can't seem to grasp what's going on here. In your first post, you say that the terrain with problem shown in the image is 506; is the terrain one space west, which apparently works, 507? Quote
Easygoing Eyebeast Jerakeen Posted November 17, 2010 Author Posted November 17, 2010 Yes. They both work the same; it's just that on 507 the PC is standing on the "near" side of the terrain and is therefore not obscured. Same with the other two: on 509, with the railing to the north, the PCs are visible; on 508, with the railing to the south, they're obscured. (These would be the two terrains visible at the top of the image.) Quote
Well-Actually War Trall Niemand Posted November 18, 2010 Posted November 18, 2010 Oh, of course! The terrains with the problems (506 and 508) are exactly the ones for which the characters need to be drawn on top of one icon, but behind the other. In the case of 507 and 509 the characters get drawn on top of both icons, so there's no confusion. So, there are two problems here, it seems to me. One is that the game is apparently using movement blockage as a heuristic to decide whether terrains are drawn after characters or before. The second is that in some cases it is necessary/desirable for one of a terrain's icons to be drawn before characters, and the other after. One has a limited ability to deal with the first problem by using the cutaway feature of terrains, but there's no way to deal directly with the second, since it would require more complication in the definition of terrains and in the engine's drawing code. Unfortunately, this leads me to conclude that using separate, adjacent terrains, as suggested by ES, is the only way to solve your particular problem. Quote
Easygoing Eyebeast Jerakeen Posted November 18, 2010 Author Posted November 18, 2010 Apparently it's not something that arises very often, if you haven't seen it before. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.