Instantation Lag In Unity With Simple Game Object
I have a game object composed of 3 planes (with textures) a transparent cube, an empty with a box collider and rigid body, each enemy can instantiate 4 of these about every 50 tics. Here is the code:...
View ArticleJavascript Gun Firing Script Edit
Hello today I have made a gun script, it is working fine except that you can fire the gun everywhere even if you are not holding it. As you can imagine this is a problem. (DO NOT GIVE ME YOUR SCRIPT,...
View ArticleDisable/enable mouseclick
How do I make the player click with LMB 7 times to disable LMB and then they have to press "r" to enable it again? (I'm making guns)
View ArticleRendering object behind camera
Ok so i have a camera attached to my main camera that renders the guns in first person but when i sprint the gun clips behind the camera and i can see inside it is their anyway i can prevent this here...
View ArticleRotate Bullet with rotating Turret PROPERLY
Hey all, I am making a top down 2D shooter. I want to achieve the following: ![alt text][1] A is the base of the turret that rotates around itself. B is the cannon where the blue bullets spawn and fire...
View Articleweapon pickup doesn't find the gun in players inventory
Im building an arena styled shotoer game, where you have to pick up weapons in order to have them activated in the player. All the weapons are initially in the players inventory, but they are all set...
View ArticleGun with animations
Hi, Do you know any where a good gun model with good animations (activate, reload, etc.) I have 100 EUR to pay. Best regards, Ivan :)
View ArticleControlled Automatic Fire Rate (RayCasting)
Hey guys. I am having some problems with an automatic but controlled ray cast firing system. It goes as followed; if (Input.GetButton("Fire1") && aiming && canShoot && !shooting...
View ArticleReplace prefab
How do I use a certain prefab locked to the player at a position if I press 1 and use a second prefab locked to the player at a position if I press 2? This is a swapping weapon script.
View ArticleRemake gunscript to rapid fire
How do I make this script to rapid fire? #pragma strict var bulletPrefab : Transform; var player : GameObject; var force : float = 2000; var shootForce : float = 1000; function Update () {...
View ArticleGun Recoil
Hello today I have been struggling with a recoil script please help me fix this script please, thanks! Here's my shoot script preferably attach a recoil script onto to this, Im new to scripting also so...
View ArticleLooping animation on rightmousebutton?
How Do I loop a animation called "Aim" whil I hold down the rightmousebutton? Sorry If I'm bad at scripting but I just need it
View ArticlePlay Animation on keypress?
I want to play an animation on keypress any idea how I tried this but it didnt work I had all the components in the correct place. Script (part of it) function Update () {...
View ArticleMousebutton held down loop animation on another gameobject does not work?
I have tried everything to get this working It ain't even playing the animation I want to make If i hold down rightmousebutton It will play the AIM animation and if I release rightmousebutton it will...
View ArticleAnimation + Scripting = I Don't Understand (Help)
Hello! I am going to get straight to the point. I do not understand some things related to animating and scripting that have to do with each other. I am still rather new, but I just cannot even wrap my...
View ArticleMake camera fit screen
How do I make the camera fit the GUI/screen? var texScope: Texture; // drag the scope image here var scopeCam: Camera; // drag the scope camera here var rCamera = Rect(0, 0, 196, 196); var rScope =...
View ArticleHealthscript not working
My health script is not working and i can't find the solution. The problem is that if I hit the enemy (a cube for example) with the bullet he won't die/disappear. #This is my health script #pragma...
View ArticleMy reloading script not working after low bullets
My firing script for my gun is working up until totalnumberofbullets (this should be the complete total number of bullets excluding the ones in the clip) becomes lower than 7 (my full amount in my...
View Articleweapon isn't removing ammo when firing, but the script behaves normally...
the script I have for a pistol should remove the amount of ammo equal to the firecost, the script being, var Attack1 : GameObject; var Attack2 : GameObject; var sound1 : AudioClip; var sound2 :...
View ArticleGun Script glich?
I tried to put a reload animation but that failed so I removed it and I ended up with something weird where the gun would fire once every frame and would not respond to any input and also would not...
View Article