Let's say that you have 3 as capacity of life.
Make a Global Variable named "Life"
Set (LifeSprite) as your sprite life counter (Image you see as life)
Add Instance Variable Number named "Index" to (LifeSprite)
Global Variable Number = "Life"
{Group : + Life}
*Compare variable "Life" > 0
------> Create Object (LifeSprite) (64, 64)
------> Set (LifeSprite) instance variable "Index" to 1
*Compare variable "Life" > 1
------> Create Object (LifeSprite) (128, 64)
------> Set (LifeSprite) instance variable "Index" to 2
*Compare variable "Life" > 2
------> Create Object (LifeSprite) (192, 64)
------> Set (LifeSprite) instance variable "Index" to 3
{Group: - Life}
*Compare variable "Life" < 3
*Pick by comparison (LifeSprite.Index = 3)
--> LifeSprite [Destroy] or [Fade out] (Note: Your choice if fadeout or destroy)
*Compare variable "Life" < 2
*Pick by comparison (LifeSprite.Index = 2)
--> LifeSprite [Destroy] or [Fade out] (Note: Your choice if fadeout or destroy)
*Compare variable "Life" < 1
*Pick by comparison (LifeSprite.Index = 1)
--> LifeSprite [Destroy] or [Fade out] (Note: Your choice if fadeout or destroy)
[/code:360clcjw]
You might also want to set the layer of the sprite counter parallax to 0 and add an anchor behavior for your LifeSprite.
That's it. Happy Game making