I have a sample here somewhere, let me find it (strange sounds behind the scene)..
Here it's: construct.net/en
and
construct.net/en
xD
You can make the life doing a instance variable on the object, and then, when a condition is meet (like a punch overlapping the object), make it add -1 of life.