Animations Problem

For questions about using Classic.

Post » Sun Jul 03, 2011 6:12 am

My problem is that I'm trying to make a character play an attack animation when you press enter. I made the condition "on ENTER key pressed" and "is global variable 'weapons selected' equal to 1" (it's for which weapon is active) the actions are "Sprit 5: set animation to "attack-stick"

When I run the layout and press enter, the character just flashes to the first frame of the of the animation for about half a second and goes back to the "idle" animation.
B
5
S
3
G
4
Posts: 189
Reputation: 2,910

Post » Sun Jul 03, 2011 6:29 am

What kind of "controlls" you have to manage your animations?

i'm guessing here but probably when you press enter animation plays only for that time and soon when you release enter, anim goes back to idle.
Try do something like this
if (some global value) = 0 - play animation1
if (some global value) = 1 - play animation2
...
and then refer to that variable, when you want to change animation stateshinkan2011-07-03 06:30:13
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Sun Jul 03, 2011 6:48 am

In event for 'idle' animation add condition 'animation "attack-stick" is NOT playng' (i.e inverted 'is playng')
B
2
S
2
G
2
Posts: 158
Reputation: 1,366

Post » Mon Jul 04, 2011 6:39 pm

This might help ?

Animation guide
B
19
S
6
G
7
Posts: 1,204
Reputation: 7,296


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests