Mirroring Physics?

Get help using Construct 2

Post » Wed Jul 24, 2013 10:29 pm

Hey guys, I got the results I pretty much want, but I can't figure out how to mirror the physics. Right now my mirroring logic for my character is:

If keypress = right arrow
Player is not mirrored

If keypress = left arrow
Player is mirrored

But I'm not sure how to apply the physics to be mirrored when the player takes damage from the right side. Here's my code:


Thanks in advance!
Posts: 17
Reputation: 286

Post » Wed Jul 24, 2013 10:32 pm

Make 2 Sub-Events under "On Colission with enemy".
One for "Player is mirrored"
One for "Player is not mirrored"

Put the same code in both of them, just change the Physics thing for each : )Xionor2013-07-24 22:32:46
Posts: 233
Reputation: 1,537

Post » Wed Jul 24, 2013 11:33 pm

Thank you thank you thank you!

I didn't even know about sub-events haha. So that's how you do if statements! Boy that will make my life a lot easier. I was messing around with functions and all kinds of stuff. I do have one last question, though. I created a variable for the player whether or not it is mirrored. The reason I did that is because when I clicked on "Player > Is mirrored" I didn't see an option for "Player > Is not mirrored" but I've seen youtube videos where it shows the mirrored text X'd out. How would I do that for future reference? Thanks so much again.
Posts: 17
Reputation: 286

Post » Thu Jul 25, 2013 9:15 am

Right click on the event and select "Invert" which as you seem to have gathered, means the opposite.
Posts: 907
Reputation: 41,505

Return to How do I....?

Who is online

Users browsing this forum: ChenBr and 3 guests