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 'fps kit v1.6'.



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 2 results

  1. so I added an enemy in fps kit v1.6 when I shot it on the enemy it did not receive damage even though the enemy was given a script. sorry if my english is not good zombieControiller.cs using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.AI; public class zombieControiller : MonoBehaviour { NavMeshAgent nav; Transform player; Animator controller; float health; GameManagement game; CapsuleCollider capsuleCollider; Animator anim; bool isDeath = false; // Use this for initialization void Start() { nav = GetComponent<NavMeshAgent> (); player = GameObject.FindGameObjectWithTag("Player").transform; controller = GetComponentInParent<Animator>(); game = FindObjectOfType<GameManagement>(); health = 20 + (1.25F * game.round); capsuleCollider = GetComponent<CapsuleCollider>(); anim = GetComponent<Animator>(); } // Update is called once per frame void Update () { if (isDeath) { nav.SetDestination(player.position); controller.SetFloat("speed", Mathf.Abs(nav.velocity.x) + Mathf.Abs(nav.velocity.z)); } } void ApplyDamage(float damage) { health -= damage; if (health <= 0) Death(); } void Death() { isDeath = true; nav.Stop(); capsuleCollider.isTrigger = true; anim.SetTrigger("isDeath"); Destroy(gameObject, 4f); } }
×
×
  • Create New...