Health doesn't go to 0

miyuxmiyu

  • Posts: 8
Hello,
I just can't figure out whats wrong.
My actor can get hit 3 times before he should die. So i have a game attribute (hp) that decrease when hit.
But it doesn't go under 1.
Please help me I need it for my master thesis.
 Thanks.

At least for me, I would like to know a little more about the problem.  To clarify, are you saying that when you start the program, hp is at 3?  And then as he gets hit, the debugging that you have inserted into the program shows that hp is going down each time he gets hit?  But when hp reaches one, it stays at one and printing out 1, no matter how many times he gets hit?

Also, I would love to hear more about your Master's thesis.  This sounds really cool!

miyuxmiyu

  • Posts: 8
Exactly! It prints 1 until "was hit" becomes false and then it shows the death animation but nothing happens anymore (nothing but pushing the dead body back and forth)
I think there's a problem with the do after's.  :/

My thesis is about "Emotional Game Design" and I'm doing a little game that should evoke different emotions. :)

miyuxmiyu

  • Posts: 8
Yeahh I did it! I eliminated the "kill Self" at the end and put everything in the "if not was hit"!
And for this i needed about 4 hours -.-

Thanks anyway !