How to make health for monsters and players?

TYHTYH Member Posts: 9

I have tried doing so but it has not worked yet. Th monsters either become indestructible or destroyed in one hit. I have not dared to try it own players as I am already struggling with the monsters.

Comments

  • ArmellineArmelline Member, PRO Posts: 5,421

    Give them an integer self attribute. Set it to the number of hits you want it to take to kill them. Every time they are hit, do a Change Attribute behaviour, changing their health to health-1. Add a rule saying "When health = 0, destroy".

  • TYHTYH Member Posts: 9

    Still not really sure.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Below is a tutorial about creating a health bar. In the tutorial I create an Attribute called Health, you would use that to keep track of the players or monsters health (obviously, I suppose). When it reaches zero kill the player, if the player picks up extra health just add to the attribute like I do to increase and decrease the health bar display.

Sign In or Register to comment.