Page 2 of 2

Re: How to make an enemy take several hits

PostPosted: Sun May 17, 2015 12:16 pm
by koala
mindcontrol wrote:It work! thanks
No problem. :D
I've forgot to mention one more thing. Because you don't assign any value to hp, it will be 0. So when projectile collides with player, hp will decrease by 1, and it will be -1. Then you go to if (hp <= 0). That condition is true now, it would be even without hp--. Player is then destroyed after first hit.

Re: How to make an enemy take several hits

PostPosted: Wed Jun 03, 2015 1:00 am
by Zivouhr
Good question and tips. Thanks.