GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

regenerating health

igpxnaruto4igpxnaruto4 Posts: 81Member
edited May 2012 in Tech Support
So i have an actor that moves around, i also have an enemy that follows the x and y coords. so when they touch it takes off 25 health off of the 100. what i did to make it regenerate health was...
i made a rule (attribute), and used the variable with 100 (also used to display health and linked to the enemy and stuff) then i added a timer of every 1 second (tried 3 and 5 also) then i added a change attribute and said if health is less then 100 (also tried less then or equal to 99) then game.health+1
When i go in game the health is taken off then after 1 second the health disappears and doesn't work anymore so the bad guys can hit me as much as they want. any idea?

Best Answer

Answers

This discussion has been closed.