Ok so i have a boss with week points that flash when you shoot them and a health code of 1000 and 1 gets taken off every time u hit
a week point.
now i have a 3D object as a health bar that I want to scale down on the X AXIS by 1 when u hit a week point.
on hit:
/////
var colors = new Color[2];
function OnCollisionEnter() {
renderer.material.color = colors[0];
yield WaitForSeconds(0.1);
renderer.material.color = colors[1];
CoreSpawHealth.CoreHealth += -1;
}
//////
thinking of adding a var “when hit : int = 10000” and call it by another script on the enemy health bar cube and when it detects 1 being taken of health it shrinks. but haven’t been able to do this been at it for 3 hours now.
////WORKING WITH JAVA///