Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

Search the Community

Showing results for tags 'c'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


    • Introduce yourself
    • Discussions
    • Showcase
    • Need help?
    • Seeking team members?
    • Offtopic
    • Example Projects
    • Scripts
    • Shaders
    • Unity Tutorials
    • FPS Kit Tutorials
    • 3D models
    • Animated 3D Models
    • Graphic design
    • Textures
    • Sounds
    • Other
    • Sell
    • Request
  • Mars' Modular Multiplayer Photon FPS Kit's Topics
  • Mars' Modular Multiplayer Photon FPS Kit's Reviews
  • Mars' Modular Multiplayer Photon FPS Kit's Updates
  • Mars' Modular Multiplayer Photon FPS Kit's Tutorials
  • Busy People's Introductions
  • Photon's Tutorials
  • Photon's Photon General
  • Photon's Showcase


  • Free Projects
  • Free Assets
  • Game Demos
  • Photon's Files

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL





YouTube URL

Facebook URL

Twitter URL

IndieGoGo URL

Kickstarter URL


GreenLight URL



Found 7 results

  1. I have this script from @MadWolfGames. He made this script in Unity 2018, when I imported it into my Unity 4.7.2f1 then I got some error so I fixed it. But then after its not working. Neither scope texture is drawing nor player can reload even ammo = 0. Ammo goes in -(negative) whenever I try to shoot after 0 bullets it doesnot reload. Below is code here: I hope you understand. He'd already done lot for me and now I don't want him to disturb. That's all! using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; // Simple Script for Ash public class SniperScript : MonoBehaviour { public LayerMask thingsPlayerCanHit; // SETUP public float minDamage = 50f; public float maxDamage = 100f; public float ammo = 6; public float ammoInClip = 6; public float clips = 4; public Camera weaponCamera; public float fireRate = 1; private float fireTime; // Do not override public float range = 500; public float reloadTime = 2; // MISC public Animation Anim; public AnimationClip fireAnim; public AnimationClip reloadAnim; [Tooltip("Choose the sniper model to deactivate while aiming")] public GameObject sniperModel; [Tooltip("Choose the scope image")] public GameObject sniperImage; public AudioClip reloadSound; [Tooltip("Choose the shot sound")] public AudioClip _sniperShot; private AudioSource _audioSource; public float recoilPower = 10f; [Tooltip("Choose the button to aim the rifle")] public KeyCode aimButton = KeyCode.Mouse1; [Tooltip("Choose the button to reload the rifle")] public KeyCode reloadButton = KeyCode.R; // BOOLS private bool isReloading; void Start () { _audioSource = GetComponent<AudioSource>(); } void Update () { if (Input.GetButtonDown ("Fire1")) { StartCoroutine ("Fire"); } if (Input.GetKeyDown(aimButton) && sniperImage != null && sniperModel != null && !isReloading) { Camera.main.fieldOfView = 30; sniperImage.SetActive(true); sniperModel.SetActive(false); } else if(Input.GetKeyUp(aimButton) && sniperImage != null && sniperModel != null) { Camera.main.fieldOfView = 60; sniperImage.SetActive(false); sniperModel.SetActive(true); } if (Input.GetKeyDown(reloadButton)) { Reload(); } if (fireTime < fireRate) fireTime += Time.deltaTime; } IEnumerator Fire() { ammo--; Anim.Stop(); weaponCamera.transform.Rotate (Vector3.right, -recoilPower * Time.deltaTime); Anim.Play(fireAnim.name); RaycastHit hitInfo; _audioSource.PlayOneShot(_sniperShot); Ray ray = weaponCamera.ScreenPointToRay(new Vector2(Screen.width / 2, Screen.height / 2)); if (Physics.Raycast(ray, out hitInfo, range, thingsPlayerCanHit)) { if(hitInfo.collider.transform.gameObject.tag == "Player"){ hitInfo.transform.root.GetComponent<PhotonView>().RPC("TakeDamage", PhotonTargets.AllBuffered, Random.Range(minDamage,maxDamage), PhotonNetwork.playerName); } } yield return new WaitForSeconds(fireRate); } void Reload() { if (ammo >= ammoInClip || clips <= 0 || isReloading) return; Anim.CrossFade(reloadAnim.name); _audioSource.PlayOneShot(reloadSound); StartCoroutine(FinishReload()); isReloading = true; } IEnumerator FinishReload() { yield return new WaitForSeconds(reloadAnim.length); ammo = ammoInClip; clips--; isReloading = false; } }
  2. 1. Add this code on Ienumerator ApplyDamage in BulletScript.cs. if (hit.transform.tag != friendlyTag) { //Addthis if (hit.collider.gameObject.GetComponent<HealthScript>()) { hit.collider.gameObject.GetComponent<HealthScript>().PlayerDamage(System.Convert.ToInt32(damage)); } // hit.collider.SendMessage(damageMethodName, damage, SendMessageOptions.DontRequireReceiver); } 2. Add this code on IEnumerator Go() in ExplosionScript.cs if (hit.GetComponent<Collider>().gameObject.GetComponent<HealthScript>()) { hit.GetComponent<Collider>().gameObject.GetComponent<HealthScript>().PlayerDamage(System.Convert.ToInt32(damage)); } 3. Replace this in TargetScript.cs public void ApplyDamage(float h) { if (healthScriptHolder.GetComponent<HealthScript>()) { healthScriptHolder.GetComponent<HealthScript>().PlayerDamage(System.Convert.ToInt32(h)); } healthScriptHolder.SendMessage("Damage", h, SendMessageOptions.DontRequireReceiver); } 4. Change Player layer to default, Click this object only. 5. Change Damage Method Name to ApplyDamage, and Hit Effect Tag to Enemy on TSA bullet prefabs. Also on TSA Explosion Prefabs 6. Change AI prefab Tag to Enemy, which have collider component. And Apply Prefab. Noooww it's done. + You need to change TSA HealthScript.cs name, cuz it has same name as HealthScript.cs on FPS kit.
  3. Title: Battle of Force Genre: Action, FPS Description: Shooting game Prologue: Nothing. In this you are a soldier. You are on Mission to kill all enemies and after killing all enemies you have to pick up a document. ABOUT ME Nickname: AshwinTheGammer Real name: Ashwin Age: Sixteen. Good at: Java, HTML, Gaming, Javascript(not of Unity). Location: India. DREAM: I wanna open my own Gaming Company and company which will compete with EA and Infinity Wards like companies. CURRENTLY PERSONS I NEED : PROGRAMER (C#) 0/1. Here is my first game video This is not too good but OK. DESCRIPTION FROM ME: Please be fair, and not let my age determine your choice and I`ll not pay you any money or anything for this work.
  4. Hi guys, I've made script for custom object painting and of course I had to create empty script just with class and monobehaviour to be able to paint. But when I choose in hierarchy object that has this script I can't use camera :/ It can't move in any direction, can rotate, but can't move forward, up, down etc. But when I click on object that doesnt have this script (or just air) everything is okay. Any solutions? P.S Is it possible to make custom objects painting window without needing object with that empty script? Because if I choose object that has that script I'm able to paint on another ones that doesnt have that script... Thanks for all help!
  5. Hello Everybody, I Would like your help in participating in this survey that I am sharing on behalf of my team. That is Xtranormal Activists. The team itself is fairly new with limited publicity (Were working on that) but is pared up with experienced developers and content creators focusing on creating games, Outsourcing and Tools development working with the unity and unreal engine. The purpose of the survey is to find patterns and preferences that are common among many persons involved in the game industry and by segment the creative industry. Also to provide help to game developers with limited resources but a strong desire to learn and make there dreams a reality with effort on their part. Thank you for reading, now the survey: https://surveyplanet.com/58bc93dc1b114214b20d0893
  6. Hey guys, I started a youtube channel about 8 months ago, had issues and had to halt it for a long time. I'm back, and badder than ever! Wanted to start the year off strong with a beginner level tutorial about classes: Any kind of criticism is welcome, I'm working on improving the quality of my tutorials!
  7. Hi guys, I create and publish projects on android regularly and have about 4 million downloads total now. Have a lot of varied and spare projects, completed. Just looking to see if anyone is interested in reskinning on a revenue share basis. On average a project takes around 3 days to reskin, I would be providing you with a complete project and assets, if you have your own then excellent. Most of the projects are vehicle based or match 3, so please drop me a line if you are interested!
  • Create New...