Mirroring Physics?

  • 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:

    nomadicgamesonline.com/images/myphysics.PNG

    Thanks in advance!

  • 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 : )

  • Thank you thank you thank you! <img src="smileys/smiley32.gif" border="0" align="middle" />

    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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Right click on the event and select "Invert" which as you seem to have gathered, means the opposite.

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