Problem with Animation

For questions about using Classic.

Post » Thu May 27, 2010 10:12 pm

Hi there! I'am really grateful to developers, SDK is just awesome. For people like me (total programming lamers) it's possibly the only option for solo-gamedev )

Well, anyway, during my explorations i encountered a problem. In an event, I am checking if certain control is pressed, and than setting the animation ("shoot" for exalmpe). The problem is that when i press the button, i see only one frame from setted animation. And it plays very fast.

I decided to debug that. I changed the condition from "Control Pressed" to "Key is Down" (the key is L). In result, when i hold down the key i see only 1 random frame from my animation.

The settings in Animatior seems to be correct:
(settings are equal to all angles)
Animation speed: 12
Looping: unchecked
Repeat#: 1
Repeat to: 3 (that's my last frame)
Ping-Pong: uncheckded.

Is that situation a bug? Or maybe i have done something wrong? Please help )

PS Uploaded a .cap file. http://www.box.net/shared/7a7r1cpq6t
The event that caused trouble can be found in "Controls" event sheet.
B
1
G
2
Posts: 2
Reputation: 629

Post » Thu May 27, 2010 10:50 pm

You have a conflict in your events. Your run and idle animations need the condition "L is not held down" added to them. Then it works.

Also, if you want it to repeat 3 times properly, you'll want to repeat to the first frame not the third.
B
2
S
2
G
4
Posts: 156
Reputation: 1,762

Post » Fri May 28, 2010 7:19 am

Thanks, that works. But then it comes further:
I tried to set the condition to "Control pressed" (that was the original idea) but it still swallows my anims )
B
1
G
2
Posts: 2
Reputation: 629

Post » Fri May 28, 2010 12:48 pm

Well that would be because the on key pressed happens very quickly, then the event goes back to checking if the player is idle or moving.

You could try adding the condition to the idle and run events to check if the shoot animation is playing, and if it isn't, then play them. Just make sure your animation for shooting is not going to loop forever, and that it is timed how you want it with repeats.
B
2
S
2
G
4
Posts: 156
Reputation: 1,762

Post » Sat Feb 26, 2011 4:35 am

I'm maybe having the same problem... when basic animations is running its ok... but when I added some more it having problems as loading a fast first frame and not hold the animation.
I tried what you said, and I even dont got close... And some ones is only playing one frame not the entirely animation, but this holds...
B
5
G
1
Posts: 20
Reputation: 701


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests