8 Direction angle and Mirror/Flip

Get help using Construct 2

Post » Fri Nov 22, 2013 3:16 am

Hi,

I'm trying to have a player mirror the animation as the angle rotates in 180 degrees. I looked into the forum and I found guidance for the usage of bullets and platform, but I couldn't find one for 8 Direction angle behavior.

It is possible to set something like
Player is between angle 0 and 180 -> set player mirrored
Else -> set player not mirrored

I tried but the system is not allowing me to do it. I believe is because I'm using the following condition:

Is in touch, distance (player.x,player.y,touch.x, touch.y) >100*dt
-> move 100*dt pixels at angle angle(player.x,player.y,touch.x, touch.y)
Set angle toward (touch.x, touch.Y)

I think the solution is somewhere there... but I can't see it.

Thanks!
B
8
S
3
G
1
Posts: 135
Reputation: 2,209

Post » Fri Nov 22, 2013 4:26 am

can you do screenshots of your events, or maybe put your capx on dropbox and share it here, because it's a bit hard for me to understand your question

what do you mean by "the system is not allowing me to do it"? does the player animation mirrored or not? have you check the player's angle after the action "set angle toward(touch.x, touch.y)"? because if the angle is between 180 and 360, it doesn't mirrored (based on what I see on your small code)
B
45
S
13
G
2
Posts: 173
Reputation: 5,331

Post » Sat Nov 23, 2013 7:11 am

@Daggio thank you!!!! Here's the capx

Using 8 direction

You can tell that the player looks upside down depending on where you are clicking. I would like the player to just mirror after certain angle... not sure if it is the right approach.
B
8
S
3
G
1
Posts: 135
Reputation: 2,209

Post » Sat Nov 23, 2013 8:09 am

I can't open your CAPX as it's a different version than mine.


But this event setup wont work?

Image
B
45
S
17
G
2
Posts: 201
Reputation: 4,501

Post » Sat Nov 23, 2013 8:24 am

@VictoryX thanks, it is closed, but I have not been able to figure it out... I have been using the r151 from C2.
B
8
S
3
G
1
Posts: 135
Reputation: 2,209


Return to How do I....?

Who is online

Users browsing this forum: dop2000, purplemonkey, tdcostas and 6 guests