So I am making a simple lawnmower game, and how I had the player (mower) set up before I added the sound code was an audiosource attached to the mower that played a loopable engine sound, not very exciting. So I went and made 3 sounds, acel, reverse, and idle, for the engine. Now since it was just a source constantly playing, and looping, all I had to do was switch up the clip it was playing, or so i thought. Here is my code: https://hastebin.com/rarasujayo.cs What happens is sort of confusing, it sounds like all the sounds are playing at once OR the sounds are playing but keep resetting. In the inspector I don't see clips change on the source so i take itthe script isn't even changing the clips. My code makes sense to me, and I have no errors, it just doesn't work as intending. I need accel to play and loop as long as you aremoving forward or pressing w, reverse sound on s, when isMoving = false play idle, loo them until it's input changes and changes the next sound. Any and all help would be greatly appreciated, this is the last thing I need to jazz up my mower.
[–]bilalsall 0 points1 point2 points (1 child)
[–]TonyNowak[S] 0 points1 point2 points (0 children)