How do I change animation relevant to touch

Get help using Construct 2

Post » Thu Mar 13, 2014 1:23 am

I have a swimmer with left and right animations, when I touch the screen and hold my finger he moves toward my finger, but If I touch behind him he rotates upside down and swims to my finger. I need him to change animations to left or right "Not Rotate" depending on where I touch the screen.

Image
Last edited by bremen on Thu Mar 13, 2014 1:44 am, edited 2 times in total.
Please Support Ocean Explorer.
http://igg.me/p/735007/x/6915815
B
14
S
4
G
3
Posts: 125
Reputation: 2,645

Post » Thu Mar 13, 2014 1:38 am

Are you using a Behavior to accomplish this? If so, set the object's Rotation to "no". Sorry that's all I can say without seeing code.
B
19
S
7
G
7
Posts: 88
Reputation: 4,117

Post » Thu Mar 13, 2014 1:41 am

@TheDoctor
Im using bullet behavior that all, I don't see "Objects Rotation" to set to no.
Please Support Ocean Explorer.
http://igg.me/p/735007/x/6915815
B
14
S
4
G
3
Posts: 125
Reputation: 2,645

Post » Thu Mar 13, 2014 6:15 pm

I can get one side of the sprite to work correctly, but I can not get both to work.
Please Support Ocean Explorer.
http://igg.me/p/735007/x/6915815
B
14
S
4
G
3
Posts: 125
Reputation: 2,645

Post » Fri Mar 14, 2014 8:55 pm

Still know luck, he swims right just fine animations and all, but if I turn left he swims upside down. I have tried to mirror it so I dont need a left animaion. I have flipped and flopped with no results. All I need is a way to tell my player if he is going left or right :-(
Please Support Ocean Explorer.
http://igg.me/p/735007/x/6915815
B
14
S
4
G
3
Posts: 125
Reputation: 2,645

Post » Fri Mar 14, 2014 10:02 pm

not the best graphics - but maybe one way...
You do not have the required permissions to view the files attached to this post.
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Fri Mar 14, 2014 10:16 pm

Is the properties editor of the bullet behavior do you have angle set to 'No'? Then set an event to flip the image. With angle set to yes it will rotate the sprite however many degrees the bullet is set to. So if you set the bullet motion angle to 180 it will rotate the sprite 180.
B
23
S
4
G
2
Posts: 364
Reputation: 2,392

Post » Fri Mar 14, 2014 10:50 pm

@RamPackWobble

That works. Thanks a bunch it was really getting to me :-)
Please Support Ocean Explorer.
http://igg.me/p/735007/x/6915815
B
14
S
4
G
3
Posts: 125
Reputation: 2,645


Return to How do I....?

Who is online

Users browsing this forum: tannerdler and 22 guests