Sound Question

Discussion in 'How Can I...?' started by wmfear, Jul 26, 2021.

  1. wmfear

    wmfear Avid Boxer

    Joined:
    Apr 6, 2018
    Messages:
    165
    Likes Received:
    89
    Hi guys!

    I want my character to have an idle sound that is replaced with another sound as soon as the user clicks the screen to move the character, and vice versa. They should not overlap.

    How would I go about to make that happen?
     
  2. Vlad-NY

    Vlad-NY Serious Boxer

    Joined:
    Jul 21, 2018
    Messages:
    605
    Likes Received:
    361
    Switch node should do the job in this case
     
  3. wmfear

    wmfear Avid Boxer

    Joined:
    Apr 6, 2018
    Messages:
    165
    Likes Received:
    89
    Thanks for the tip. I do realize why this set-up of mine does not work, cause the idle sound should appear whenever the user does not touch the screen, now they kind of just alternate between the two sounds as I click the screen.

    Is there a way to do that with the Switch node? So the idle sound appears as soon as the user does not touch the screen..?
    01.jpg
     
  4. Vlad-NY

    Vlad-NY Serious Boxer

    Joined:
    Jul 21, 2018
    Messages:
    605
    Likes Received:
    361
    This should do the job

    [​IMG]
     

    Attached Files:

    wmfear likes this.
  5. wmfear

    wmfear Avid Boxer

    Joined:
    Apr 6, 2018
    Messages:
    165
    Likes Received:
    89
    Works like a charm, thanks Vlad!
     
    Vlad-NY likes this.

Share This Page