How To Create Health (Plus Bar)

Read reply by Grazer For info. This fourm Is for my brother :3

How Do i create health? i did try to look in the logic of “Epic Adventure” But i di not get it

I made an example to show one approach to creating player health, with a health bar:

Health Example

The health value is just a Number behavior, which I named “Health” and set to an initial value of “10”. The output of this number goes into a Bar ui behavior, and I added a Once trigger to ensure that the bar always gets reset.

To add some damage, I added a Collision trigger, thats increments the Health number by “-2” every time they touch. As a finishing touch, I am also filtering the output of the Health, so that if it drops below “1”, then the game will restart.

Let me know if you have any questions or comments.

i found a glitch in your example!

when the game restarts there are 2 people.

Thanks for the heads up - that glitch is fixed :slight_smile: