[Probably unsolvable]Render an entity in the background

Place to get help with not working mods / modding interface.
Villfuk02
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Mon Apr 30, 2018 7:23 am
Contact:

[Probably unsolvable]Render an entity in the background

Post 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?
Last edited by Villfuk02 on Tue May 01, 2018 2:01 pm, edited 1 time in total.
Bilka
Factorio Staff
Factorio Staff
Posts: 3470
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Render an entity in the background

Post 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
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Villfuk02
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Mon Apr 30, 2018 7:23 am
Contact:

Re: Render an entity in the background

Post by Villfuk02 »

So I guess for assembling-machine it is not possible. Is there any workaround?
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Render an entity in the background

Post 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?
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

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

Post by darkfrei »

Make big sprites with alpha gap and shift this picture higher/ lower.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

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

Post 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.
Villfuk02
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Mon Apr 30, 2018 7:23 am
Contact:

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

Post 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?
Post Reply

Return to “Modding help”