Quantcast
Viewing all articles
Browse latest Browse all 592

Picking up ammo from the weapon on the ground

Hello! Maybe you now the guy ETeeski. So, i'm making a FPS game using his tutorials. Work pretty good, but i have a problem. ETeeski didn't said anything about it in his tutorials, but it exists. I learned how to pickup ammo from weapon that is on the ground. So, i have a pistol in my hand, i pass over the gun on the ground and my gun takes ammo from that gun on the ground. Works good. But i can pickup ammo FROM ALL the guns. I can take ammo for my pistol just passing over a RIFLE. It seems not to be good. My idea is to check if the String name of my current gun equals the name of the gun wich is on the ground. And if their names equals to each other, the ammo would be taken. And i dont know how to do this(( Here is the video. http://www.youtube.com/watch?v=3dI7Tm3p2SM&list=PL7AE076AFAFD3C305 And here you can find a code. http://forum.unity3d.com/threads/124970-ETeeskiTutorials-Scripts-up-to-FPS1-29 Search at the bottom of "PlayerMovementScript". PLEASE HELP!Sorry for my english.

Viewing all articles
Browse latest Browse all 592

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>