How to change footsteps sound on different floors?

Get help using Construct 2

Post » Wed Mar 12, 2014 9:44 am

Hello all

I'm making platform game, So how can i change the player footsteps sound when the player above different floor's ( Steel , Grass ....etc)

I have one sound working on all floor's :

Player Skin animation = run
System-Trigger once ------------------Play Steps sound looping

Player Skin animation (Not equal) Run -------------- Stop Steps sound


Any tips?!
B
7
S
1
Posts: 65
Reputation: 586

Post » Wed Mar 12, 2014 9:52 am

Maybe check when collide with the floor type play the sound?
B
18
S
2
G
2
Posts: 64
Reputation: 1,220

Post » Wed Mar 12, 2014 10:55 am

No, not working...
B
7
S
1
Posts: 65
Reputation: 586

Post » Wed Mar 12, 2014 11:14 am

You can try working with triggers, by using sprites in a box shape. Just make different triggers for every type of floor and whenever your player sprite collides with the trigger for a wooden floor for example have an action that plays the footstep sound for a wooden floor.
B
3
Posts: 8
Reputation: 293

Post » Wed Mar 12, 2014 12:58 pm

I group my floor types into families (hard, soft, wood, water, etc) and then simply test if the player is touching an object in one of those families. I then have a subevent in my play walk sound event.

If animation= "running"
------>if player is overlapping "hard", play "hard sounds"
------>if player is overlapping "wood" play "wood sounds"

And so on.
B
103
S
38
G
19
Posts: 962
Reputation: 17,986

Post » Wed Mar 12, 2014 2:51 pm

Message: caiorosisca can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Setting up an example for you

Edit:
Here's an example how it can be done, I used poor sound effects tho. For better results use single step sounds.
You can also tag all the sounds as "footstep" instead of using a tag for each one. But it would delay a bit the sound when touching a different terrain.
(remove the space)
https://dl.dropboxusercontent. com/u/39282664/footsteps.capx
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Wed Mar 12, 2014 9:03 pm

@caiorosisca
Thank's, but your example is not right, when the player stop moving the sound don't stop!!!
B
7
S
1
Posts: 65
Reputation: 586

Post » Wed Mar 12, 2014 10:21 pm

@slanw You should be able to fix that very quickly by just putting a stop sound action when they are not moving. You should be able to do that much if you have come this far.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,573

Post » Thu Mar 13, 2014 3:04 pm

Yes, I know that. It was just an quick example to show you how to get different sounds.
As BluePhaze said, you can just add a stop when player is not moving(better than checking for animation IMO).
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643


Return to How do I....?

Who is online

Users browsing this forum: marcinkowski and 3 guests