How do I make a walking sound loop for a platformer?

0 favourites
  • 6 posts
From the Asset Store
SynthWave Loop Pack includes 68 seamless loops, founded on 11 original melodies.
  • Hey guys,

    I want to play the sound "steps" for my character, it's a small audio that loops

    I used this conditions

    If:

    Player1 is moving and Player 1 is on floor > play sound "steps" looping

    When i do that it starts to loop endlessly and becomes unbearable.

    Also i tried the

    Player1 is NOT moving and Player 1 is NOT on floor > Stop playing "steps".

    but so far, it doesn't work

  • The only thing that came on my mind right now is: control sound loop with a variable.

    Define Global Variable "Step" = 0

    Player1 is moving and Player 1 is on floor and Step = 0 > set Animation "Walking", play sound (NO LOOP), set Step = 1

    Player1 On finished Animation "Walking" > set Step = 0

    ---

    Of course you'll need the "Walking" animation for your sprite.

    I think, this is not the best solution, but, could work.

    Best Regards.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey guys,

    I want to play the sound "steps" for my character, it's a small audio that loops

    I used this conditions

    If:

    Player1 is moving and Player 1 is on floor > play sound "steps" looping

    When i do that it starts to loop endlessly and becomes unbearable.

    Also i tried the

    Player1 is NOT moving and Player 1 is NOT on floor > Stop playing "steps".

    but so far, it doesn't work

    Put the "trigger once while true" condition with the others.

  • Thanks pal!

    now it works, and i post a screenshot for everyone having trouble.

  • Thanks pal!

    now it works, and i post a screenshot for everyone having trouble.

    You're welcome

    One more thing: your first event is ok, but I think you don't need the other two.

    Instead, just create an "else = stop steppy".

    Cheers

  • I still don't fully understand how to use while and else, i'm getting the hang of else, but i have been doing that kind of coding since the beginning haha i should start using Else

    Thanks People!

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