Animating Player Controlled Sprite

Get help using Construct 2

Post » Sat Aug 13, 2016 6:45 pm

I got Sprites to animate on their own and they work perfectly. Except for Custom Movement, it's not the Sprite movement that's an issue, it's the animation.

I have when Custom Movement > 0 Start Animation

and

When Custom Movement = 0 Stop Animation.


Without this code, the spirte loops the animation. How to make it so it only loops when moving, and stops looping when speed = 0?
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Sat Aug 13, 2016 9:04 pm

In this case I would do two separate animations.
One for idle and 2nd for moving.
So you can set as following:
- Custom movement > 0 Set animation to "moving"
- Custom movement = 0 Set animation to "idle".
B
6
S
1
Posts: 4
Reputation: 377

Post » Sat Aug 27, 2016 6:45 pm

I will try that thank you. I tried that and found Start Animation and Start Animation " ", which one should I use?

I see a Start Animation and Start Animation with a " " as well.
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Sat Sep 03, 2016 7:23 pm

Help please. I see the Start animation and end animation, but no way of connecting custom movement to animation.
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Sun Sep 04, 2016 2:42 am

Oh boy. Way over thinking this. Let me run to my computer and show you how it's done.

Edit: Does this help?
Image
B
56
S
15
G
13
Posts: 826
Reputation: 17,645

Post » Sun Sep 04, 2016 7:26 pm

The words in quotes, that's what I can't find. Animation "down", etc. The sprite has two animations, 0 and 1. No mention in animations or sprite editor as to what the animations are named, it's just 0 and 1.
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Mon Sep 05, 2016 12:11 am

@Phoenixbowman
In the sprite editor, on the right hand side you will see an Animations Window. Right click and select Add Animation. Name it whatever you want. That is where I name my animations, "Right", "Left", and so on.

Image
B
56
S
15
G
13
Posts: 826
Reputation: 17,645

Post » Thu Sep 15, 2016 8:44 pm

Tekniko wrote:@Phoenixbowman
In the sprite editor, on the right hand side you will see an Animations Window. Right click and select Add Animation. Name it whatever you want. That is where I name my animations, "Right", "Left", and so on.

Image


Oh, thank you! I was looking at the bottom of the Sprite Editor where it shows the different sprites. I've been using that tab along the bottom for animations lol. For non-custom movement, it works beautifully. I set the Animation speed and set it to loop, and when sprites move on their own they animate perfectly.

For the player character though I'll use the Animation window to the left. THank you! :D :)
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Thu Sep 15, 2016 8:54 pm

I got two animations, 1 frame per animation I tried both Custom Movement > 0 set animation, didn't work. I tried when holding down arrow keys and still nothing. I did set animation to " " both for current and at beginning.

Still nothing :( Im sorry I dont get it at all. I even gave a second animation to one of the Frames, and moved it left, both with Custom Movement > 0 and pressing keys, nothing. the code says if custom movement > 0, set animation play from current and beginning.

Then I tried holding down arrow key, and the same code of Set animation to " ", both for current and play from beginning. Nothing still :(
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Thu Sep 22, 2016 2:20 pm

I tried the code that people mentioned and its not still not working i tried differetn frames, different animation names, etc. still not animating when Player uses keyboard input to move the sprite :(
B
20
S
7
G
3
Posts: 302
Reputation: 3,634


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], Unconnected and 17 guests