Page 1 of 1

[Probably unsolvable]Render an entity in the background

Posted: Tue May 01, 2018 10:31 am
by Villfuk02
I created a new entity which you can walk on, but when the player is standing on the upper half, the entity is rendered in front of the player. I want it to always be rendered behind the player, like belts do. How can i do that?

Re: Render an entity in the background

Posted: Tue May 01, 2018 10:43 am
by Bilka
Use and entity that can have the render layer set (trivial-smoke, smoke-with-trigger, car, simple-entity, simple-entity-with-owner, simple-entity-with-force, corpse, electric-energy-interface), and set the render layer: https://wiki.factorio.com/Types/RenderLayer

Re: Render an entity in the background

Posted: Tue May 01, 2018 10:55 am
by Villfuk02
So I guess for assembling-machine it is not possible. Is there any workaround?

Re: Render an entity in the background

Posted: Wed May 02, 2018 12:24 am
by eradicator
Villfuk02 wrote:So I guess for assembling-machine it is not possible. Is there any workaround?
Invisible assembling machine with graphic-only entity on top that does support layer?

Re: [Probably unsolvable]Render an entity in the background

Posted: Wed May 02, 2018 7:21 am
by darkfrei
Make big sprites with alpha gap and shift this picture higher/ lower.

Re: [Probably unsolvable]Render an entity in the background

Posted: Wed May 02, 2018 8:39 am
by eradicator
darkfrei wrote:Make big sprites with alpha gap and shift this picture higher/ lower.
Interesting hack. Waste precious video memory though, so should be used carefully.

Re: [Probably unsolvable]Render an entity in the background

Posted: Wed May 02, 2018 6:22 pm
by Villfuk02
Make big sprites with alpha gap and shift this picture higher/ lower.
I tried making the picture double the height with the upper half transparent and then shifting it back by 2 tiles.
(it is a part of animation)

Code: Select all

width = 128,
height = 256,
frame_count = 1,
line_length = 1,
shift = {0.0, -2.0},
It seems to make no difference just as I thought. Am I doing something wrong?