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.

Tecnologgamer

Member
  • Content Count

    28
  • Joined

  • Last visited

Community Reputation

0 Neutral

1 Follower

About Tecnologgamer

  • Rank
    Member

Profile Information

  • Gender
    Not Telling
  • Location:
    Springfield
  1. So I wanna add new weapons, but I wanna too add animations like reload, run, etc. But Where I switch the animation?
  2. Hi, I developer a script in DaBoss FPS Kit and I need a little help about script. I am not a programmer, but I try be one. So my script consist in the player have a current level to take that weapon, So i make it using UnityEngine; using System.Collections; public class Level : MonoBehaviour { public int requiresLevel = 4; public int currentLevel; // Use this for initialization void Start () { } // Update is called once per frame void Update () { if(requiresLevel -= currentLevel){ } } } Like you can see, I want to do how I make the script "UsableObject" make false if the player not have the current level?
  3. So I make it, and my script was thus using UnityEngine; using System.Collections; public class PlayerVitals : MonoBehaviour { public GameObject guiObject; public int curHealth = 100; public int maxHealth = 100; public int recoveryAmount = 1; public float recoverySpeed = 3; public Color bloodColor = new Color(1.0f, 0.0f, 0.0f, 1.0f); public Texture2D bloodyScreen; public float fallDamageHeight = 8; public AudioClip fallDamage; [HideInInspector] public float percent; private float alpha; private float iv2; private float minimumHealth = 40; private float bmhRatio; private PlayerMovement pm; private CharacterController controller; void Start() { minimumHealth = 40; pm = GetComponent<PlayerMovement>(); if(recoveryAmount != 0) { StartCoroutine(Regenerate(0)); } controller = GetComponent<CharacterController>(); } void OnControllerColliderHit(ControllerColliderHit hit) { Rigidbody rigid = hit.collider.attachedRigidbody; if(rigid == null || rigid.isKinematic || hit.moveDirection.y < -0.3f) { return; } Vector3 pushDir = new Vector3(hit.moveDirection.x, 0, hit.moveDirection.z); rigid.velocity = pushDir * controller.velocity.magnitude * pm.pushPower / rigid.mass; } void OnGUI() { GUI.color = new Color(bloodColor.r, bloodColor.g, bloodColor.b, alpha); GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), bloodyScreen); } void FixedUpdate() { alpha = Mathf.Lerp(alpha, 0.9f - (percent * 0.9f), Time.deltaTime * 7); curHealth = Mathf.Clamp(curHealth, 0, maxHealth); percent = (float)curHealth / (float)maxHealth; iv2 = pm.impactVelocity; if(curHealth <= 0) { Die(); } Repud.GetChild(guiObject, "health_text").GetComponent<TextMesh>().text = curHealth.ToString() + "/" + maxHealth.ToString(); Repud.GetChild(guiObject, "health_bar").SendMessage("UpdateSize", percent); bmhRatio = maxHealth / minimumHealth; if(pm.grounded && pm.floating && iv2 > 1) { SendMessage("FallAnimation", iv2); } if(pm.grounded && pm.floating && iv2 > fallDamageHeight) { FallDamage(((iv2 - (fallDamageHeight * 0.8f)) * ((iv2 - (fallDamageHeight * 0.8f)) * 0.5f))); iv2 = 0; pm.floating = false; } } public IEnumerator Regenerate(int amount) { curHealth += amount; yield return new WaitForSeconds(recoverySpeed); StartCoroutine(Regenerate(recoveryAmount)); } private void FallDamage(float prc) { if((int)(prc) <= 0) {return;} ApplyDamage((int)prc); audio.clip = fallDamage; audio.volume = 0.02f; audio.Play(); } public void ApplyDamage(float dmg) { hit.collider.SendMessage("ApplyDamage", 30); //More fancy stuff here... } public void Die() { Destroy(gameObject); } } and a error appears Assets/MAIN - Paradox/Scripts/Player/PlayerVitals.cs(88,5): error CS0103: The name `hit' does not exist in the current context
  4. Hi everyone, so I make a new animation run for pistol, because the animation of pistol on FPS DaBoss Kit, is not so good, so I want know how I replace the animation. And too I make a animation with all weapons lowering, Why I do not know how to animate well, I did this kind of animation to represent all 'reloading' arms, and I was wondering if I can put this animation Weapon Manager, creating a new kind of animation? Did this work? And my last problem for my game it is: http://www.youtube.com/watch?v=uAt-9QaduPc
  5. The DaBoss FPS Kit have a function reload, but not have a function animation when you reload.
  6. So DataBoss, that is the problem who happen. http://www.youtube.com/watch?v=uAt-9QaduPc&feature=youtu.be And one more question: I see that more weapons not have a reload animation, and I make a animation for all weapons, how I put this animation?
  7. Tecnologgamer

    HP not down

    Hello guys, so I make my game from project of DaBossTRM ( Thanks for release a project very good, congratulations). And when I was put the ranged enemy http://armedunity.com/topic/2374-ranged-enemys-finnaly/ The enemy shots at the player, but him HP not down, what I need do?
  8. Good morning, I'm making a game and now to finish it I need to make a splash screen, to show the concept of the history of my game, and I wonder how I can make a scene that lasts for fifteen seconds and then go pro game.
  9. I have fix the problem, but my shots are throw a little for left
  10. And one more question: The Scar have the secondary shot? How I make do it?
  11. Hi, I have two question: When i make a weapon world for my player take the item, but dont happen nothing. He dont take the weapon . Other thing, I was switch my new weapon upon of Scar with Silenced, and dont appears the particle who appears in the scar, how I make it?
  12. Tecnologgamer

    Player

    So, I find it, but i need put the script. Now it`s normal, I will can continue with my project.
  13. Tecnologgamer

    Player

    Hello, So I was make my project, however I make a stupidity and I delete doens`t see my player. Somebody have a video show how make a player?
  14. Hi, I saw the FPS Unity tutorial there is a system in which engine you can make your enemies walk at certain points, although this type of AI is pretty weak, I wanted to use, how can I use and what is the name of this system?
×
×
  • Create New...