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

How to make my gun semi-auto?

I want to know how to make my gun semi auto instead of full automatic? I've tried to use a boolean to turn of the inovake but it did not work. I try to make a shotgun/sniper/rifle and wonder if anyone...

View Article


Help with Gui texture/Audio

Hey i have a gun script that works great but i need to transfer it from pc to android. Like instead of me clicking the scene i want it so when you press a gui texture, it fires, like on the pc version....

View Article


FPS Run Animation Gun - Rotation Issue

when I tried to make the Run Animation I changed the rotation of the weapon -60 degrees . When the run animation was being interupted by the walk animation (for example when you Get the button up) my...

View Article

musket gun script is not working

this script is supposed to make the gun shoot once and then reload but it just lets me keep shooting i am pretty much a beginner with scripting here is the script var reloadTime = 5; var totalAmmo =...

View Article

OnTriggerEnter is often not working

I'm trying to make a shooting system. I use rigidbodys for the bullets and I want to make the hit detection with the a hitbox of the ridgidbody object. I'm using the "OnThriggerEnter"-function for...

View Article


Reload Mobile

Hey guys im making an Android game, a fps game, and after 30 bullets, i want the gun to reload when i press a gui texure, or when they reload when the want. Any ideas? //Simple prefab shooting script...

View Article

Gun is not shooting? Please Help!

My gun script for my multiplayer game does not work? is there something that i am doing wrong? Code: using UnityEngine; using System.Collections; public class Shoot : MonoBehaviour { public GameObject...

View Article

Using the arrow keys to shoot using c#

Hey I'm using this simple code for my player to shoot. But how do I get the player to shoot in each direction of the arrow keys? so far he only shoots right. using UnityEngine; using...

View Article


Gun Shoot bullet + sound script unexpected char

var Bullet : Transform; var Spawn : Transform; function Update () { if(Input.GetButtonDown("Fire1"­­)) { Shot(); } } function Shot() { var pel = Instantiate(Bullet, Spawn.position, Spawn.rotation);...

View Article


Gun aim off center

Hello, I have this gun script that rotates and aims my gun so that I dont have to create 100's of aiming in animations, however there is one bug. If you rotate whilst not aiming in then aim in, the gun...

View Article

Making gun fire particle

Hi , I'm searching for a particle for when my gun fires in the game. I'm looking for something as realistic as possible. unfortunately I couldn't find any prefabs or assets. Fire particles in standard...

View Article

Simple gun draw script not working

I'm writing a simple script for my FPS exercise so my character draws his weapon by clicking the right mouse button, and then puts it away with another click of the right mouse button. I have the first...

View Article

BCE0043 :Unexpected token: :.

hello this is my second time asking for help on this script this gun script had been driving me crazy could someone be kind enough to help me please. p.s this is a raycast script #pragma strict var...

View Article


Prevent Bullets from going through objects/ No raycast

I have 2 Scripts 1 is attached to the gun the other to the bullet. The problem is, (and i really looked everywhere but nothing worked) that the bullets sometimes are going through objects. My scripts:...

View Article

Javascript Gun Look Script Problems

I have been trying to implement a basic gun and i have got all the functionality enabled except the gun moving up and down. It rotates up and down but does not move with the camera. Here is a video of...

View Article


Raycast off empty gameobject rather then camera.

I want to cast a ray(8 actually) from my airplanes gun(s). The problem is my script is designed to shoot the ray from the center of the camera. I need a way to project the ray forward from my gun(s)....

View Article

Sleep Syntax Unity

I need some help with the syntax for a script. I have tried WaitForSeconds but it only stops the function that it is in. Basically I'm making a gun script. In which I can input how much ammo in is the...

View Article


my bullet holes get stuck in mid air

hello i have a problem with the script i made and its actually 2 problems well for one when i shoot my gun the bullet holes get stuck in mid air and the second problem is is that when i shoot my gun...

View Article

RayCast Shooting not working

Hi, I am new to unity this year, and have been having problems with the raycast shooting script. When I play my game, it spawns the effect, but it only spawns in the middle of map. I have had another...

View Article

Child object jumps back and forth every frame

So I'm assuming the problem is the fact that it's a childed object, but please correct me if I'm wrong. Here's my code: if(gun[curWeapon] != null) { //float x =...

View Article
Browsing all 592 articles
Browse latest View live


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