Footsteps sound on key press

Get help using Construct 2

Post » Fri Nov 29, 2013 5:29 pm

Hello guys, first of all apologies for my poor english.
I'm currently studying how to use Construct 2 (and all I can say is that I'm loving it, bought it on Steam and it's my best purchase for the year!) Well, I apologize if my question seems too silly, but I couldn't find answers to this:
->How do I make a footsteps sound play every time a sprite is walking on stage on key press? I tried, but the sound makes in a strange loop, like several sounds playing at once ...
Please help me if possible.
Thanks!
B
5
S
1
Posts: 11
Reputation: 397

Post » Fri Nov 29, 2013 10:44 pm

Will need to see how the events are set up. Please link to cut down .capx file or a screenshot. If your rep is too low to post on here then feel free to message me and I will assist with a fix.
B
47
S
17
G
82
Posts: 2,231
Reputation: 48,609

Post » Fri Nov 29, 2013 10:50 pm

You just need to add the condition (System - Trigger once while true) so the sound only plays once. Depending on the length of your sound file and how often it will be triggered to play, you may also want to add an instance varaible called "Playing" and check to see if the file is already playing or not when it's triggered. IE, if the file is already playing don't trigger it to play again.
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,991

Post » Sat Nov 30, 2013 3:41 am

I've done that before, I set it up as a looping sound, so that it loops on it's own. When the key is NOT down, turn off the loop.

B
240
S
62
G
33
Posts: 903
Reputation: 40,589

Post » Sat Nov 30, 2013 4:06 am

That's a good idea Paradox, I'll have to keep that trick in the back of my head in case I ever need it.
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,991


Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 13 guests