How do I set mirrored with a sizeable thing ?

Get help using Construct 2

Post » Sun Mar 22, 2015 7:17 pm

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 :D
You do not have the required permissions to view the files attached to this post.
B
5
Posts: 10
Reputation: 251

Post » Sun Mar 22, 2015 7:26 pm

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.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,610

Post » Sun Mar 22, 2015 7:37 pm

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
B
5
Posts: 10
Reputation: 251

Post » Sun Mar 22, 2015 8:38 pm

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))
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,610

Post » Sun Mar 22, 2015 8:54 pm

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
B
5
Posts: 10
Reputation: 251


Return to How do I....?

Who is online

Users browsing this forum: iBarin, Jhorbam and 10 guests