openfocus
Okay, so I spent some time on this. It was fun to make an example for the explanation that follows, here it is.
In this example, a spawn button will let you spawn people, blue squares. There is also a red fire.
People have 100 life when spawned, and will loose 8 life point every 0.5 second passed in the fire (those are constants in the project, you can change it easily). Once their life is under 50, an alert displays over their head. Once their life is at 0, they die (destroyed).
This works with multiple fires and people of course.
I commented the code a maximum for you to look at the events, as they are not that hard. You might noticed I put the alert text in the same container as the people, so they spawn and die together, and when one is picked, so is the other.
What I did was create a separate function to handle all the changes in life. This way, you can easily write code with damage, without thinking about the alert or the death.
On the other hand, for a damage over time, the behavior "timer" seems the more appropriate.