How do I Reverse Player

  • I posted in a previous post about something similar to this and got great help from on of the users.

    The game is a player who is stood on a moving platform. The platform is thin (30pixels) and is positioned in the centre of the screen. Therefore both the top and bottom of the platform are visible.

    There is a button allowing the player to flip to the underside of the platform with the use of a button which i created through a 'sprite'.

    The player moves to the co-ordinates specified. The problem is that the player himself is not reversed. What i mean by this is that instead his body moves to the correct position but his body itself is not turned upside down (his head is on the underside of the platform, not his feet). How would i go about doing this with the use of the sprite button that i've already created???

    I tried attaching an image but an SQL error comes up on the website

    Thank You!!

  • You can use a Rotate action "Rotate clockwise 180 degrees"

  • Yes the forum seems to be having some problems with attachments lately.

    You can use "set flipped" in the player object's actions to flip the sprite vertically; mirrored is the same, but for horizontal.

    Also, this flips, pixel for pixel, rather than Knight05 's rotate solution. It depends how you want it to be flipped.

    Edit: If you rotate, you will be facing the wrong direction, and will have to use mirror.

  • thank you. So if I use "on touch with" - "sprite button" - "mirror player" it will mirror it back to the correct position when the flip button is pressed again, it doesnt need an instant variable or anything?

  • You'll just have to check if it is flipped or not when you do, since there's no toggle for it.

  • thank you so much

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Works a treat!

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