Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Jump sound effect happens when just walking off

Discussion in '2D' started by markcambrone, Jan 22, 2018.

  1. markcambrone

    markcambrone

    Joined:
    Nov 11, 2015
    Posts:
    2
    So, I went back to work on a school project that I have been wanting to expand on and make something worthwile. One thing that I could never figure out how to fix is that the jump sound effect happens when my guy falls off or enters his falling to death animation.

    How would I go about and fix this?

    Also, first time I'm asking people on these forums for help.
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,955
    Hi,

    where/how you play the jump sound in script?
     
  3. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    If it's some logic like :
    if no sound played && not grounded,
    - play sound, toggle bool.

    you could change it so it only plays when you jump, instead.
     
  4. markcambrone

    markcambrone

    Joined:
    Nov 11, 2015
    Posts:
    2
    I'll give that a try.