Attack Animations and Walking Sounds

Get help using Construct 2

Post » Sat Aug 22, 2015 10:23 pm

Greetings!

I just recently got myself Construct 2, and have already made some test platforms to get a hand at how things work. Thus I have managed to figure out controls, animations and sounds (to a degree haha).

But I have encountered some issues while trying things: One is attack animations. I followed a tutorial for making attack animations and, despite following everything from the book, I found that the loop for the attack animation does not stop. I was wondering if someone can make a more better/updated tutorial or some tips to fix this.

The other is adding footstep sounds for when the character is moving. Again i followed some basic instructions for this, but produced the same results. The sounds do not stop when the character stops. I ask again if someone could give me some tips or a detailed walkthrough on how to fix this.

Thank you for anyone's time for reading this, and I hope to hear from someone (or anyone) with some useful information!
B
7
Posts: 16
Reputation: 283

Post » Sat Aug 22, 2015 11:24 pm

Hi Robaschi,

First off, welcome to the community!

Can you provide us a screenshot of the code you're using?

Cheers,
B
4
S
1
Posts: 34
Reputation: 416

Post » Sun Aug 23, 2015 2:23 am

Thank you Indomitus!

As for the coding, what I been using is very simple stuff, some of which I managed to figure out on my own.

Image
B
7
Posts: 16
Reputation: 283

Post » Sun Aug 23, 2015 11:40 am

Hi Robaschi,

About the sounds you just need to set up a stop between play times. Here I attached a Capx file as an example, hope it helps.

Cheers,
B
4
S
1
Posts: 34
Reputation: 416

Post » Sun Aug 23, 2015 9:52 pm

Thanks so much for the help Indomitus! At the moment I only have the walk cycle sounds down, and thanks to the capx you supplied to me, I followed its instructions and now my character has a seamless walk cycle noise!

I'll be adding in the attack stuff soon, I'm gonna remake the animations for that, but for now, There's still so much I wanna do, but at the moment getting the hang of Construct 2 is a good way to go.

Of course since I don't have a high enough reputation yet, I can't share the capx file I have, but oh well. Maybe later!
B
7
Posts: 16
Reputation: 283

Post » Sun Aug 23, 2015 11:28 pm

Alright a thing I noticed about the sounds for the attacking animations that's kind of a problem: When you attack, the sounds seem to play very fast.

For example, the character running sound is at 0.4 seconds for every tick for the system condition, whereas the attack animation has no tick for it to determine how long the sound should play before playing again, so it comes out as one long continuous sound until you let go of the key for the attack.

So if there is a way to remedy this, that's be greatly appreciated!
B
7
Posts: 16
Reputation: 283

Post » Mon Aug 24, 2015 10:08 am

Hi @Robaschi,

You just need to change the "when the k is down" to "when it's pressed" and add a "trigger once" event at the start of the attack code. Here is the New Capx. Let me know if worked.

Cheers,
B
4
S
1
Posts: 34
Reputation: 416

Post » Mon Aug 24, 2015 4:57 pm

Aaah of course! I had a feeling I would need to use the trigger once code to it. Once I get onto my computer I'll look at the capx and tell you the results of my little adventure, haha.

Again, thanks much for the help!
B
7
Posts: 16
Reputation: 283

Post » Mon Aug 24, 2015 11:02 pm

Okay so here's the code I have now, I had to add the 'On any key released' command (will change it to 'On A released' later, used that for debugging purposes) because for some reason the character would stick on the last frame of the attack animation if I kept holding the button down. I think this is probably because I don't mirror my sprites.

Image

Now for some reason, the character will not play the attack animation for when they're in the air, I have a unique animation set for that, but for some reason it doesn't play. If there's a way to fix that, let me know, it's probably a simple thing I overlooked.
B
7
Posts: 16
Reputation: 283

Post » Wed Aug 26, 2015 9:17 am

Hello there @Robaschi,

What I see here is that you have some overlapped events, you need to be very careful since Construct 2 reads the code lines in the order as they were written, and sometimes the system replaces similar events for the one that has been created at first.

Try changing the 11th line to "platform is jumping" instead of "Up arrow is down" and let's see what happens.

Cheers,
B
4
S
1
Posts: 34
Reputation: 416

Next

Return to How do I....?

Who is online

Users browsing this forum: AllanR, brunopalermo, ST314, TheRealDannyyy, tunepunk and 24 guests