How do I add sound for character movement

Get help using Construct 2

Post » Sat Mar 01, 2014 6:28 pm

I apologize if this is a stupid question, but I'm having some issues with adding sound to my game.
Basically, I have imported a short audio clip with footsteps, and I want this to play whenever the character is touching the floor and is moving left or right.

However, it seems no matter how I set it up, it sounds like the clip is starting over and over again (before it is finished). Not sure how else to describe it.

I thought an event like this would work, but maybe I'm missing something?

Player - Platform is moving
Player - Platform is on floor -> Audio - Play sound
B
14
S
3
Posts: 123
Reputation: 1,571

Post » Sat Mar 01, 2014 6:47 pm

Player - Platform is on floor -> Audio - Play sound - this will trigger sound every tick. You need to add "Trigger once while true" if you want to play it only once

but for things like footsteps you could play sound based on animation frame numbers - to play sound only when player foot is touching floor.

For example:
animation frame = 2
or
animation frame = 4
trigger once -> play sound
ImageImageImageImage
B
157
S
66
G
41
Posts: 2,597
Reputation: 34,821

Post » Sat Mar 01, 2014 7:10 pm

Great! I believe the trigger once event was the key here. Thanks :)
B
14
S
3
Posts: 123
Reputation: 1,571

Post » Sat Mar 01, 2014 7:33 pm

Learn to read the manual and tutorials before anything.
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests