Quantcast
Channel: Questions in topic: "die"
Viewing all articles
Browse latest Browse all 115

bullet damage problem

$
0
0
I wrote a collision and bullet damage script, bullet is tagged as bullet and both are rigid bodies plus both triggers are checked so i can't figure out why it isn't working? using UnityEngine; using System.Collections; public class BulletDamage : MonoBehaviour { public int HEALTH=100; public GameObject bullet; static public int bulletDamage = 25; public GameObject clavicle; public GameObject soldier; void OnTriggerEnter(Collider other) { if(other.tag == "bullet"); { HEALTH = HEALTH - bulletDamage; } if (HEALTH<=0) { clavicle.transform.parent = soldier.transform; animation.Play("soldierDieFront"); } } }

Viewing all articles
Browse latest Browse all 115

Trending Articles



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