Flipping Object Changes Width

when I flip an object, the width of the object turns into a negative number:

but if you set the size after you flip the object, the width is a positive number again
i don’t think this should happen

9 Likes

i think flip is the same as “set width to 0-self.width” but i’m not sure

5 Likes

That is probably correct.

3 Likes

yes that makes sense, this part makes it confusing though:

and the display doesn’t change

5 Likes

The set size probably just updates it or smth but doesn’t affect it. Idk

3 Likes

this may be a bug

3 Likes

That’s interesting! Since it isn’t consistent if you update the size, it doesn’t sound like a feature. If it was consistent, then an “is flipped” conditional could become a thing.

3 Likes

It is consistent. Here’s what it’s doing:

  1. Regardless off ‘Flipped state’;
    • positive width, faces right
    • negative width, faces left
  2. ‘Flip’ changes the sign of the Width
    • Refer to #1 for which direction the object then faces
  3. When using Set Width (…) Height (…)
    • If ‘Flipped’, the Width is set to the opposite sign of the value entered
    • Refer to #1 for which direction the object then faces

I don’t see a bug. But I tried to check the project linked in the OP and it appears to have been unpublished.

4 Likes

It already is a thing :wink:


And, of course, both can also be combined with ‘not’

3 Likes

Oh, I didn’t realize that it existed. If you set the size after you flip the object though, does the “flipped” conditional still work? That would be interesting to test to determine whether this is a bug or intended behavior.

2 Likes


:hushed:
it’s not positive for me

2 Likes

Set Size just multiplies the Width and Height values. So if the Width is negative (say you used the Flip block), then Set Size 200% just multiplies the width by 2 (stays negative). And the Flipped conditional & rules continue to work as expected, from what I’ve seen.

3 Likes

Same here. So I was assuming they might have meant Set Height/Width instead of “size”…

3 Likes

@Nobody should look up (no one should look up /j)

1 Like

nevermind, I thought I had readded something in my code, which I didn’t

I only noticed this because my x-collision code wasn’t working because of the flip block—it took me a while to realize that this was why

2 Likes