Animation problem

For questions about using Classic.

Post » Thu Dec 18, 2008 8:25 am

First of all, I'm a noob at construct but I understand concepts quickly. Secondly, I looked for my answer before this post and still could not figure it out. My question is... how do I set an animation to happen "on key pressed?" I have my "running," "jump," & "fall" animations working fine but my "throw" animation will only play the first frame (there are 3 total frames.)

Here is what I put for my event, sub-event, & action:

(event) On key Z pressed

-- -(sub-event) player is on ground ----- (action) player: set animation to "throw"



What else do I need to add?
B
2
G
4
Posts: 16
Reputation: 1,082

Post » Thu Dec 18, 2008 9:03 am

Try adding "play animation".
B
6
S
3
G
6
Posts: 219
Reputation: 3,013

Post » Thu Dec 18, 2008 9:10 am

i got the same problem, and what i did is to "reset" animation.

- set animation" to "throw"
- set animation frame to 1
- play animation

- i found exact same formula on the forum later on, so it must work :)
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Thu Dec 18, 2008 9:15 am

[quote="BROO":3t0pl10c]Try adding "play animation".[/quote:3t0pl10c]

I've tried that already and it does not seem to work. I have also tried "set animation frame" along with "play animation" and "set animation" in different variations and none of them seem to have any effect... only the first frame plays for some reason.
B
2
G
4
Posts: 16
Reputation: 1,082

Post » Thu Dec 18, 2008 9:19 am

Could you post your .cap so someone can take a look?
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Dec 18, 2008 9:20 am

[quote="shinkan":1lod6uzp]i got the same problem, and what i did is to "reset" animation.

- set animation" to "throw"
- set animation frame to 1
- play animation

- i found exact same formula on the forum later on, so it must work :)[/quote:1lod6uzp]


I thought the same thing when it was messing up a lot but it only plays the first frame (its more of a twitch than a frame lol.) Even after slowing down the frame rate it is still only a twitch..
B
2
G
4
Posts: 16
Reputation: 1,082

Post » Thu Dec 18, 2008 9:23 am

[quote="deadeye":1zi1a1bw]Could you post your .cap so someone can take a look?[/quote:1zi1a1bw]

Sure, ill get it up as soon as I can. Just remember, its my first project and I barely started it so it sucks right now lol.
B
2
G
4
Posts: 16
Reputation: 1,082

Post » Thu Dec 18, 2008 9:47 am

Ok I got it on rapidshare. "Z" is the button I want the throw on.

[url:ybz4npy0]http://rapidshare.com/files/174490900/Unnamed.cap.html[/url:ybz4npy0]
B
2
G
4
Posts: 16
Reputation: 1,082

Post » Thu Dec 18, 2008 9:59 am

Fixed.

You were telling Construct to set your running/standing animation without any regard for whether the throwing animation was playing. So it would start the throw, but then the very next tick it would set back to standing. You have to be careful about the order of your events, and make sure that you're not canceling your own events out accidentally.

I added a "NOT Animation "kakashi throwing" is playing" condition, and made your running and standing events into sub-events under it.

I also set your throwing animation to not loop, and added the "Set to frame 1" and "Play" actions to the On Key event. It works fine now.

http://willhostforfood.com/files3/7264753/Unnamed.cap
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Dec 18, 2008 10:03 am

i was just about to say that heh, deadeye's to fast :D propably that's why he's "green" :wink:
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests