- Home /
Bootcamp soldier health
How can I decrease soldier health in boot camp demo . I have been trying to reduce soldier health but its not working and the "fireline" cross the soldier body as if there is no collision (although there is a character controller ,rigid body and a box collider added on solider ) .
Please help !
Answer by Juan Pablo · Feb 09, 2011 at 03:52 AM
Try to use, onCollisionEnter or onTriggerEnter. mmm.. an example.
function OnCollisionEnter(shoot:Collision){ if((collision.gameObject.tag == "bullet")) { health = health - 10; print(health); // you can see if working or not. } } sorry about my english. Only try to help. =)
Your answer
![](https://koobas.hobune.stream/wayback/20220613101952im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to add a New BootCamp Soldier? 1 Answer
Bootcamp soldier arms 0 Answers
Player health decrease and blood splatters ?? 2 Answers
How to reuse Bootcamp soldier_locomotion in other .unity 1 Answer
How to add more animation on the Bootcamp soldier? 0 Answers