How to make health for monsters and players?
TYH
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
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".
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Still not really sure.
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.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page