Health bar
I want an health bar attached to an enemy object that starts at 100. I need it to deplete with every bullet collision by -10 points every time the enemy object is hit and I want the health bar or percentage to display on screen (hud type thing). When it reaches zero I want the enemy object to die.
What I tried:
Created a microchip and attached it to vehicle. Attached a collision detector to microchip, and tweaked it to collide with 'missile' (tag of bullet sculpt is 'missile').
I then added a health gadget to the microchip and tweak it to 100 max, I didn't know where to attach the collisiin detector to the health gadget so just connected to power...?
I then added a text displayer to the side of the screen and attached the health gadget's current value to the text displayer.
The text displayer just counts to 1 and then back to zero...
-
Hi,
The health modifiers have built in impact sensors, so no need for another.
Then use the current health output of the health manager and plug it into a number dispayler
Hope that helps
John -
Thanks for that. I'll give it a go. Ta!
-
Worked perfect. Ta very much. Didn't realise I'd need a health modifier. Doh!
Please sign in to leave a comment.