Non-squared rotatable entity ?

Place to get help with not working mods / modding interface.
Post Reply
User avatar
StanFear
Fast Inserter
Fast Inserter
Posts: 236
Joined: Sun Dec 15, 2013 2:49 pm
Contact:

Non-squared rotatable entity ?

Post by StanFear »

Hi,
for my subsurface mod, I need to have an entity that is non squared and can be rotated, is there any way to have that ?

I already tried to use the generators, but the problem is, I can only have two animations, and I would need 4 (top-down, down-top, left-right, right-left), I also get the not plugged in icon flashing, which I don't want ...

all my attempts so far has left me with an entity whith a collision box that does not rotate

anyone has an idea ?

Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: Non-squared rotatable entity ?

Post by Supercheese »

As long as the prototype itself allows rotations, you should be able to do this. Of course, not every type does, so you'll have to find one that does.

User avatar
StanFear
Fast Inserter
Fast Inserter
Posts: 236
Joined: Sun Dec 15, 2013 2:49 pm
Contact:

Re: Non-squared rotatable entity ?

Post by StanFear »

Supercheese wrote:As long as the prototype itself allows rotations, you should be able to do this. Of course, not every type does, so you'll have to find one that does.
No, it doesn't work, fluid tanks allow rotation, yet when rotating the collision box stays the same...

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: Non-squared rotatable entity ?

Post by Arch666Angel »

I ran into the same issue, if you rotate a non square entity, the collision box will stay it like it is in the first frame and not rotate.

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: Non-squared rotatable entity ?

Post by GotLag »

Off the top of my head, could you have a rotatable construction placeholder entity that the player puts down, which is removed by a triggered event and replaced by the correctly-oriented working entity?

You'd need to define multiple entites (one for each rotation, plus the placeholder) so it's a bit of a pain in the ass, but at least it should work until such time as this issue ever gets fixed.

User avatar
StanFear
Fast Inserter
Fast Inserter
Posts: 236
Joined: Sun Dec 15, 2013 2:49 pm
Contact:

Re: Non-squared rotatable entity ?

Post by StanFear »

GotLag wrote:Off the top of my head, could you have a rotatable construction placeholder entity that the player puts down, which is removed by a triggered event and replaced by the correctly-oriented working entity?

You'd need to define multiple entites (one for each rotation, plus the placeholder) so it's a bit of a pain in the ass, but at least it should work until such time as this issue ever gets fixed.
well that would be a good idea, but ...
the placeholder would not work correctly to tell if the entity can be placed or not (since it would necesarely have a collision box smaller than the real one ...
plus, I managed to do without this hack so far in my mod (I don't find this hack really 'pretty') I'd really love not to use it now,

I think I'll have to do without non squared entity then ... (unless someone else has a great idea ?)

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: Non-squared rotatable entity ?

Post by Arch666Angel »

I remembered, I think there is a rotatable non square entity in Yuokis mod, the generator or something, maybe you should take a look how he did it.

Post Reply

Return to “Modding help”