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 'gun'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GENERAL
    • Introduce yourself
    • Discussions
    • Showcase
    • Need help?
    • Seeking team members?
    • Offtopic
  • RESOURCES
    • Example Projects
    • Scripts
    • Shaders
    • Unity Tutorials
    • FPS Kit Tutorials
    • 3D models
    • Animated 3D Models
    • Graphic design
    • Textures
    • Sounds
    • Other
  • SELL | REQUEST
    • 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

Categories

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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


YouTube URL


Facebook URL


Twitter URL


IndieGoGo URL


Kickstarter URL


IndieDB URL


GreenLight URL


Location:


Interests

Found 41 results

  1. Third update with major improvements including sound, environment, speedometer, and more! This post includes screenshots and video. Enjoy! https://imgur.com/a/r9XJVjS
  2. So, you may have seen my crappy fps before, but now I made an even better one! I deleted a whole bunch of random things on my drive to make space, and that old fps was one of them. Not much to look at for right now, I have been trying to get the basics down. There is crouching, better jumping, good footstep sounds, fully working AKM, attachment system ( I don't have any models yet), etc. So here are some screenshots! Probably going to replace the arms, and there is no Post-Processing yet. I don't know how to work blender to well, but the arms are mine! Still, I think it looks ok so far
  3. TRCGamez

    POST

    .
  4. Version 1.0.0

    8 downloads

    This is a nightstick with hit animation. The hit animation is basic and you can use this without credits or royalty in your commercial projects.
  5. I've OMA's old Fps kit. In that I've found plenty of new weapons. So I decided to use it in my game(I'll credit him). But I found that some guns are ok(means they're right hand sided) but some are left-handed side. As you can see in image. So could u tell me how to fix it. As a model in game UMP-45 is left handed but in game its right handed. I dont know how. I hope you understand. Thanks.(I wanna use reload anims [right handed]). I hope that all makes sense to you. i tried doing it by right handed side but player reloads by his right hand. Thanks in advance!)
  6. Hello! This is my first post ever! I just wanted to share a simple gun script that uses C#. Probably the best script for beginners! There are two scripts, one for the gun, and one for the enemies to shoot at! Hope u like it! 1st script: using UnityEngine; public class Gun : MonoBehaviour { public float damage = 25f; public float range = 100f; public Camera fpsCam; public ParticleSystem muzzleFlash; // Update is called once per frame void Update () { if (Input.GetButtonDown("Fire1")) { Shoot(); } } void Shoot () { muzzleFlash.Play(); RaycastHit hit; if (Physics.Raycast(fpsCam.transform.position, fpsCam.transform.forward, out hit, range)) { Debug.Log(hit.transform.name); Target target = hit.transform.GetComponent<Target>(); if (target != null) { target.TakeDamage(damage); } } } } 2nd Script (Target Script) using UnityEngine; public class Target : MonoBehaviour { public float health = 50f; //what makes the damage work public void TakeDamage (float amount) { health -= amount; if (health <= 0f) { Die(); } } void Die () { Destroy(gameObject); } } There u go! those are all of the scripts! (Credit to brackeys for them.)
  7. This model is made by me, Its a rough model of Jagers weapon from Rainbow Six Siege, If you use it just give me credit some how. 3 parts, main gun, sights, and mag, but feel free to join them together I just thought it would be easier if they were separate. File is at the bottom of this form, .blend file. -ADS- DOWNLOAD- HERE
  8. Hello, I am learning C# and beside I am also creating my own FPS game. Here is gun idle (sway) script I have taken this line from a script now I got stuck in it. The problem is I want remove following things so that it can work fully. Onemanarmy had said that learn scripting by yourself and yes i am learning but I need help here. I want to change this keywords to some other words so that it can work fully following words are: Yes I also want to remove if(weapon.isSelect){ Here is full code. public float smooth = 4.0f; // Speed to stabilize the movement. public float tiltAngle = 5.0f; // Average angle that the gun can tilt. public float maxTiltAngle = 15; // Maximum angle that the gun can tilt. public Transform tiltTarget; private void Update () { if (weapon.isSelected) { // If the player is not stopped or you are moving the mouse. if (Input.GetAxis("Mouse X") != 0 || Input.GetAxis("Mouse Y") != 0 || weapon.controller.GetInput() != Vector2.zero) { // Tilt in Y. float TiltY = Mathf.Clamp(Input.GetAxis("Mouse X") * -tiltAngle, -maxTiltAngle, maxTiltAngle); // Tilt in X. float TiltX = Mathf.Clamp(Input.GetAxis("Mouse Y") * tiltAngle, -maxTiltAngle, maxTiltAngle); // Tilt in Z. float TiltZ = weapon.controller.GetComponent<Rigidbody>().velocity.magnitude >= weapon.controller.crouchSpeed * 0.8f ? Mathf.Clamp(weapon.controller.GetInput().x * -tiltAngle, -maxTiltAngle, maxTiltAngle) : 0; // Defines the end position according to the tilt on each axis. Quaternion newRotation = Quaternion.Euler(TiltX, TiltY, TiltZ); // Moves the weapon from the current rotation to the end rotation. tiltTarget.localRotation = Quaternion.Lerp(tiltTarget.localRotation, newRotation, Time.deltaTime * smooth); } else { // If the player is not moving and the mouse input is zero (Vector2.zero), reset it to its original position. tiltTarget.localRotation = Quaternion.Lerp(tiltTarget.localRotation, Quaternion.identity, Time.deltaTime * smooth); } } else { // If the player is not moving and the mouse input is zero (Vector2.zero), reset it to its original position. tiltTarget.localRotation = Quaternion.Lerp(tiltTarget.localRotation, Quaternion.identity, Time.deltaTime * smooth); } } I have taken this from FPSE(I spent $35 for this plz help) I hope u people understand and will help me plz plz plz plz.
  9. Here is my latest model i made, i just want to hear your feedback. https://www.artstation.com/artwork/34nrY
  10. Hello game developers! I've been doing a lot of 3D modeling for practice and I figured I should give some to the community. Here is a little Super-Shorty shotgun. One of my favorite guns. License: You CAN publish a game using this commercially, you CAN modify the model or textures in any way to see fit. However, you CANNOT sell or distribute this model without my consent. If you wish to give it to someone send them the link to this post. 360 Giff: https://gyazo.com/56cca749f2ae88c7fb3eabab491ccf9f Some Animations I made (NOT INCLUDED): Model Info: 870 Faces, 1.0k vertices Texture info: All textures are 2048x2048, Material includes diffuse, normal map, metallic, occlusion, rough map. Also includes camo texture. Download: https://drive.google.com/file/d/0B2vPiBIX_4AAZEFudXhjeEZUN0k/view?usp=sharing Enjoy earthlings, there is more free stuff to come.
  11. Version V1

    272 downloads

    Hi Spent the day creating this for my sons project but thought i would share it with the community on AU because there not many free gun prefabs ive seen around it"s a ARGi with all removable attachements For use on None Commercial project use unless you have my consent also please give a shot out Please leave a thank you if you Download it and your constructive comments below enjoy With be updated so leave you ideas I have decided due to many requests to release this asset for commercial use it is now published for commercial & non commercial but credits must be given in final build for non-commercial & commercial i think this is fare thank you Free Map Download HILL HOUSEFree 2 floor fps Map Direct Download Here Enjoy Remember to give Credits Thanks Pacciones Aug with attachments.unitypackage
  12. I know this is probably a crap model. But I am showing it anyway. It is my first model, and my first time texturing, so don't hate on it too much. Tell me how to improve it, when I have it perfect, I will have it available for download. This is for the fps game I am making with the au fps kit. I have to add a few more details, but overall, complete. Thanks. Verts: 6,612 Faces: 6,151 Tris: 13,044 (Is this a lot?) I guess it is high poly? Pictures:
  13. HQLP Weapons Pack 1 - High quality low poly weapons pack. Package contains: - 5 Low poly High Quality weapons. The average triangle count per weapon is more 3000 triangles. - Each weapon has it's own 2048 x 2048 texture and material. Weapons list: Melee: -Axe Pistol: -M9 MachineGun: -P90 -M4A1 Sniper: -L96 Any bug or question send to: proassetsunity@gmail.com (Pending for review on Unity AssetStore) (Sorry for the screenshots quality)
  14. Hi guys how is it going? I know this is a long stretch but I am in need of some decent gun and arms rigs that are animated with the following animations: > Idle > Reload > Fire > Draw If anyone has some animated guns with arms on their PC or wherever, and are willing to share with the community for place holders only, NON COMMERCIAL use....then please help me. All the best, HairySeal
  15. So im working on this p226 http://i.imgur.com/oo8KBfa.png http://i.imgur.com/86hKe7l.png http://i.imgur.com/PatFwG5.png there and would like your opinions first of all i know that the ironsight for the gun is missing but im doing it separate file so i can reuse it on other models if i need to . Other than that what is good about it and what can i improve on it thanks for the feedback . Also need to texture it too but too much to do and soon will put the final result with texture and the ironsight soon thanks for the feedback(again) Also need to do the low poly too but best to get feedback now so i dont have to spend too long going back Don't be afraid to criticize
  16. Here are two scripts that i recently made, they are really basic so the gun can´t reload and it does have not a mag, but anyway, i wanted to share them to the forum Shooting.cs using UnityEngine; using System.Collections; public class Shooting : MonoBehaviour { private RaycastHit hit; AudioSource audiosource; public AudioClip shoot; void Awake () { audiosource = GetComponent<AudioSource>(); } void Update () { if (Input.GetMouseButtonDown (0)) { bang(); audiosource.PlayOneShot(shoot, 0.7f); } } void bang() { Vector3 myTransform = transform.transform.forward; Physics.Raycast (transform.position, myTransform, out hit, 50); if ((Physics.Raycast (transform.position, myTransform, out hit, 50)) && (hit.collider.gameObject.tag == ("enemy"))) { hit.collider.SendMessageUpwards("DoDamage"); print ("hit"); } } } EnemyHealth.cs using UnityEngine; using System.Collections; public class EnemyHealth : MonoBehaviour { public float EnemyHealthVar = 100; void Update () { if (EnemyHealthVar <= 0) { Debug.Log("ded"); Destroy(gameObject); } } public void DoDamage() { EnemyHealthVar -= 50; } } As im a begginer, please tell me if there is any error or anything that can be improved
  17. I Need A Gun Script That I Can Modify For A Pistol, Assault Rifle, Sniper Rifle, Lmg, Smg, Etc; PM Me Here Or Respond To The Topic, Thanks.
  18. Taking request all you have to do is PM me with the weapon name (image references optional) you want me to model my prices are usual 10 bucks for all. It depends on the model. If its simple i might just price it for 3-5 dollars. this is a simple model but i dont have to rest of the guns rendered when i render that ill post : ) So i can show my work
  19. Dergo

    QBB

    My new gun
  20. Yaze

    Guns that i made

    So guys Yaze here and well i did a bit of practicing on making some weapons and well these are the results ​ M1911 http://i.imgur.com/KJI0E7t.jpg Scar-l http://i.imgur.com/eh1w5tK.jpg http://i.imgur.com/15dtxoT.jpg http://i.imgur.com/W6xSNE6.jpg So these were the weapons that i made there a few mistake in these weapons in which i can add some more detail which i kinda wanted to do on the texturing meaning using normal maps and so on and forth also in the M1911 there was a few mistakes such as some of the normals were baked properly since i did it the lazy method by not using an envelope Problems: the sight on the scar wasnt the right one on the gun(mainly cause i wasnt lazy or couldnt do it but i just hate that sight sooo much its just like a square with a hole in the middle so i just made a plain sight and well yeah gimme the critism even though i pretty much know what to be said its just i wanted to fix some of the mistaks and all but i was just tooo lazy lol also the scaling ehh i found it a bit off on the scar
  21. 4Echo

    Spectre M4

    Reworked my material definition for these old textures, model + bakes done my RedRogueXIII. It's still a WIP though, some of the rust/dirt is too strong and undefined 3d Preview https://skfb.ly/CMJP Edit: - added a third render showing the silencer I also forgot to tell you that no generators (dDO, sub. painter) were used to texture this. The textures that you see were made with the teqnique of photosourcing.
  22. Hey guys thanks for all your help and I was just wondering if you had any ideas that I should to the fps kit I'm using please right back.
  23. marc2040

    New Gun Script

    Hi all here. Am new to unity 3D. Am learning JavaScript now. When i saw a video in YouTube i got a gun script which i think is awesome. I tried to test it out, but nothing happened. Am new to this, so i don't know where to apply and how to make it work. Here am sharing the script with you guys. Please try it and if working, assist me to get it work (A YouTube tutorial would be much better). //Type of Gun public enum weaponType {MachineGun = 1, Burst = 2, Launcher = 3, SemiAuto = 4, Shotgun = 5, AutoShotgun} public var GunType : weaponType; public enum underBarrel {None = 0, Shotgun = 1, Launcher = 2} public var underBarrelType : underBarrel; public enum barrelType {Normal = 0, Silenced = 1} public var barrel : barrelType; public enum sightType {Iron = 0, Holographic = 1} public var sight : sightType; private var underbarrelUse : boolean; var gunSpecs : GunSpecs; class GunSpecs { public var fireRate : float = 0.1; public var gunDamage : int = 40; public var gunRange : float = 20; public var gunMaxDamageMutliplier : float = 2.2; @HideInInspector var baseRange; } var gunTypeSpecs : GunTypeSpecs; class GunTypeSpecs { var burstDelay : float = 0.05; var shotgunShots : int = 12; var launcherMissile : GameObject; } var attachments : Attachments; class Attachments { var glObject : GameObject; var sgObject : GameObject; var slObject : GameObject; var hsObject : GameObject; var underBarrelSpawn : Transform; var holograhpicAimPoint : Transform; var ironsightAimPoint : Transform; @HideInInspector var aimpos : Vector3; } var grenadeLauncher : GrenadeLauncher; class GrenadeLauncher { var glProjectile : GameObject; var glreloadtime : float = 2; var glrecoil : float = 0.5; var glForce : int = 3000; @HideInInspector var glFireTimer : float = 100; } var underBarrelShotGun : UnderBarrelShotGun; class UnderBarrelShotGun { var sgShots : int = 8; var sgDamage : int = 20; var sgSpread : float; var sgRecoil : float = 0.1; var sgReloadTime : float = 1; var sgRange : int = 20; var sgShotSound : AudioClip; var sgPumpSound : AudioClip; var sgForce : int; var sgBulletRenderer : LineRenderer; @HideInInspector var sgFireTimer : float = 100; } var silencer : Silencer; class Silencer { var silencerRangeDecrease : int = 5; } //Raycast Variables; var range : float = 1000; var force : float = 1000; //Bullet Variables var clips : int = 20; var bulletPerClip = 30; var bulletInClip : int = 0; var bulletLeft : int = 0; var reloadTime : float = 3; @HideInInspector public var reloading = false; // Shoot Variables private var weapon_Fire_Timer : float = 0.0; var muzzlePoint : GameObject; var mainCamera : Camera; private var aiming = false; //Spread Variables var spread : float; var spreadPerSecond : float = 1; var decreaseSpreadPerSecond : float = 0.5; var baseSpread : float = 10; var maxSpread : float = 20; //Gun Movement Variables public var MoveAmount : float = 1; public var MoveSpeed : float = 2; public var Gun : GameObject; private var MoveOnX : float; private var MoveOnY : float; private var DefaultPos : Vector3; private var NewGunPos : Vector3; private var ON : boolean = true; private var xRotation = 0.0; //recoil variables var recoilAmount : float = 0.1; var recoilRecoverTime : float = 0.2; var rotationRecoil : float = 0.05; private var currentRecoilZPos : float; private var currentRecoilZPosV : float; //Gui Elements var hitmarkerFadeTime : float = 0.01; var hitmarker : GUITexture; //SFX public var ReloadAudio : AudioClip; public var SilcendShotAudio : AudioClip; public var ShotAudio : AudioClip; private var ShootAudio : AudioClip; //Particle Effects public var hitparticles : ParticleEmitter; public var ammoGUI : GUIText; private var startRotation : Vector3; function Start() { bulletLeft = bulletPerClip; bulletInClip = clips * bulletPerClip; DefaultPos = transform.localPosition; gunSpecs.baseRange = gunSpecs.gunRange; startRotation.x = transform.rotation.x; startRotation.y = transform.rotation.y; startRotation.z = transform.rotation.z; } function Awake() { reloading = false; } function LateUpdate() { if(hitmarker.guiTexture.color.a < hitmarkerFadeTime) { hitmarker.guiTexture.color.a = 0; } else { hitmarker.guiTexture.color.a -= hitmarkerFadeTime; } if(Input.GetKeyDown("3")) { underBarrelType +=1; if(attachments.sgObject == null && underBarrelType == 1){ underBarrelType = 2; } if(attachments.glObject == null && underBarrelType == 2){ underBarrelType = 0; } if(underBarrelType == 3){ underBarrelType = 0; } } if(Input.GetKeyDown("4")) { barrel +=1; } if (barrel == 2) { barrel = 0; } if(Input.GetKeyDown("5")) { sight +=1; } if (sight == 2) { sight = 0; } switch(underBarrelType) { case underBarrel.None: underbarrelUse = false; if(attachments.glObject != null){attachments.glObject.SetActiveRecursively(false);} if(attachments.sgObject != null){attachments.sgObject.SetActiveRecursively(false);} break; case underBarrel.Shotgun: if(attachments.glObject != null){attachments.glObject.SetActiveRecursively(false);} if(attachments.sgObject != null){attachments.sgObject.SetActiveRecursively(true);} break; case underBarrel.Launcher: if(attachments.sgObject != null){attachments.sgObject.SetActiveRecursively(false);} if(attachments.glObject != null){attachments.glObject.SetActiveRecursively(true);} break; } switch(barrel) { case barrelType.Normal: gunSpecs.gunRange = gunSpecs.baseRange; attachments.slObject.SetActiveRecursively(false); ShootAudio = ShotAudio; break; case barrelType.Silenced: gunSpecs.gunRange = gunSpecs.baseRange - silencer.silencerRangeDecrease; attachments.slObject.SetActiveRecursively(true); ShootAudio = SilcendShotAudio; break; } switch(sight) { case sightType.Iron: attachments.hsObject.SetActiveRecursively(false); attachments.aimpos = attachments.ironsightAimPoint.localPosition; break; case sightType.Holographic: attachments.hsObject.SetActiveRecursively(true); attachments.aimpos = attachments.holograhpicAimPoint.localPosition; break; } } function Update () { if(Input.GetKeyUp("2")) { if(underbarrelUse == false){ underbarrelUse = true; }else{ underbarrelUse = false; } } if(underbarrelUse == false) { if(Input.GetButton("Fire1") && bulletLeft > 0 && weapon_Fire_Timer > gunSpecs.fireRate && reloading == false) { switch(GunType) { case weaponType.MachineGun: weapon_Fire_Timer = 0; RayShoot(); audio.PlayOneShot(ShootAudio); spread += spreadPerSecond; break; case weaponType.Burst: if(Input.GetButtonDown("Fire1")) { weapon_Fire_Timer = 0; Burst(); } break; case weaponType.SemiAuto: if(Input.GetButtonDown("Fire1")) { weapon_Fire_Timer = 0; RayShoot(); audio.PlayOneShot(ShootAudio); spread += spreadPerSecond; } break; case weaponType.AutoShotgun: for(var asg = 0; asg < gunTypeSpecs.shotgunShots; asg++) { weapon_Fire_Timer = 0; ShotGun(); audio.PlayOneShot(ShootAudio); } spread += spreadPerSecond; currentRecoilZPos -= recoilAmount; bulletLeft--; break; case weaponType.Shotgun: if(Input.GetButtonDown("Fire1")) { for(var sg = 0; sg < gunTypeSpecs.shotgunShots; sg++) { weapon_Fire_Timer = 0; ShotGun(); audio.PlayOneShot(ShootAudio); } spread += spreadPerSecond; currentRecoilZPos -= recoilAmount; bulletLeft--; } break; case weaponType.Launcher: if(Input.GetButtonDown("Fire1")){ weapon_Fire_Timer = 0; FireMissile(); currentRecoilZPos -= recoilAmount; bulletLeft--; } break; } } else { spread -= decreaseSpreadPerSecond; if(bulletLeft == 0 && reloading == false) { reloading = true; Reload(); } } if(bulletLeft < bulletPerClip && reloading == false && Input.GetKeyDown("r")) { Reload(); reloading = true; } } else { if (Input.GetButtonDown("Fire1")) { var underBarreldamage : float; switch(underBarrelType) { case underBarrel.Shotgun: if(attachments.sgObject != null){ if(underBarrelShotGun.sgFireTimer > underBarrelShotGun.sgReloadTime) { audio.PlayOneShot(underBarrelShotGun.sgShotSound); AudioPlay(0.4,underBarrelShotGun.sgPumpSound); currentRecoilZPos -= underBarrelShotGun.sgRecoil; underBarrelShotGun.sgFireTimer = 0; Debug.Log("Shotgun"); for(var s = 0; s < underBarrelShotGun.sgShots; s++) { var hit : RaycastHit; var directionRay = attachments.underBarrelSpawn.TransformDirection(Random.Range(-underBarrelShotGun.sgSpread, underBarrelShotGun.sgSpread) * underBarrelShotGun.sgSpread, Random.Range(-underBarrelShotGun.sgSpread, underBarrelShotGun.sgSpread) * underBarrelShotGun.sgSpread, 1); if(Physics.Raycast(attachments.underBarrelSpawn.position, directionRay, hit, underBarrelShotGun.sgRange)) { Instantiate(hitparticles,hit.point,Quaternion.FromToRotation(Vector3.up, hit.normal)); var sgTracer = Instantiate(underBarrelShotGun.sgBulletRenderer,attachments.underBarrelSpawn.position,Quaternion.identity); sgTracer.SetPosition(0, attachments.underBarrelSpawn.position); sgTracer.SetPosition(1, hit.point); if(hit.rigidbody) { hit.rigidbody.AddForceAtPosition(directionRay * underBarrelShotGun.sgForce, hit.point); } if(hit.collider.tag == "EnemyBody" || hit.collider.tag == "EnemyHead") { underBarreldamage = underBarrelShotGun.sgDamage; hitmarker.guiTexture.color.a = 1; if (hit.collider.tag == "EnemyHead") { underBarreldamage = underBarrelShotGun.sgDamage*1.5; } ApplyDamage(underBarreldamage, hit); } } } } } break; case underBarrel.Launcher: if(attachments.glObject != null){ if(grenadeLauncher.glFireTimer > grenadeLauncher.glreloadtime) { currentRecoilZPos -= grenadeLauncher.glrecoil; grenadeLauncher.glFireTimer = 0; Debug.Log("Launcher"); var glprojectile = Instantiate(grenadeLauncher.glProjectile,attachments.underBarrelSpawn.position,mainCamera.transform.rotation); glprojectile.rigidbody.AddForce(transform.forward*grenadeLauncher.glForce); } } break; case underBarrel.None: Debug.Log("None"); break; } } } if (spread < baseSpread) { spread = baseSpread; } if (spread > maxSpread) { spread = maxSpread; } weapon_Fire_Timer += Time.deltaTime; grenadeLauncher.glFireTimer += Time.deltaTime; underBarrelShotGun.sgFireTimer += Time.deltaTime; if(Input.GetButton("Fire2") && underbarrelUse == false) { aiming = true; NewGunPos = new Vector3(attachments.aimpos.x, attachments.aimpos.y, attachments.aimpos.z+currentRecoilZPos); } else { aiming = false; NewGunPos = new Vector3(DefaultPos.x, DefaultPos.y, DefaultPos.z+currentRecoilZPos); } if(aiming == true && sight == 1) { currentRecoilZPos *= 0.5; } currentRecoilZPos = Mathf.SmoothDamp(currentRecoilZPos,0,currentRecoilZPosV, recoilRecoverTime); transform.localRotation.x = currentRecoilZPos*rotationRecoil; ammoGUI.text = bulletLeft+" / "+bulletInClip; /*if(ON == true) { MoveOnX = Input.GetAxis("Mouse X") * Time.deltaTime * MoveAmount; MoveOnY = Input.GetAxis("Mouse Y") * Time.deltaTime * MoveAmount; NewGunPos = new Vector3(DefaultPos.x-MoveOnX, DefaultPos.y-MoveOnY, DefaultPos.z+currentRecoilZPos); transform.localPosition = Vector3.Lerp(transform.localPosition, NewGunPos , MoveSpeed * Time.deltaTime); } else { Gun.transform.localPosition = DefaultPos; }*/ transform.localPosition = Vector3.Lerp(transform.localPosition, NewGunPos , MoveSpeed * Time.deltaTime); var newRotation : Vector3; if(reloading == true){ newRotation = Vector3(startRotation.x+0.1,transform.localRotation.y,transform.localRotation.z); }else{ newRotation = Vector3(startRotation.x,startRotation.y,startRotation.z); } var lastGunRot :Vector3 = Vector3(transform.localRotation.x,transform.localRotation.y,transform.localRotation.z); var newGunRot = Vector3.Lerp(lastGunRot, newRotation, MoveSpeed * Time.deltaTime / 3000); transform.localRotation.x = newGunRot.x; transform.localRotation.y = newGunRot.y; transform.localRotation.z = newGunRot.z; } function FireMissile(){ var rocket : GameObject = Instantiate(gunTypeSpecs.launcherMissile,muzzlePoint.transform.position,transform.rotation); rocket.rigidbody.AddForce(transform.forward * 3000); } function RayShoot() { var hit : RaycastHit; var rayPosition : Vector3 = mainCamera.transform.position; if (aiming == false) { //rayPosition = muzzlePoint.transform.position; } else { spread = 0; //rayPosition = aimcam.transform.position; } var directionRay = mainCamera.transform.TransformDirection(Random.Range(-maxSpread, maxSpread) * spread, Random.Range(-maxSpread, maxSpread) * spread, 1); currentRecoilZPos -= recoilAmount; if(Physics.Raycast(rayPosition, directionRay, hit, range)) { if(hit.collider.tag == "EnemyBody" || hit.collider.tag == "EnemyHead") { hitmarker.guiTexture.color.a = 1; var dist = Vector3.Distance(transform.position,hit.point); //var damage = (gunSpecs.gunDamage+(gunSpecs.gunRange*gunSpecs.gunRange/(dist+gunSpecs.gunRange)))/*+gunSpecs.gunRange*0.1*/; var damage = gunSpecs.gunDamage -((dist/6) - gunSpecs.gunRange); damage = Mathf.Clamp(damage, gunSpecs.gunDamage/2,gunSpecs.gunDamage); /*if(damage >= gunSpecs.gunDamage*2) { damage = gunSpecs.gunDamage*2; }*/ if (hit.collider.tag == "EnemyHead") { damage = damage*1.5; } Debug.Log(damage); ApplyDamage(damage, hit); } if(hit.rigidbody) { hit.rigidbody.AddForceAtPosition(directionRay * force, hit.point); } Instantiate(hitparticles,hit.point,Quaternion.FromToRotation(Vector3.up, hit.normal)); } bulletLeft--; } function Reload() { yield WaitForSeconds(reloadTime); for(var b = bulletLeft; b < bulletPerClip; b++) { if(bulletInClip > 0) { bulletInClip --; bulletLeft = b+1; } } reloading = false; } function AudioPlay(waittime : float,sound : AudioClip) { yield WaitForSeconds(waittime); audio.PlayOneShot(sound); } function ApplyDamage(dmg : float, hit) { hit.transform.SendMessage("Damage",dmg); } function Burst() { RayShoot(); audio.PlayOneShot(ShootAudio); spread += spreadPerSecond; yield WaitForSeconds(gunTypeSpecs.burstDelay); audio.PlayOneShot(ShootAudio); spread += spreadPerSecond; RayShoot(); yield WaitForSeconds(gunTypeSpecs.burstDelay); audio.PlayOneShot(ShootAudio); spread += spreadPerSecond; RayShoot(); } function ShotGun() { var hit : RaycastHit; var rayPosition : Vector3 = mainCamera.transform.position; var directionRay = mainCamera.transform.TransformDirection(Random.Range(-maxSpread, maxSpread) * spread, Random.Range(-maxSpread, maxSpread) * spread, 1); if(Physics.Raycast(rayPosition, directionRay, hit, range)) { if(hit.collider.tag == "EnemyBody" || hit.collider.tag == "EnemyHead") { hitmarker.guiTexture.color.a = 1; var dist = Vector3.Distance(transform.position,hit.point); var damage = (gunSpecs.gunDamage+(gunSpecs.gunRange*gunSpecs.gunRange/(dist+gunSpecs.gunRange)))/*+gunSpecs.gunRange*0.1*/; if(damage >= gunSpecs.gunRange) { damage = gunSpecs.gunRange; } if (hit.collider.tag == "EnemyHead") { damage = damage*1.5; } ApplyDamage(damage, hit); } if(hit.rigidbody) { hit.rigidbody.AddForceAtPosition(directionRay * force, hit.point); } Instantiate(hitparticles,hit.point,Quaternion.FromToRotation(Vector3.up, hit.normal)); } } function ProjectileShoot() { }
  24. Societatem is Singleplayer & Multiplayer tactical FPS. It features infantry combat with a class system, vehicle combat which currently includes jeeps, tanks and helicopters, and specialized game modes such as Takeover and TDM. The infantry features advanced movement such as parkour which includes flipping and climbing over obstacles, leaning around walls and rolling in and out of cover. There are bots in the game and many unlockables you can acquire by earning experience while playing. Current team members: William - Lead programmer, animator Chris (LuxuriousSociety) - Lead modeler, texturer, co-programmer Joltation - Orchestrator The open alpha for Societatem will start at the time of the IGoAUC 2014 competition, which is 25th of December, 2014. More information about the game can be found on our IndieDB page and YouTube channel. We post update videos on YouTube and news on IndieDB. Keep in mind that the latest information on both sites are most likely outdated and differ greatly from what is actually implemented in the game. To save myself the time of doing everything twice, once on here, once on IndieDB, please "watch" our game on IndieDB if interested! IndieDB YouTube Channel Thanks for reading, - William, RedCrusaderGames
×
×
  • Create New...