There's a couple settings for Lua entities that I'm confused about.
I'm guessing "drawing_scale = 0.7" is drawing images 70% smaller.
I'm more confused on how "shift" works. I can see it's an offset but on how it's applied to the images I have no idea.
Entity image positioning question.
-
- Burner Inserter
- Posts: 5
- Joined: Fri May 10, 2013 2:51 am
- Contact:
Re: Entity image positioning question.
shift moves the place where the picture is drawn, check trees definition
-
- Burner Inserter
- Posts: 5
- Joined: Fri May 10, 2013 2:51 am
- Contact:
Re: Entity image positioning question.
The shift amount is so small I can't map it manually on a image to select my own custom locations to draw at.
Re: Entity image positioning question.
The shift is in tiles, so 1 = 32px
-
- Burner Inserter
- Posts: 5
- Joined: Fri May 10, 2013 2:51 am
- Contact:
Re: Entity image positioning question.
Another question is does the count start from the bottom left of them image?
Like so: (A 96x96 image would be displayed like so)
[7][8][9]
[4][5][6]
[1][2][3]
So if shift = {1,1} would get the bottom left 32x32 section?
Like so: (A 96x96 image would be displayed like so)
[7][8][9]
[4][5][6]
[1][2][3]
So if shift = {1,1} would get the bottom left 32x32 section?
Re: Entity image positioning question.
The center of the picture is centered on the position of the entity.
The shift is the shift of the picture from this position.
So when you do shift {1, 1}, the picture (center) will be 32 px to the right and 32px down.
So 96X96 will have left top corner 16 px above and 16 px on the left of the center of the entity.
The shift is the shift of the picture from this position.
So when you do shift {1, 1}, the picture (center) will be 32 px to the right and 32px down.
So 96X96 will have left top corner 16 px above and 16 px on the left of the center of the entity.
-
- Burner Inserter
- Posts: 5
- Joined: Fri May 10, 2013 2:51 am
- Contact:
Re: Entity image positioning question.
Awesome information very useful. Thank you very much.
-
- Burner Inserter
- Posts: 5
- Joined: Fri May 10, 2013 2:51 am
- Contact:
Re: Entity image positioning question.
Sorry for double posting.
I'm attempting to make a program to help with image placement but I can't get the Fire animation to line up correctly with the furnace using the furnace shift and fire_animation shift numbers.
Any help would be great.
I'm attempting to make a program to help with image placement but I can't get the Fire animation to line up correctly with the furnace using the furnace shift and fire_animation shift numbers.
Any help would be great.
Re: Entity image positioning question.
Ah, interesting.
The problem probably is that the furnace is also scaled down a little bit.
This is just custom value from the time we were testing furnace, and later we will move this option to the picture/animation definition same way shift is there.
PS. What is the reason to use the scale at all? When you use larger image and scale it to 50%, it has more details when you zoom in ...
The problem probably is that the furnace is also scaled down a little bit.
Code: Select all
drawing_scale = 0.7,
PS. What is the reason to use the scale at all? When you use larger image and scale it to 50%, it has more details when you zoom in ...