Animation frames won't work?

Get help using Construct 2

Post » Wed Oct 10, 2012 10:23 am

I have a sprite with animation frames for up/down/left/right, and they work only once. I can't press right, release it and then press it again and have the animation play that second time. I have to press another directional key (and play that animation) before the other key will work again.

right key pressed= sprite moves, animation,
right key released= sprite stops, stop animation,
right key pressed= sprite moves, no animation.

right key pressed= sprite moves, animation,
right key released= sprite stops, stop animation,
up/down/left key pressed= sprite moves up/down/left, correct animation,
up/down/left key released= sprite stops, stop animation,
right key pressed= sprite moves, animation.

Basically I can't press any key, release it and press it again and have the animation play twice in a row. Why is this?Pongboy2012-10-10 10:26:26
B
4
Posts: 24
Reputation: 348

Post » Wed Oct 10, 2012 1:27 pm

I managed to work out a fix, by creating a new one frame animation for each direction that play when the correct key is released.
So when the right key is released, the "IdleRight" animation plays, which is one frame of the sprite standing.

Is there a simpler fix for this though?
B
4
Posts: 24
Reputation: 348

Post » Wed Oct 10, 2012 2:27 pm

I have another issue: I want to put in a sword slash animation.

I have them all set up, the different frames for each direction, but how do I set it so that the sprite does the sword slash to the right if he is facing right already?

Also how would I put in hitboxes for the sword for when I place in an enemy?
B
4
Posts: 24
Reputation: 348

Post » Wed Oct 10, 2012 3:20 pm

NEW problem!
I got all sword strikes assigned to one key, but how do I set it so that he can use each sword strike while not moving, and use the correct one?

Basically, I want to be able to repeatedly press attack and have the correct animation play each time. Right now I need to move again before he will attack again.
B
4
Posts: 24
Reputation: 348


Return to How do I....?

Who is online

Users browsing this forum: CavalierBubble, Evanetot and 27 guests