Page 1 of 1

Workaround for a fixed render layer object?

Posted: Sun Apr 17, 2016 8:59 pm
by simonsays476
I made an in-ground lamp with the collision_mask = { "item-layer", "object-layer", "water-tile" } so that players and vehicles don't collide with it. Unfortunately, it's giving me this graphical bug:
Capture.PNG
Capture.PNG (164.65 KiB) Viewed 2343 times
I searched around and found out it was a render layer issue but setting it to something lower doesn't do anything so I'm guessing lamps have the render_layer hardcoded. Is there an easy way around this?

Re: Workaround for a fixed render layer object?

Posted: Sun Apr 17, 2016 9:37 pm
by bloc97
I think that the layers={{shift= {x,y}} changes the layer. If Y is 0, it is on the ground, and if it is positive, it should be under the ground.

Re: Workaround for a fixed render layer object?

Posted: Sun Apr 17, 2016 10:31 pm
by Adil
bloc97 wrote:I think that the layers={{shift= {x,y}} changes the layer. If Y is 0, it is on the ground, and if it is positive, it should be under the ground.
Nope, that's shift on west-east and north-south directions.

@op
There are such fields as render_layer and priority in drawing related parts of the prototype definitions though I know nothing about their works. You might be the first to figure out, how to use those.

Re: Workaround for a fixed render layer object?

Posted: Sun Apr 17, 2016 10:41 pm
by keyboardhack
Add this to the prototype.

Code: Select all

render_layer = "lower-object"
You can find the different render layers here

Re: Workaround for a fixed render layer object?

Posted: Mon Apr 18, 2016 4:29 am
by bloc97
Adil wrote: Nope, that's shift on west-east and north-south directions. [...]
I've definitively noticed a change of layering of the sprites when I changed the shift values. When I made the Y shift less than the player, the player walks over the object. When the Y value is very high, it overshadows trees, assemblers, etc.

Edit: There's something going around inside the game engine that automatically assigns layers based on render_layer and shift...

Re: Workaround for a fixed render layer object?

Posted: Fri Dec 30, 2016 3:32 am
by Ace-Athor
Have you found a solution? I have a similar problem for a building. viewtopic.php?f=25&t=38974