health poblems


  • Posts: 10
i have a problem with the premade health system that you can pull from the stencyl web site. when you set some thing to heal last collided actor or deal negative damage it can excede the max health you set on the health behavior. how would you correct this? help would be apreciated. :)


  • Posts: 122
I don't know which specific behaviors you are using, but a simple solution is to put a bounds check in one of the actor's behaviors.

If (health > maxHealth) {
  health = maxHealth