Character follow Touch - Animations [SOLVED]

Just started using Construct 2? Post your questions here

Post » Thu Jun 18, 2015 12:26 pm

Been using C2 for a couple of days so I am complete beginner. I am stuck at this problem now and cannot figure it out. I try to solve problems myself first, but for some things I just cannot find enough information, so I will just ask for a little time here :P
I made the character move towards the touch, but I cannot add properly working animations to it (touch on left should activate walk left animation for example).

Image
This one shows only the walk right animation no matter what.

Image
This one shows only frame0 for walk up and down and does not show any animations.

Help would be greatly appreciated :)
Last edited by tomwei on Thu Jun 18, 2015 4:37 pm, edited 1 time in total.
B
9
S
1
Posts: 13
Reputation: 581

Post » Thu Jun 18, 2015 1:32 pm

Sorry for bad typos, on my phone.

**EDIT** I actually see some more problems. I'll take a look when I get access to my comp.

In the first example I think I see two problems.
First problem is that, in the block where you are checking the MapChar Directions, they are all in the same block. So they basicaly work as an 'and' condition. Which means they all have to be true.
The second problem, which I believe is in the second example aswell.
The Set Animation (play from start) is being called every frame when the touch is active. So the animation constantly starts over.

I hope that made sense and that it'll help.
It sounds like you like problem solving so I'll leave the solution for you to figure out. :)
B
5
Posts: 19
Reputation: 263

Post » Thu Jun 18, 2015 2:54 pm

Also:
You only use exactly 4 direction?
Because if not you need to have exactly 90° to play an animation.
Sorry for my bad english, but I really do my best! And use and check with Google Translator.
B
11
S
4
G
1
Posts: 158
Reputation: 1,328

Post » Thu Jun 18, 2015 3:09 pm

@deathangel1479
8 directions, but only 4 way animations.

@Eklofakka
looking forward to your reply
B
9
S
1
Posts: 13
Reputation: 581

Post » Thu Jun 18, 2015 3:17 pm

Image
Sorry for my bad english, but I really do my best! And use and check with Google Translator.
B
11
S
4
G
1
Posts: 158
Reputation: 1,328

Post » Thu Jun 18, 2015 4:11 pm

now it has FaceLeft animation only :/ did I miss something?
Image
B
9
S
1
Posts: 13
Reputation: 581

Post » Thu Jun 18, 2015 4:16 pm

You are basing it on a 8 direction's moving angle, and you use set angle and move pixels, which is not using 8 direction movement.

Try basing it on your regular angle instead of 8 direction's moving angle.

MapChar.Angle is between etc etc
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Thu Jun 18, 2015 4:21 pm

Y, you angles are wrong, so last triggers...
I have an example... But where... XD

Ahhh.
Its complete different, but has you angles in:
angles
Sorry for my bad english, but I really do my best! And use and check with Google Translator.
B
11
S
4
G
1
Posts: 158
Reputation: 1,328

Post » Thu Jun 18, 2015 4:26 pm

up 270 degrees 225 / 315
right 0 degrees 315 / 45
down 90 degrees 45 / 135
left 180 degrees 135 / 225

Assuming your default animation character is facing right in the image editor (0 degrees)
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Thu Jun 18, 2015 4:32 pm

"Is between angle" only works clockwise. Convert to clockwise and then decode between 0 and 360.
www.blackhornettechnologies.com/Constru ... ecode.capx
ImageImageImage
B
71
S
22
G
259
Posts: 3,794
Reputation: 143,704

Next

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests