How to change footsteps sound on different floors?

0 favourites
  • 9 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • 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?!

  • Maybe check when collide with the floor type play the sound?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • No, not working...

  • 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.

  • 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.

  • 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)

    dl.dropboxusercontent. com/u/39282664/footsteps.capx

  • caiorosisca

    Thank's, but your example is not right, when the player stop moving the sound don't stop!!!

  • 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.

  • 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).

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)