How to add a audio source to a second FPS dual glock gun?

So I am currently on trying to give the second gun on the left a audio source gun firing sound effect when it fires, there is a gun sound effect on the first glock and it fires when I press the left mouse button.

Is it best to make the gunshot sound effect in the animation Add Event, or can I do this in the C# script, and add a second audio source, and make the gunshot delay for like 0.40 seconds, because the second glock fires 0.40 seconds later than the glock on the right. So ill add another public AudioSource pistolShot; in line 13, but make another pistol shot sound and call it pistol shot 2?

Then write pistolShot2.Play(); in line 29? I am just guessing.

I made this video for you to see what I am trying to do

What are you waiting for? Sounds good, give it a try! Try all the things! This is software!

ok thanks, do you want to team up to learn unity, and blender?

No thank you, but I urge you to keep after it, either on your own or with others online.

If you want moar Blender3D and Unity3D (an INCREDIBLY powerful combination), check out Imphenzia on Youtube and join his discord channel. Lotsa good people and good fun going on there.

ALSO: I urge you to just do random tutorials for Unity, because you will be amazed at all the odd tidbits of knowledge you will pick up along the way.

Finally, let me leave you with a small treasure trove of interesting Blender3D and Unity3D knowledge:

Blender3D import FBX:

https://discussions.unity.com/t/832303/2

The script that Unity uses:

./Hub/Editor/2020.2.1f1/Unity.app/Contents/Tools/Unity-BlenderToFBX.py

More on fixing it:

https://discussions.unity.com/t/839045/4

Blender3D objects used as trees / detail in Unity3D terrain (See the second half of this response)

https://discussions.unity.com/t/841411/2

https://discussions.unity.com/t/852754/3

Thanks Kurt.
You probably will never need this, but its a list of everything I ever learned in Unity 3D. Blender 3D, Make Human, Mixamo, C# Visual Scripting, and Bolt Visual Scripting, but the list will grow over time with knowledge, and ill add all the good websites that have good free props like in the Unity Asset Store. https://www.quora.com/Can-you-make-a-video-game-by-yourself/answer/Nicholas-Xee everything I ever learned is in this Quora link, from making trees, walls, the code to make a enemy follow the player, code to make an object disappear when the player goes to it. Hope it helps. Also Its a list to help people online to make games quickly, and it will save you months of time.
Share it with others also.

1 Like