Quantcast
Channel: Questions in topic: "gun"
Browsing all 592 articles
Browse latest View live
↧

Need help with gun script to reduce the gun's rate of fire

I am making a revolver. Everything is working as it should, except the rate of fire is way too high. If I click repeatedly the gun fires fully automatically. How do I make the script wait for, lets say...

View Article


Wont aim down sights

basically ive been following this guys tutorials and everything is fine untill hes shows yu how to aim down the sights well i have everything exactly the same but mine doesnt work heres the code : var...

View Article


Bullets dont delete properly

the bullets spawn and launch properly but the problem is that i have a destroy object script for 5 second which it works, after 5 seconds of the bullet being spwned it dletes itself the problem is that...

View Article

having trouble with ammo reload script. destorys extra ammo

Hello Everyone, I have a basic script that allows me to reload a gun when it hits 0. The only problem is that when I reload the gun while it has some rounds left inside, the current amount in the gun...

View Article

Help with my Arrow Fire Script

Hi, im new to c# programing in unity and I have been trying to create a primative arrow fire script but no matter how hard I try I keep get this error after shooting an arrow: NullReferenceException:...

View Article


Animation plays at original position?

I have a aim downs sights script and a gun fire animation , it works fine but the only problem is when i aim down sights and shoot the gun goes back to where i originally animated in , what i mean is...

View Article

Why is .Lerp so bumpy?

I am trying to make my own gun script and for some reason my gun is acting super bumpy. My script is: public Transform gunHolder; public float holdSide = 0.3f; public float holdHeight = -0.2f; public...

View Article

My gun won't fire. ( Javascript )

I built my own gun with blender. I've only been using Unity and Blender for a few days. I watched this video. http://www.youtube.com/watch?v=NPlRbxJtKxE and used a script from this guys comment...

View Article


Character Rotation Doesn't work

Hello guys It's me again. This time I've started my newest learning project but I'm having a very big issue with the moving script of the player. Here is the deal: -When I press WASD to move my char...

View Article


Raycast shooting in the middle of the screen

I want my raycast shooting to be 100% accurate so it hits the middle of the map but I don't know how to do that. Here is my shooting script #pragma strict var damage:float = 38; var range = 100.0; var...

View Article

Gun's parts moving separately when l look up/down

So when i look up or down, I have this problem: ![alt text][1] ![alt text][2] [1]: /storage/temp/21145-unity+down.jpg [2]: /storage/temp/21147-unity+up.jpg I have a Simple Mouse Rotator attached to my...

View Article

Gun's parts moving seperately when I look up/down

So when I look up or down, I have this problem: ![alt text][1] ![alt text][2] [1]: /storage/temp/21184-unity+down.jpg [2]: /storage/temp/21185-unity+up.jpg I have a camera attached to my soldier, and...

View Article

Randomized Gun Spread

I want a gun that changes the position a little as if it was inaccurate. heres my script. also it doesn't seem to be working var Damage = 1; var spread : float = 0.25; var Cam : Camera; private var...

View Article


Weapon sights: Only-scope zooming, possibly with shaders?

Greetings. I've got a gun that can aim down sights (position lerping, camera reparenting, all that easy stuff). However, due to the rifle's specifics (it's futuristic, it's got a built-in optic and...

View Article

Parent weapon to hand bone

Hi, I know this question was made before but the solutions I found did not work as espected. I parented a gun object to the character´s hand bone using this code: gun.transform.parent = rightHand;...

View Article


dynamic_bitset.test bit out of bounds

This is my script for having a gun aim, and then unaim. I don't see a problem with it but it gives me this error above. This is my script #pragma strict function Update (){...

View Article

3rd person gta like weapon problem??

I started making a game like gta a month ago. i made a simple every day movement: Idle-Walk-Run-Jump using mecanim My question is how to add weapon using the mecanim "Humanoid".Itried using sub-state...

View Article


How do i pick up a gameobject?

Someone knows? For example i have a gun on the ground: ![alt text][1] when i come close to it and for example if i press a button lets say R i will pick it up: ![alt text][2] [1]:...

View Article

How can i make a ray cast take health from enemies

View Article

swapping weapons

i have been working on a zombie game and i am having troubles. i want to make a gun script so when you get in the game you will start with a pistol and it has its own animations and shooting script...

View Article
Browsing all 592 articles
Browse latest View live


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