How do I Reverse Player

Get help using Construct 2

Post » Sun Mar 22, 2015 1:38 am

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!!
B
8
S
2
Posts: 146
Reputation: 1,132

Post » Sun Mar 22, 2015 1:50 am

You can use a Rotate action "Rotate clockwise 180 degrees"
B
22
S
3
Posts: 67
Reputation: 1,124

Post » Sun Mar 22, 2015 1:57 am

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.
Image
B
42
S
14
G
3
Posts: 165
Reputation: 5,115

Post » Sun Mar 22, 2015 2:33 am

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?
B
8
S
2
Posts: 146
Reputation: 1,132

Post » Sun Mar 22, 2015 2:42 am

You'll just have to check if it is flipped or not when you do, since there's no toggle for it.
Image
B
42
S
14
G
3
Posts: 165
Reputation: 5,115

Post » Sun Mar 22, 2015 4:13 am

thank you so much :)
B
8
S
2
Posts: 146
Reputation: 1,132

Post » Sun Mar 22, 2015 4:16 am

Works a treat!
B
8
S
2
Posts: 146
Reputation: 1,132


Return to How do I....?

Who is online

Users browsing this forum: DiegoSanudoDT and 9 guests