Problem with character animation

Get help using Construct 2

Post » Mon Nov 23, 2015 1:20 pm

When I press the left arrow button my character looks left and my animation starts but just the first frame. Also if I press the right arrow my character walks right and the walking animation starts but just the first frame and then the animation stopps. What could it be? Yes, its a looped animation with animationspeed 7.
In the code its like: If right arrow button is pressed = character animation to "walking". That works fine, but then he just switch the animation to the first frame from the animation and then it stopps, but I have 4 frames in a loop. Thanks!
B
27
S
10
G
3
Posts: 76
Reputation: 3,068

Post » Mon Nov 23, 2015 1:29 pm

Could it be there is another event setting animation with conditions that are also true?

Maybe an every tick set animation to "idle", or Player is on floor set animation, or something similar?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Nov 23, 2015 1:33 pm

Nefaru wrote:If right arrow button is pressed = character animation to "walking".


If right arrow button is pressed - animation "walking" starts over and over from the beginning(frame 0)

try: On Key pressed..
Image
B
60
S
23
G
7
Posts: 1,461
Reputation: 10,661

Post » Mon Nov 23, 2015 2:02 pm

Okey thank you I will check it again :)
B
27
S
10
G
3
Posts: 76
Reputation: 3,068

Post » Mon Nov 23, 2015 2:09 pm

So heres a picture. The problem should be somewhere there. I have a normal raptor sprite. If the player walks into it, destroy the raptor and set the player animation to "playeronraptor". He rides the raptor now if you now what I mean. Thats works fine. But then if I wonna walk with it, the animation "raptorrunning" starts but just the first frame. Then it stopps. I have 4 frames in "raptorrunning" and it should loop. Maybe you guys can help me ^^ Its a bit complicated.

http://www.file-upload.net/download-110 ... l.png.html
B
27
S
10
G
3
Posts: 76
Reputation: 3,068

Post » Mon Nov 23, 2015 2:13 pm

@korbaach, I already had it with on key pressed but then the animation "raptorrunning" doesnt event start.
B
27
S
10
G
3
Posts: 76
Reputation: 3,068

Post » Mon Nov 23, 2015 2:16 pm

Construct reads events from top to bottom,
so every tick playeronraptor=1first the animation default will be started from frame1, than if left is down animation running will be started from frame1..
This will lead to the animation staying at frame 1..

Like I said, both events are true, so both set the animation..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Nov 23, 2015 2:22 pm

Okey, I'm not sure how to fix it now but I will try it ^^ Thank you! :)
B
27
S
10
G
3
Posts: 76
Reputation: 3,068

Post » Mon Nov 23, 2015 2:26 pm

Easiest way would probably be to put an else event under event 281 and put the actions of event 279 in that..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Nov 23, 2015 2:34 pm

The animation would work but then my character always rides the raptor, not just then when he collides with it.
B
27
S
10
G
3
Posts: 76
Reputation: 3,068

Next

Return to How do I....?

Who is online

Users browsing this forum: Aergo, AllanR, anty21ro, Ethan, Fenix18, Iftikhar555 and 11 guests