Jump to content

Changing scml animation x-scale to negative value (example -1.00000 instead of 1.00000) makes the prefab using that animation can't be highlighted/selected/examined


Recommended Posts

Hello, like the title says when I make a prefab that has a negative x-scale in Spriter it seems in game you can't highlight/select the prefab until the animation doesn't have a negative x-scale anymore, I was wondering if anyone has a fix for this other than copy-pasting the prefab images and flipping them images in art software essentially doubling the anim folder's size :wilsondisappointed:..

I posted this in the mods and tools area even though it sounds like a bug because I don't know if this effects vanilla and if it doesn't then bugs related to modding I doubt Klei wants in the bugs area.. thanks for taking the time to read!

Link to comment
Share on other sites

Huh, this is kind of an interesting bug I didn't know about as someone who uses spriter a lot. good to know.

when you say the animation is flipped, do you mean the object on screen? Is there only one object in the spriter animation?

If that's the case, you you shouldn't need to do any inverting. are you using code to stretch you animation scale instead of just making it two-faced? "inst.Transform:SetTwoFaced()"

Link to comment
Share on other sites

12 minutes ago, pickleplayer said:

when you say the animation is flipped, do you mean the object on screen? Is there only one object in the spriter animation?

If that's the case, you you shouldn't need to do any inverting. are you using code to stretch you animation scale instead of just making it two-faced? "inst.Transform:SetTwoFaced()"

Basically, for some of my structures I have flipped animations mostly for aesthetic reasons to make fancier stuff with them and more customization.a.png.f39995fe804252ad68336b62e9e678ea.png

Like here's 1 structure which has a flipped x-scale idle, I tried using "inst.Transform:SetTwoFaced()" right now and it seems that all it did was make it  that at certain rotations the structure flips which wouldn't allow for something like what you see in the image since they would always be in the same direction I think?

Anyways thanks for replying! I guess then having a flipped symbol is what it is since I doubt this bug would get fixed any time soon if ever :wilson_dead:

Link to comment
Share on other sites

Hey did you remember to setrotation(-180) in addition to two facing?

I believe that is how trees and other simple structures do it. You could possibly make it spawn based on direction your facing locked at certain angles like 45 degree increments. Similar to I believe how walls are placed.

Its been a while since I dabbled with this stuff. So forgive me if I used the wrong syntax.

Link to comment
Share on other sites

yea,  inst.Transform:SetRotation(180)  should be the one.

setting it to two-faced (or more) removes its ability to be inverted manually by stretching the x axis in a negative direction, and instead must be turned around with rotation, like above. I think.

btw those are some killer statues. masterpiece 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...