Quantcast
Browsing all 592 articles
Browse latest View live

Unity does not recognize reload animation for gun

I am trying to make a reload script for my gun, so that when I hit 'R' my gun reloads, but the thing is that the animation and the reseting of current ammo doesn't work. What's the problem here? var...

View Article


Void Update

I mean if click Fire button during reloading the crosshair will move. And Crosshair must move depending on shooting and fire rate. How to combine. Need to add to the first script that script:...

View Article


.Js Particle issue (probably easy for moderate coders)

Hi all, i am working on a gun, the barrel of which emits particles in place of bullets merely as a visual element, they do no damage. all that is working ok but it continues to emit while the gun's...

View Article

I'm trying to make recoil on my gun but the bullet spawn won't move with it

The gun script is #pragma strict function Start () { } var cameraObject : GameObject; @HideInInspector var targetXRotation : float; @HideInInspector var targetYRotation : float; @HideInInspector var...

View Article

Help with fire script

When I shoot the gun it only shoots one way no matter what direction I'm facing My script on the gun public GameObject bullet; public float fireRate = 10f; private float nextFire = 0.0f; public float...

View Article


Network Shoot/health script

Ok I am Making a network fps in unity and i am having some problems I made a health script and a shoot script so basically when the player shoots the other player the player hit loses health but the...

View Article

Need help... Start Button no longer working!!!!!

heres my Direct Connection Script stolen with permission from a tutorial (War Nation) on youtube #pragma strict var remoteIPadresss = "127.0.0.1"; var remotePort = 25000; var listenPort = 25000; var...

View Article

How do I make a gun & export it into Unity?

Hey there! I'm sorry for the obvious rookie question, but I've been searching **EVERYWHERE** and am in desperate need of a tutorial of some sort. For a First Person Shooter, obviously you need to know...

View Article


Sprint Animation makes the default gun position change

I have set up a player controller with different empties that are assigned to parts of my script. I have one for movement which contains the walk, idle, and sprint animations. In my C# script I have a...

View Article


Raycast shooting

Hello everyone i have a raycast script here for a gun but it only makes the ray thing in the center of the screen, i want it so tha the ray will come out the barrel of my gun, could anyone help...

View Article

How would i make my raycast script apply damage

Hello i have a raycast script, and i also have a damage script but how would i apply damage to objects when i shoot? [code]#pragma strict var endBarrel :Transform; var sound : AudioClip; var Damage :...

View Article

How do I create a raycast from the end of my gun to go wherever i have my gun...

I have a raycast script and i want to make it so that the ray gets casted from the end of my gun, so that when i click my mouse button the ray is created at the end of my gun and travel foward wherever...

View Article

gun holding

hi ive been working on a third person shooter and came across a question if my character where to switch his weapon from a rifle to a pistol how would i get my character to hold his gun like a pistol...

View Article


Refer to object class is attached to

I have a variable inside the weapon class called thisGun that I would like to be set to what ever objects are currently set as the wepaon class. EX If I had an object called gun1 how would I get the...

View Article

Refer to object class is attached to

I have a variable inside the weapon class called thisGun that I would like to be set to what ever objects are currently set as the wepaon class. EX If I had an object called gun1 how would I get the...

View Article


Gun Switch and SetActive is not Working!

I am making a 2.5D game and I am trying to make gun switching but the problem is that it doesn't work. There is no gun and there are no errors. What is wrong? (btw the array size is 3) using...

View Article

Why isn't my RPC shooting code working?

using UnityEngine; using System.Collections; public class ShootingScripts : MonoBehaviour { public Rigidbody bullet; void Start () { if (!networkView.isMine){ enabled = false; } } void Update() {...

View Article


Illegal Gun Models?

Can I model a gun, call it by its original name, and not get sued? Tell me about it in both commercial use and non-commercial use. Also, can I model a gun exactly the same look without getting sued?...

View Article

ammo display javascript

i need a ammo display script, so when i shoot the gun, the ammo in the bottom left shows how much bullets i have left. example: 23/30

View Article

Firing Sound

I have a firing script, as shown below. How do I add a sound that plays whenever the gun fires? It is a machinegun, so it needs to loop when you hold down the button. var projectile : Rigidbody; public...

View Article
Browsing all 592 articles
Browse latest View live