How to position entity image?

Place to get help with not working mods / modding interface.
Post Reply
ElGaucho
Burner Inserter
Burner Inserter
Posts: 19
Joined: Mon Mar 27, 2017 9:27 pm
Contact:

How to position entity image?

Post by ElGaucho »

I just created a mod which derives from the loader entity. One of the differences is, that the new entity is 6 tiles high and 1 tile wide, not 2x1 like the original loader is. The loader is supposed to be aligned at one side, so i've offcentered the entity by setting the selection_box to {{ -0.5, 5 }, { 0.5, 1 }, which does the job. I've added a custom image of, being 32px*192px. However, as the entity is not centered with its selection_box and collision_box, the image is always drawn around the original center, which does not overlap with the entity itself. Is there a possibility to say where the center of the entity is, so that the image is drawn properly ?

I've tried drawing_box, but this has only effect on the small overlay, not the game overlay.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: How to position entity image?

Post by darkfrei »

Are you mean shift tool viewtopic.php?f=135&t=44345?

ElGaucho
Burner Inserter
Burner Inserter
Posts: 19
Joined: Mon Mar 27, 2017 9:27 pm
Contact:

Re: How to position entity image?

Post by ElGaucho »

That looks promising! So basically all i need to do is set the shift property to an appropriate value? Awesome!

Post Reply

Return to “Modding help”