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. Dismiss Notice

Clip in Clip out and pulling bolt sounds

Discussion in 'General Discussion' started by FusionSticc, Dec 13, 2014.

  1. FusionSticc

    FusionSticc

    Joined:
    Mar 16, 2014
    Posts:
    49
    Hello, I have some sounds that sound really good, problem is is that it comes in seperate audio files like clip in clip out, etc, I belive the asset GamesSounds - weapon pack also did this as well. How would I make those audio clips play at the right time when doing the reloading animation?? Or would I have to combine them using an audio program?
     
  2. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    They're probably separated so different weapons can have different reload speeds. Your best option may be to have an array of those sounds. I believe it would be something like public AudioClip[] reloadSounds; and then you can link the two files in an inspector. Have it set to clip out first (assuming that's what you play first), then have some code checking the point where the clip is about to go in, in the animation and do something like audio.clip = reloadSounds[1]; and play the clip in sound.
     
  3. FusionSticc

    FusionSticc

    Joined:
    Mar 16, 2014
    Posts:
    49
    Ok, thanks!
     
  4. FusionSticc

    FusionSticc

    Joined:
    Mar 16, 2014
    Posts:
    49
    Is there any other way though?
     
  5. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Is the animation setup in unity using meccanim? You might be able to drag the sound effects right onto the meccanim animator in the timeline where the clip goes in or out.
     
  6. FusionSticc

    FusionSticc

    Joined:
    Mar 16, 2014
    Posts:
    49
    Thats what I was thinking too, I'll try