C# Weapon Manager HELP!
So i have a "gun" script i have made for my guns(C#): using UnityEngine; using System.Collections; using System.Collections.Generic; public class WeaponMan : MonoBehaviour { public GameObject Weapon1;...
View ArticleAnimation conversion failed
Hello,I update to unity 5 and ever since i upgraded i been have animation problems but this one animation is really messing up bad i cant finish my game if i don't fix this my zombie arms are twisting...
View ArticleGun Random Rotation
Hi i'm making a game with Unity (https://www.youtube.com/channel/UCWrC78PXS3Frrp1Sk9TSp7A go here to see the game) and i want to simulate gun inaccuracy by randomly rotating it. The problem is that it...
View ArticleTrying to Make an Animation Work in Unity 5
I want to be able to hold right click to activate an animation (in this case, holding a gun up to the camera), play the last frame of the animation (so the gun stays there), then once right click stops...
View Articleif-statement not executing?
Hello! The follow script is a modified version of another gun I made. The other gun works just perfect, but this gun script just won't let me reload. (NOTE: if-statement in the 'Reload' function!)...
View ArticleError CS0103, The name GetComponet does not exist in the current context.
So, I'm making a script for my animation controller to transition from idle to shooting but it's giving me that error and I am not sure why. using UnityEngine; using System.Collections; public class...
View ArticleRaycast hits player when looking down
Hi, I made a few weapons in my game that use raycasting, blah blah, particles and a bulletshole spawn where the raycast hits. But there's a problem that I can't seem to fix. As you can see in the video...
View ArticleGoing crazy over simple bullets not instantiating in the correct position
I made a simple shooting script which will spawn a bullet prefab in the position and rotation of a bullet emitter which is infront of my gun object and is a child of my gun object. The issue I am...
View ArticleHitscan Bullet loses all spread when facing 180 degrees.
The gun instaniates bullets at the firepoint, which are both children of the player camera. whenever the player is facing near 180 degrees Y, the spread zeroes out. Not sure why. The Script. var Range...
View ArticleHow can you do borderlands style random weapons and stat generation?
I have been trying to figure out how to make it so that I can have random stats and random parts to create weapons. I am not sure how to do this though. I did not try anything, because I am not sure...
View ArticleGetButtonDown problem | C#
Hello, I'm trying to make a weapon script that allows me to change the firing mode from being able to hold down the trigger on a machine gun, or make it so you have to keep clicking for the gun to keep...
View ArticleHow to make a gun in unity?
So I have this code: using UnityEngine; using System.Collections; public class scrPlayerFire : MonoBehaviour{ public GameObject bullet; public Transform spawn; void update(){ if(Input.GetKey...
View ArticleHow can i make my gun have two different animations
Ok so I am making a First Person Shooter game with unity and I have an animation on my gun hand which is a parent to the gun that makes it so that when the player presses the left mouse button the...
View ArticleGun Muzzle Flash Effect
Hello, I was wondering if somebody could point me in the right direction for my question. I know this will sound a little noobish, but how can I make a special muzzle flash for a gun? And I'm talking...
View ArticleGun still clips through the wall despite layer masks being applied
Hi, I've been working on a first person shooter for a while, and have been having an issue where my gun clips through the wall. After searching through the internet, I found a solution which uses...
View ArticleGun movement on screen
I'm making a First Person Shooter, and am rather new to the whole scripting thing. I was wondering what the code would look like to have a script that makes the gun move with the mouse input. For...
View ArticleHow would you implement ADS for Custom Scopes?
Just a basic question here: I have a game that has guns that can be found in the world, each gun can have a different scope. Example: A player can find a pistol, and put a RDS scope on it through the...
View ArticleGaussian Distribution in circle on x and y axis
Hey, so I have a weapon script which is exactly like CS:GO, except for the weapon spread. As you know if you've played said shooter, you know that your bullets become less accurate the longer you hold...
View ArticleRotate child of FPS when camera moves on Y-axis
I have a First person controller with a gun as a child. When the FPS looks left or right, the gun moves with it so the gun is pointing in the direction the FPS is looking. Now, when the FPS looks up or...
View ArticleDisplay gun Ammo onsceen
i have my gun and my gun script (C#) and it has 30 rounds per clip, it reloads fine but i want a GUI onscreen to display the ammo, also if you could add a limit to amount of clips i could have just...
View Article