How do I set mirrored with a sizeable thing ?

0 favourites
  • 5 posts
From the Asset Store
A whole set you need to create a gorgeous winter 2d game
  • Here's my problem, at first my sprite was doing the mirror-thing fine, Left arrow and he was going to the left, right arrow and he was going to the right, you got the point.

    But since I did the "Set size to ....", my sprite no longer turns to the left, why's that ? Only the Not Mirrored event works, seems like the Mirrored state is blocked by the Every tick thing

    How can I resolve this ? Thanks

  • Mirroring sets the width to a negative value. If the sprite width is 100px and you mirror it, it becomes -100px. So when you change the size you need to set it to a negative value if you want it mirrored.

  • Hi, it doesn't work, I did "On left arrow pressed, set size to (-Sprite.Width, Sprite.Height) and it's still locked for some reason

  • No, in the set size action in your screenshot where you set the width to (320 - (Sprite.X/7)), you need to set it to -(320 - (Sprite.X/7)) if the sprite is mirrored.

    In other words:

    if not mirrored: set width to (320 - (Sprite.X/7))

    if mirrored: set width to -(320 - (Sprite.X/7))

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Alright I'm getting close, now it's just that the value doesn't follow, but I'll try to figure out how to do it, thanks a lot

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)