How do I fix my animation

Get help using Construct 2

Post » Fri May 19, 2017 1:14 pm

So I'm new to construct 2. I saw it years ago but have only currently started using it. So I'm kind of a newb. the answer may be obvious but it has eluded me for days.


I've got the following issue. I want the player sprite to rotate only when the mouse button is down. And since it's a platformer. I want to flip it when the mouse goes to the other side of the player to stop it from doing sommersaults. The problem being that when the code ends my image is sometimes flipped. sometimes upside down. sometimes it's the way it is supposed to be. But I have no clue how to make it so it is always in the right position.

code below, Any help would be appreciated

Image
B
9
Posts: 9
Reputation: 345

Post » Fri May 19, 2017 1:42 pm

Do all the animations have more then 1 frame and are they playing ?
To my knowledge, you can not name an animation to 7 or 6, so what are those 'set animation to "6" doing ?
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri May 19, 2017 3:09 pm

The animation is a variable. sorry should have explained that.
The variable sets the animation to a different one. That command is literally if variable = 6 set animation to bow (play from beginning) etc. I'm stopping the animation there so if you are moving the animation of bow remains active. all animations have multiple frames.

yet the issue is that it flips the animation. I need a way to make sure that the animation restores to the "default" position. without it being mirrored the wrong way or upside down
B
9
Posts: 9
Reputation: 345

Post » Fri May 19, 2017 8:03 pm

I have should have seen that it is a variable.
Still dont understand the flow.

But.
Is this helping ?
https://www.dropbox.com/s/q8ba5y0ukogr5 ... .capx?dl=0
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri May 19, 2017 8:31 pm

I actually went a different route.
The flow might not make any sense so that's not because of you haha.

thanks anyway!
B
9
Posts: 9
Reputation: 345


Return to How do I....?

Who is online

Users browsing this forum: Magistross, mihirolover, tarek2 and 10 guests