Lifesystem in as3
Hello,
I'm trying to make a game and within that game i'd like a lifesystem. The player has 3 lifes (shown as 3 hearts in the game). This is what I have so far:
var lifes:int = 3;
function checkForHits() {
if(Player.hitTestObject(Zombie)) {
Heart3.x=1100;
lifes --;
Player.x=200,Player.y=600;
}
if (lifes == 0) {
gotoAndStop("gameover");
}
It works, after 3 deaths I progress to the gameover screen. My problem is: how do I show that graphically? The first heart (called heart3) dissapears as I want it to, but I have no clue how to do the same with the second and third heart. Any suggestions?
